This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define dotPeriod 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define dotPeriod (analogRead(2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void dah() | |
{ | |
tone(tonePin, buzz); | |
delay(dahPeriod); | |
noTone(tonePin); | |
delay(relaxtime); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void di() | |
{ | |
dit(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define dashPeriod (dotPeriod*3) | |
#define relaxTime (dotPeriod) | |
#define letterSpace (dotPeriod*2) | |
#define wordSpace (dotPeriod*4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define buzz 1000 | |
#define tonePin 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Index=0, endofstring, i; | |
//This creates dummy variables to index letters | |
char Input[255]; | |
//This is required to store the input data temporarily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() | |
{ | |
while(!Serial.available()); | |
//This command makes it wait until the Serial data is sent | |
while(Serial.available()) | |
{ | |
Input[Index]=Serial.read(); | |
//Stores the byte of data from the serial buffer | |
Serial.print(Input[Index]); | |
//Prints out the same data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define buzz (analogRead(1)+200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void dit() | |
{ | |
tone(tonePin, buzz); | |
delay(dotPeriod); | |
noTone(tonePin); | |
delay(relaxtime); | |
} |
OlderNewer