This is ready to go in a library if anyone is interested there is an example, and lots of explanations for why things are implemented the way they are. ApproxFFT: Fastest FFT Function for Arduino. When that finishes, the program is notified that a new message is ready. This function performs FFT with very good speed while maintaining accuracy. After we have all the presses and releases, then the decoding algorithm runs and calculates whether a particular press is a “dot” or a “dash,” if the down-press is a space between dots/dashes in one character, between characters, or between words. The “user input” seen in the video is an array of uint16_ts containing the user’s press and release times in ms, with even indexes being down-presses, and odd indexes being releases. So, I tried my own approach, which basically converts each morse character into a unique binary sequence, and that sequence corresponds to an index of array of characters. I had a hard time finding a morse decoding solution that doesn’t use string comparison, doesn’t take up a massive amount of memory, doesn’t hard-code the “time unit” intervals, and can type complete sentences. At least two people have come up with some morse-related problems to be solved lately, so I figured I would share this in case anyone else would have a use for it.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |