This is the client code and vairous bits of hardware stuff for the london hackspace network bandwidth meter.
The code for the mbed can be found here:
You might need to download http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib to /var/lib/mibs/iana
each command starts with a single letter and ends with newlines or carrage returns
't' switch on num leds of the top led strip. num is between 0-16 inclusive.
e.g. "t8" would switch on the first 8 leds.
'b' switch on num leds of the bottom led strip. num is between 0-16 inclusive.
e.g. "b16" would switch on all the bottom leds.
's'<'t'|'b'>rgbrgbrgbrgbrgbrgbrgbrgbrgbrgbrgbrgbrgbrgbrgbrgb Sets the leds on a strip to the 12 bit hex rgb value.
- "stf00f00f00f00f00f00f00f00f00f00f00f00f00f00f00f00" set the top strip to all red
- "sbf0ff0ff0ff0ff0ff0ff0ff0ff0ff0ff0ff0ff0ff0ff0ff0f" set the bottom strip to all purple
- "st000111222333444555666777888999aaabbbcccdddeeefff" set the top strip to gradually increasing white brightnesses
'e' (no args). switches all leds to a nice EMF blue colour.
'w'. Writes "text" to the vfd starting at the current cursor position.
e.g. "wfish" would print "fish" on the vfd
'p' ,. sets the vfd cursor position to x,y, x is 0 to 19 inclusive, and y is 0 to 3 inclusive. 0,0 is at the top left.
- "p0,0" set the cursor to the origin.
- "p0,3" set the cursor to the beginning of the bottom line.
'r' (no args). toggles the VDF reset pin and then waits for it to come back online.
'c' (no args). clears all text on the vfd. does not reset the cursor position.
don't use snmp and instead get the stats from the kernel directly.
- double check the counter wrapping stuff
- get the actual line speed from the adsl modem rather than hardcodeing it.
The net-snmp code on linux only updates the network stats every 15 secs...
publish the mbed code and add the url here
- work out wtf's up with the busy signal
finish arbatry colour code
- gamma correction and other colour fiddling?
- possibly re-write to use ethernet.
- upgrade mbed firmware: https://mbed.org/handbook/Firmware-LPC1768-LPC11U24