GithubHelp home page GithubHelp logo

morserror's Introduction

morsError

low-footprint stateful runtime morse encoder designed for microcontrollers

why

If you have an error LED on your device, why can't it tell you what is wrong?

how

Include morse.h in your code.

You must edit two functions in morse.c: errorledon() and errorledoff()

In your main loop (or from a timer interrupt) you must call updateMorsE() at preferably regular intervals. A good period is somewhere between 200ms - 1s. If there is too much jitter, the code will be unreadable.

To set a code, call setMorsError(char c) where c is an ASCII character. Right now [A-Za-z0-9] is supported. Anything else will set the encoder into off state.

When you periodically call updateMorsE(), the function will return 1 at the end of each character transmitted. This is the time you might want to change the character to a different one! I included an example on how to send a text string in main.c

I wrote this for an MSP430 but it should be easy to run it on any other microcontroller. You only need to provide the errorledon() and errorledoff() functions.

decoding

I found an android app which can more or less decode morse with the camera, it's called Morse Code Agent - let me know if you find any open-source alternative.

my favorite part

is the binary look-up table. the MSP compiler neatly packed the bytes, so the whole thing is very compact and still quite fast.

Binary Lookup Table

Code Size reported by the compiler

morserror's People

Contributors

zoe1337 avatar

Stargazers

ln avatar Thomas B. Ruecker avatar Rodentata avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.