Good thing to have finally recent Node support. That I think makes the omega the cheapest device able to run node at this time.
The requirement for USB storage is a bit bad, probably having a SD card socket on the board would be a good thing to consider for further iterations.
Thanks anyway to the onion team for the hard work!
Greg
Posts made by Greg Ware
-
RE: Firmware 007: A License to Node
-
RE: Help getting started with programming on the Onion
I put that in better form on my blog here: link text
-
RE: Help getting started with programming on the Onion
@Jeff-Verive , not much, but I've been writing down a cheat-sheet of my own exploration:
-
Connect at 115200 bps with TeraTerm
-
To setup wifi,
run wifisetup command
wifisetup -checkconnection
run ifconfig to verify -
Web interface
root/onioneer -
Upgrade F/W
run oupgrade -check
See https://onion.freshdesk.com/support/solutions/articles/6000069919-how-do-i-update-the-firmware-
Upgrading the firmware will delete/overwrite all of the files that are not in /etc or /usr -
Most built-in linux commands redirect to /bin/busybox (multi-call binary)
-
Update packages list
opkg update
opkg list -
Change Dock RGB LED
expled FF0000 -> red
expled 00FF00 -> green
expled 0000FF -> blue
expled 00FFFF -> cyan
expled FFFF00 -> yellow
expled FF00FF -> purpleThis actually drives pwm GPIO on I/O pins 15,16,17:
fast-gpio pwm 17 200 0
fast-gpio pwm 16 200 100
fast-gpio pwm 15 200 0To flash slowly:
fast-gpio pwm 15 2 80 -> blue
fast-gpio pwm 16 2 80 -> green
fast-gpio pwm 17 2 80 -> red -
OLED expansion
Use oled-exp command
oled-exp -i power on
oled-exp write Hello
oled-exp -c power on cursor 3,6 write "zoulou was here"
oled-exp scroll diagonal-right -
Run in background
To send to background, use Ctrl-z
bg command to resume
jobs command to list
fg %job_id to bring back to front
Or append & at the end of command to put in background directly -
Mosquitto setup
opkg install mosquitto
opkg install mosquitto-client
[opkg install libmosquitto] -> done by install mosquitto-clientsubscribe in background:
mosquitto_sub -v -t /test/#&
publish message:
mosquitto_pub -m 'Hello' -t /test/pub -
Node.js setup
nodejs - 0.1-1 - Event-driven I/O server-side JavaScript environment based on V8
reports v0.10.5 (history says it is 2013-04-26), see https://nodejs.org/en/download/releases//usr/bin/node (or just node, since /usr/bin is in the path)
Test Node, copy this to hello.js
var http = require("http");
http.createServer(function (req, res) {
res.writeHead(200, {"Content-Type": "text/plain"});
res.end("Hello World\n");
}).listen(8000);
Run as node hello.js&npm is supposed to be standard with node.js since 0.6.3, should have npm 1.2.18, not sure how to get it...
-