The Why? In my projects I needed a simple tool that could plot real time data
from a microcontroller. There was no such tool available out there.
There are various scripts using Processing and Python that can be used
to plot the data, but nothing that is simple, easy to use and ready out
of the box. The What? SimPlot is a simple plotting tool. This tool is used for visualization of real time data. The tool accepts data over serial port and plots it in real time on the screen. Currently has following features
The Where? Download from: Forum thread for discussion and questions: The How? The tool expects data in a particular format. The data should be in little endian format (ie. first byte is LSB). The tool can plot from one to 4 channels data. Arduino code samples can be found here. Sample pseudo C code to generate
and send proper data packet is given below Packet format to send 1 channel of data int16_t comPkt[130]; //Buffer to hold the packet, note it is 16bit data typecomPkt[0] = 0xCDAB; //Packet Header, indicating start of packet.comPkt[1] = 2; //Size of data payload in bytes.comPkt[2] = (int16_t) Channel1_data; //Channel 1 data. 16bit signed integer Serial_sendBuffer(USART1, (uint8_t *) comPkt, 6);Packet format to send 4 channel of data int16_t comPkt[130]; //Buffer to hold the packet, note it is 16bit data typecomPkt[0] = 0xCDAB; //Packet Header, indicating start of packet.comPkt[1] = 8; //Size of data payload in bytes.comPkt[2] = (int16_t) Channel1_data; //Channel 1 data. 16bit signed integercomPkt[3] = (int16_t) Channel2_data; //Channel 2 data. 16bit signed integercomPkt[4] = (int16_t) Channel3_data; //Channel 3 data. 16bit signed integercomPkt[5] = (int16_t) Channel4_data; //Channel 4 data. 16bit signed integerSerial_sendBuffer(USART1, (uint8_t *) comPkt, 12);Take care of endianess of your microcontroller. The PC is little endian and expects data in that format. The byte stream should look like this
Comments and Suggestions Comments and suggestions are always welcome. Specially suggestions to add features or bug reports. Here is forum posting that can used for comments. http://arduino.cc/forum/index.php/topic,58911.0.html Or leave a suggestion below. |