Everybody uses Python or C to control their Pi HATs. Neither of both languages are my favourite. That's why I tried out Kotlin Native which means no JVM and just a single executable *.kexe file.
What's about Blinkt?The Pimoroni Blinkt! Raspberry Pi HAT has everything a Tinkerer needs. It shines bright and has RGB colouring. Besides this, it is one of the more simpler HATs and a great way to get started.
Features- Deployment to a Pi using a convenient shell script
- Control LEDs using Kotlin functions
- Add "plugin"-system for light modes
- Control LEDs using remote computer's
curl
commands - Control LEDs using a simple web interface
Available web interface
After booting up the app, you can connect to http://pi:8080/
and control the Blinkt! HAT using your browser.
# Turn off all the things
curl -X POST http://pi:8080/on
curl -X POST http://pi:8080/off
# Light mode sample
# See `turnLightMode` for more supported ids
curl -X POST http://pi:8080/lightmode -d "red"
curl -X POST http://pi:8080/lightmode -d "rainbow"
curl -X POST http://pi:8080/lightmode -d "cycle"
# Morse word
curl -X POST http://pi:8080/morse -d "hello"
# System shutdown
curl -X POST http://pi:8080/shutdown
Caution: I'm a Kotlin BeginnerIf you put my motivation besides, I'm a Kotlin beginner. That means it may not be the best idea to just copy and paste my code, but maybe it could be the beginning of your Kotlin Native and Raspberry Pi journey. Please let me know!
Comments
Please log in or sign up to comment.