Nibbles and Bits
The Care and Feeding of My Pet Arduino by Budd Churchward - WB7FHC - NIBBLES AND BITS LIBRARY
«1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 » |
Section 8
Now it is time to explore our strategy for decyphering Morse Code.
We are going to turn the incoming dits and dahs into a stream of bits, binary 1's and 0's. The word bit is short for binary digit. Arbitrarily, I have choosen to designate the 1 bit as a dit and the 0 bit as a dah. There is no good reason why it couldn't be the other way around. That's just what I chose to do. The changes aren't very big this time. in printResutls() simply change our . and - to 1 and 0. Compile and run the program. As you tap out Morse Code, neat little binary numbers show up on the monitor. Soon we will be changing those numbers into the actual letters being sent with your key. |
|