https://github.com/soypat/morse
Morse code API. Communicate like it's 1830.
https://github.com/soypat/morse
embedded embedded-systems morse morse-code morsecode mwe telegraph
Last synced: 3 months ago
JSON representation
Morse code API. Communicate like it's 1830.
- Host: GitHub
- URL: https://github.com/soypat/morse
- Owner: soypat
- License: mit
- Created: 2023-05-27T05:49:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-22T21:08:51.000Z (over 1 year ago)
- Last Synced: 2025-01-08T12:40:38.486Z (4 months ago)
- Topics: embedded, embedded-systems, morse, morse-code, morsecode, mwe, telegraph
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# morse
Morse code API. Communicate like it's 1830.## Example
Example using an LED with TinyGo:```go
//go:build tinygopackage main
import (
"machine"
"time""github.com/soypat/morse"
)// This is the hardware abstraction layer (HAL) for the telegraph's Pin.
func telegraphPinHAL(b bool) {
machine.LED.Set(b)
}func main() {
machine.LED.Configure(machine.PinConfig{Mode: machine.PinOutput})
telegraph := morse.NewTelegraph(100*time.Millisecond, telegraphPinHAL)
for {
println(`sending "HELLO WORLD"`)
telegraph.Send("HELLO WORLD")
time.Sleep(5 * time.Second)
}
}
```