Who needs 5G when you can have a portable telegraph? Send Morse code messages between two Arduinos using LoRa!
If you can already hook up a button and a buzzer it'll be a very simple project for you.
How toGather the components listed and hook them up according to this diagram:
Here the telegraph key is represented by the button. The antenna is not shown, but you just gotta pop it in its connector. I used the boards from Amazon but this should also work with the Adafruit Feather 32u4 RFM LoRa boards: https://www.adafruit.com/product/3078.
Here's what my assembled board looks like up close:
I've 3D-printed a holder for my antenna, it is held on by a screw on the telegraph key. The speaker is held on by some adhesive putty, the board is held on by the willpower of the wires.
Make sure you have the Adafruit boards in your Arduino IDE: https://learn.adafruit.com/add-boards-arduino-v164/setup.
Select Adafruit Feather 32u4 as the board:
Make sure you have the RadioHead library: https://www.airspayce.com/mikem/arduino/RadioHead/. Upload the code from below to the board.
Repeat the above steps for the second board and you're done!
The code records the timing of the button presses, after 5 seconds of idle time the recorded message is sent with a confirmation beep. Uncomment the Serial lines if you want to know what the Arduino is thinking about.
According to the RF95 documentation, the max message length is 251 octets, this is uint8_t, but we are using int 16 to store our arrays (this way we can get more than 255 ms time) that means we get 124 numbers to send our message. Of the 124, half is used to communicate idle time and half is button hold time, i.e. we need 2 numbers per beep, thus we can send a maximum of 62 beeps per message. If you have an idea to send more than 62 beeps per message let me know!
The setup can be powered by a lipo battery via the battery port or a portable USB charger via the USB port. I walked around the block with this thing and got a maximum range of ~600m in the suburbs.
That's it, give one to your friend and start telegraphing!
Comments