If you are up for the challenge, however, you could probably build one with more esoteric components, such as an EEPROM+counter, or even a music-box type mechanical system. Mark admits that using an Arduino for this is a bit of overkill, however I think that convenience trumps component cost for one-of projects like this. Each character takes only a single byte to store its pattern, and decoding is just done in a few instructions. We then get rid of that element (by dividing by two, or shifting right if that floats your boat) and repeat. If it is a zero, we have a dit, if we have a one, it’s a dah. If not, we look at the least significant digit. If the pattern is equal to one, we are done (that’s our guard bit). Then, when we are looping, we do the following. The only trick is knowing when there are no elements left, because otherwise we can’t tell (for example) K (-.-) from C (-.-.) To do that, we store a single extra one after all the other elements are taken care of. Lets store them so the first element gets stored in the least significant bit, and the next in the second most, and so on. Let’s say that dits are zero and dahs are one. Morse code characters are all length six or less, and each element is either a dot or a dash, so it would seem that we can store the pattern in six bits. It’s a little bit clever (a very little bit) but I guess it does require some explanation. I really like the clever way that he stores the code sequences for each character: Showcasing amazing maker projects of 2022Īny hams out there that need a quick-and-dirty morse code beacon? Then you might be interested in Mark VandeWettering’s Arduino Based Morse Beacon. Gift the gift of Make: Magazine this holiday season! Subscribe to the premier DIY magazine todayĬommunity access, print, and digital Magazine, and more Share a cool tool or product with the community.įind a special something for the makers in your life. Skill builder, project tutorials, and more Get hands-on with kits, books, and more from the Maker Shed
0 Comments
Leave a Reply. |