Flashduino
Demos
- Flashduino Demo 001 (Press the red circle button.) (source)
- Draw Test 001 (Press the red circle button.) (source)
- Flashduino Demo 004 (Press the red circle button.) (source -- needs to have 'demo' sections uncommented) Graphs three channels
Code
- flashduino-2009-03-01a.tgz -- ("Stag Hairdoo") new release with "dispatch" based approach
- flashduino-2009-01-19c.tgz -- ("Tate Modem") third release, 3 real channels, added URL to return all analog values in one response, IP address of device: 192.168.222.222
- flashduino-2009-01-19b.tgz -- ("Tower Bridge") second release, 3 "faked" channels demo
- flashduino-2009-01-19a.tgz -- ("London Fog") first complete release uploaded proof-of-concept
- bin2c.py -- Used to convert .swf file into a form to include in sketch file.
Project Log
( 11 January 2009 )
- Initial upload of some older but tidied up demos.
( 17 January 2009 )
- Uploaded bin2c.py script
( 19 January 2009 )
- Uploaded multi-channel demo
- Uploaded tar file with Arduino sketch, Python .swf generation script and bin2c.py tool. Should work on any official Arduino Ethernet compatible device. Tested on a Arduino Ethernet preview board.
- Uploaded updated versions, including used of PROGMEM required by large .swf file size. (Not that I forgot to do that or anything... :-) )
( 23 February 2009 )
- Fixed bug where the SWF file wouldn't be displayed if one of the other URLs had been accessed previously. @@ TODO: Upload new code.
- Tried out the Arduino Ethernet2 library with my code seemingly successfully, with a saving of 2.5KB.
( 1 March 2009 )
- Developed a new "dispatch" based approach to serving stuff dynamically from the Arduino. It's not perfect, but I think probably better than the previous code. The end result is that you can extend functionality with code mapping from a URL (fragment) to handler function like this:
urlDispatcher.addHandler("/", handleShow); urlDispatcher.addHandler("/r/a/*", handleReadAnalog); urlDispatcher.addHandler("/r/d/*", handleReadDigital);
- I'm not entirely happy about the memory usage but was trying to strike a balance between ease of use and memory usage.
- Uploaded new version of dispatch-based code, the previous code is still included for the moment.
- Current screenshot:
- Could this nascent Arduino HTTP REST API implementation be the beginning of a generic Arduino web framework. And if it is, should it be called Djuino? Many would say no. :-)
( 1 March 2009 )
- With Flash/ming I seem to be unable to use sendAndLoad of a LoadVars object to send using the POST method—it seems to be transformed into a GET method. But if I supply GET as the method then even with an empty set of variables it tacks a question mark ("?") on the end. Gah.
- On the plus side, while it's an ugly URL, this actually works and illuminates an LED on pin 7: http://169.254.254.169/w/d/7/1 And this turns it off: http://169.254.254.169/w/d/7/0 Thrilling.
- EEPROM reading and writing is now working. Not overly happy with how I got it working—trying to avoid boilerplate code led to other "evils"—but will do for now. @@ TODO: Upload code.
( 24 July 2009 )
- Tidied up some tabs and found this example of using the REST API with Javascript from a web page not served off the Arduino:
<html> <head> <style> img#image {visibility: hidden} </style> <script> state = 0; function toggle() { document["image"].src = "http://169.254.254.169/w/d/7/" + state; if (state == 0) { state = 1; } else { state = 0; } return false; } intervalId = 0; function start() { intervalId = setInterval("toggle()",1000) } function stop() { clearInterval(intervalId); } </script> </head> <body> <img name="image" id="image" src="http://169.254.254.169/w/d/7/1" > <p><a href="#" onClick="javascript:toggle();">toggle</a></p> <p><a href="#" onClick="javascript:start();">start</a></p> <p><a href="#" onClick="javascript:stop();">stop</a></p> </body> </html>
Old notes
- LDR --> Graph
- LEDs
- Pushbutton
- MAC monitor
- Script
- Run script when disconnected
- http server
- tftp upload -- Trivial File Transfer Protocol, THE TFTP PROTOCOL (REVISION 2)
- eeprom
- wiz810mj