Ibuilt a tiny Unix‑like 'OS' with shell and filesystem for Arduino UNO (2KB RAM)
Posted by Arc1011 6 hours ago
Comments
Comment by jrflo 4 hours ago
Comment by MisterTea 3 hours ago
Your IO points can be individual files so you can 'echo 127 >/n/arduino/pwm0' to set and reading is just as easy 'cat /n/arduino/pwm0' If you want to save all the pin states you 'tar -c /n/arduino | gzip >arduinostate.tgz' then reverse that process to write the values back.
To change pin config you can create a ctl file which you can use to control and configure things using key=value pairs, e.g. echo 'pinmode pin=3 mode=output' >/n/arduino/ctl. Errors are communicated through the file system so a failed write() will return -1 along with an errstr(2) message to your calling process.
Want a cli in addition? No problem, just make a file called e.g. con (console) and hang a REPL off it. Now open that file using a console emulator like con(1) on Plan 9: 'con -C /n/arduino/con' and type your heart away.
I have toyed with the linked library on 9front and tinkered with robotfs and the RNG demos. This is one of the cleanest ways to interact with software IMO.
Comment by Someone 2 hours ago
Comment by ls65536 1 hour ago
Comment by DoctorWhoof 4 hours ago
Comment by tosti 2 hours ago
Comment by zserge 3 hours ago
Comment by lpcvoid 3 hours ago
I would have enjoyed your lines of gibberish far more than the slop that Claude spit out.
But it's a cool project, thank you for sharing.
Comment by dale_glass 3 hours ago
Comment by boznz 1 hour ago
Comment by malicka 3 hours ago
Comment by Serhii-Set 4 hours ago
Comment by whattheheckheck 2 hours ago