Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Create a morse code tweeter #453
I've sourced a WW2 morse key from eBay. The plan is to connect this up to a GPIO input on an ESP8266 running MicroPython
I have hacked together some Morse encoding/decoding code which is in GitHub here
There are a couple of Python scripts, one that'll run on Windows, encode a string to a custom format I've created and beep as it does it. Then it reads back the format and outputs the decoded characters.
There's a second one which runs under MicroPython on the ESP8266, encodes, decodes and publishes via MQtt up to a server running node-red which then tweets from @ddmorsetweeter
The encode format I'm using is basically a timestamped '1' and '0' to emulate press/release of the key when I have it attached to a GPIO.
Where I'm likely to get stuck is with the timing of the decode, which is currently hard coded.
There are probably good adaptive strategies to manage this and if anybody can advise I'd appreciate it?
Maybe something a bit like auto-bauding on RS232 UARTs where it samples bit times on a few characters to work out what the baud rate is?