Skip to content

Python program that, when given a string, will communicate this in morse code via a chosen LED interface on a Raspberry PI

License

Notifications You must be signed in to change notification settings

benjaminlukeclark/piMorseCodeLEDs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

piMorseCodeLEDs

Made to translate strings to morse code, then communicate these via LEDs on a keyboard (provided it's hooked up to a raspberry pi)

Made whilst studying TM129 for no other reason than I thought it'd be neat to do and help me a little with some lower-level conceptual understanding.

pi@raspberry:~ $ python3 piMorseCodeLEDs/main.py --help
----------------------------------------------------------------------------------------------------
Python script for Raspberry Pi to communicate strings via keyboard LEDs

By Sudoblark (https://github.com/sudoblark)

Strings are first translated to morse code then communication in dot-dash notation via a chosen LED

Accepted args:
--help shows this message

--led %ARG% sets led to use, admissible input is: scrollLock, capsLock, numLock

--message %ARG% determines message to encode and sent

Example
python3 main.py --led capsLock --message SOS
python3 main.py --led capsLock --message 'Hello World'

----------------------------------------------------------------------------------------------------

install

  1. Clone to a Raspberry Pi
git clone https://github.com/sudoblark/piMorseCodeLEDs
  1. Run help if you're stuck
git clone https://github.com/sudoblark/piMorseCodeLEDs
  1. Run script in sudo to do some morse code translation

Note: Requires sudo to access /sys/class/leds as explained here

pi@raspberry:~ $ sudo python3 piMorseCodeLEDs/main.py --led capsLock --message 'Hello World'
----------------------------------------------------------------------------------------------------
Python script for Raspberry Pi to communicate strings via keyboard LEDs

By Sudoblark (https://github.com/sudoblark)

Message: Hello World   |   LED: capsLock

----------------------------------------------------------------------------------------------------

About

Python program that, when given a string, will communicate this in morse code via a chosen LED interface on a Raspberry PI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages