Saturday, January 19, 2013

Replacing the Serial Monitor

The Arduino development environment is nice in some ways, but the serial monitor sucks. Seriously. It opens by default to 9600 baud with autoscroll, and if the serial port is communicating at any other data transmission rate, the serial monitor spews out nonsense and slows down your computer to the point that it is hard to even move the mouse to the dropdown menu to change the rate to the actual rate being used (e.g. 115,200 baud). Furthermore, it just displays text.

Ideally, we want to be able to graph our data in real time. Can we do this? Yes, there are several options available for alternative displays. One option is an Arduino graphing library known a MegunoLink developed by a third party called Blue Leaf Software (1).

Another option is demonstrated on the Arduino website in a graphing tutorial (2). As shown in this example, Processing  can be used to access data from the serial port and graph it on a computer. Processing is a popular programming language and development environment (3). In fact, the Arduino development environment was based on Processing, according to the Arduino home page (4). It turns out that the Arduino project also has a Processing library that uses Firmata to communicate with the Arduino using Processing code directly (5). Firmata is a generic protocol for communicating with microcontrollers from a computer (6).

There is at least one entire discussion thread on the Arduino forums dedicated solely to replacing the serial monitor (7). One post there mentions the use of Firmata and Silverlight together, although the exact purpose of using this combination of these softwares is not clear.

We are going to explore these various alternatives until we find one that works.

1. http://www.blueleafsoftware.com/Resources/EmbeddedSand/Plotting_Arduino_Data
2. http://arduino.cc/en/Tutorial/Graph
3. http://processing.org/
4. http://www.arduino.cc/
5. http://playground.arduino.cc/interfacing/processing
6. http://www.firmata.org/wiki/Main_Page
7. http://arduino.cc/forum/index.php?topic=122167.0

No comments:

Post a Comment