Kotlin, Raspberry Pi, and Robots: what could possibly go worng.
Experiments in electronics, robotics, and interacting with the "real world" with functional languages1. The "base" implementations are projected to be based on the plethora of microcomputing platforms, specifically the Raspberry Pi.
This is a learning experience for me, but it might produce something useful (I'll re-write this README if that actually happens 😃).
Parts of this project have been either archived or spun off into library-like projects:
Goodbye, my little coffee friends.
A long, long time ago, I attended a WorldCon and went to a panel on robotics. I was captivated. However, at the time, I was attending college -- it seemed that acid-etching PCBs in a dorm room was probably not going to be a thing.
... time passes ...
Today, it's stupid easy to "build" electronics on bread-boards, not to mention HATs, shims, extenders, etc., and there's stupidly powerful microprocessors that you can build with. Like running a JVM. That's a helluva step up from hand-held DTMF-based remote controls.
So, yeah - I have a hobby now.
This stuff is being done on Pi's because that's what I have. Plus they're at least multi-core and can run Java without too much problem.
i2c
controller is enabled on the Raspberry Pi and that your user is in the appropriate group to access said devices:
$ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 1 Nov 23 12:24 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 Nov 23 12:24 /dev/i2c-2
This pinout reference is also invaluable...
- diozero - a thorough and straight-forward implementation of GPIO interface, with a wide range of standard devices to boot.2
- kobots-devices - extensions and new devices added onto
diozero
, but in Kotlin. - kobots-parts - application level stuff using the devices --
‼️ HIGHLY OPINIONATED :smiiling_imp:
This project uses Gradle, so the only thing you need is a compatible JDK3. Additionally, because the project is Kotlin and uses the Kotlin Gradle plugin, a Kotlin installation is also not necessary.
Because I have no idea what direction any of this will take, the physical construction pieces have started with standard LEGOTM pieces, transitioning to TechnicTM. Various partial contraptions and explorations are detailed in the adhoc subproject.
Potentially useful constructs can be found in the diagrams directory. CAD drawings were produced using LeoCAD.
There's also a Google Album with more photos and videos.
1 All of the tutorials, lessons, kits, and existing libraries are predicated on C (at some level), due to the hardware interaction. I just don't want to go there anymore.
2 MIT License
3 Java 17 is currently the only one used