An open API service indexing awesome lists of open source software.

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.

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 tinygo

package 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)
}
}
```