This is a simple class written to flash out morse code. It can be used to flash out data from the terminal or from a buffer
Diff: main.cpp
- Revision:
- 0:c3c4f0cd78cd
diff -r 000000000000 -r c3c4f0cd78cd main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Sep 18 16:27:24 2013 +0000 @@ -0,0 +1,23 @@ + +#include "MorseCode.h" + +Serial pc(USBTX,USBRX); +MorseCode MC(LED1); +unsigned char buffer[] = {"Nothing Like Morse Code"}; + +int main() { + unsigned char pcinput = 0; + bool Printable = false; + MC.set_unit(.05); + MC.blink_buffer (buffer); + while(1) //Do what ever is between these brackets forever or until the micro is reset. + { + + pcinput = pc.getc(); + Printable=MC.Print_ASCII_Char(pcinput); + pc.putc(pcinput); + + } +} + +