Node.js and OLED expansion
-
I understand the oled expansion currently only runs with Python, any ideas if/when we can use nodejs? I see there are nodejs packages available on github, but they are only for devices like beaglebone, Intel Edison, etc.
-
@Steve-Fister We are working on javascript wrappers for it. It should be available for release in January.
Cheers!
-
In the meantime you can install node through opkg and drive the display/led through the shell commands. Check this for a reference.
Not the best solution but for now it works.
-
@Daniel-Sitnik omfg.. that sound amazing. This could be useful in lots of contexts until all the js wrappers are available. Thanks for showing us - I'll definitely will give it a try when back home.
-
@Daniel-Sitnik Ahhh! Very interesting! I was looking at using node to execute Python scripts too. This could work... Thanks!
-
Glad to help guys!
-
Hi, for anyone who needs it, I have written a Node.js wrapper that makes use of the shell binary.
Check it out here: https://github.com/jonathan-reisdorf/node-onion-omega-oledI have also just created a big 16x16px font renderer that makes use of the wrapper:
https://github.com/jonathan-reisdorf/node-onion-omega-oled-textFeel free to add your own characters & submit a PR!
-
As a side note, I've also started work on a Johnny-five adapter Omega-io that calls the
fast-gpio
,i2cget
,i2cset
,atty
andsysfs
for access to the Omega2 io. It's still very early, and completely untested at this point, but should be pretty close.In the next version, I'd like to actually add direct bindings to the c libs, but baby-steps come first.
-
@patrick-gunderson nice, that sounds great! (and much more performant than just using the binary)