byte MorseT []={
//B10101010
B00111111, //0
B00101111, //1
B00100111, //2
B00100011, //3
B00100001, //4
B00100000, //5
B00110000, //6
B00111000, //7
B00111100, //8
B00111110, //9
B00000101, //A 10
B00011000, //B 11
B00011010, //C 12
B00001100, //D 13
B00000011, //E 14
B00100100, //F 15
B10000110, //G 16
B00010000, //H 17
B00000100, //I 18
B00010111, //J 19
B00001101, //K 20
B00010100, //L 21
B00000111, //M 22
B00000010, //N 23
B00001111, //O 24
B00001101, //P 25
B00011101, //Q 26
B00001101, //R 27
B00001000, //S 28
B00000011, //T 29
B00001001, //U 30
B00010001, //V 31
B00001011, //W 32
B00011001, //X 33
B00011011, //Y 34
B00011100 //Z 35
};
void PlayIt(byte index)
{
byte b ;
b=MorseT[index];
for (int i=0;i<8;i++)
{
byte x=((b << i) & B10000000) >>7;
Serial.println(String(i)+" "+String(x));
}
Serial.println();
}
void MorseIt(char Sign)
{
int offset=0;
int mc = byte(Sign)-48;
if (mc<10) PlayIt(mc); else PlayIt((mc-65)+10) ;
}
String am ="ABCDEFGHIJKL1234567890";
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
}