OpenSourceHardware/Arduino

WebSocket SVG Arduino and LabVIEW

MidnightCow 2016. 12. 26. 12:58

WebSocket SVG Arduino and LabVIEW

by SocketMan



Overview

For the time being, this blog will be the only place I post this demo program. Of course you are free to repost or use the code however you wish. Just remember you will need a 100% Arduino-compatible controller (I used the Freetronics Etherten to test the code) with Ethernet or an Ethernet shield to properly run the demo. You will also need the above websocket server library for it to work. Here is a screenshot showing the WebPanel script, SVG document, and Arduino sketch in action:

The script and the little Etherten board work pretty well, as does Per’s websocket library. The WebPanel script is a modified version of the WebPanel 0.1 release. I added a three-line graph SVG object and associated message handler for that object type. I also added a FIFO buffer to the script to create a 100-point long moving “waveform chart” strip-chart style graph. The SVG document is stored on and launched from the host PC.

I made several attempts to create a sketch that serves up the SVG document and script from the Etherten’s micro SD card, but the little controller just does not have enough memory. Everytime I tried to create a File object from the SD library with the websocket server running, the controller abruptly halted. It only has 2K of RAM, and although I tried moving every string constant and char array object to program memory, there still was not enough room. So I plan to get a new controller, either an Arduino Due or a chiKit UNO32 with much more memory.

The goal is to connect my iPad and Kindle Fire HD and have the controller send the GUI SVG document and script. When I get that step finished, I’ll start with a clean slate and create and entirely new script that uses the best elements from all previous releases. The new script will be designed specifically for Arduino-like controllers, but also implement the “no pogramming required” original goal of designing web GUI’s using Inkscap and prebuilt SVG objects.

Getting Ready to Return with New WebPanel!

Sorry I have been away for so long. I’m getting ready to revamp WebPanel with some new graphics, elements and a complete binary or text option. I will split the Javascript engines into two separate scripts, one for text data, the other for binary, and will release both in a brand new version coming soon!!

Source code

https://github.com/ejeklint/ArduinoWebsocketServer

http://svn.evexiallc.com/webpanel/Arduino_Webpanel_Demo.zip

Demo Movie

Learn More

Goto Original