MegunoLink’s Property Table visualizer lists name/value pairs in a table. MegunoLink continuously looks at data in the serial stream from your Arduino for specially formatted commands to populate the table. The Property Table visualizer is useful for:
- Displaying current settings such as a temperature set-point
- Reporting state, such as battery voltage or motor direction
- Providing a summary of the last action your program took such as the speed and motor direction a linear stage was moved
Each row of a table lists a name, value and description. MegunoLink identifies each row by its name. So when you want to update the row, you supply the name and a new value and/or description:
MyTable.SendData("Battery voltage", 3500, "mV");
Creating a Property Table Visualizer
Select Property Table from the visualizer menu or toolbox to add a new property table visualizer window to your MegunoLink project. You can add as many table windows as you like. Use message channels in your Arduino sketch to control the data sent to each visualizer.
Drag the visualizer tab to organize the windows in your MegunoLink project.
Property table controls can also be added to interface panels.
Sending Data from an Arduino
Table variable in your Arduino sketch and use its methods to send data and commands to the property table visualizer:
#include "MegunoLink.h"to the top of your Arduino program,
- Create a
SendData, for example, to send a named value to the table in MegunoLink.The property table Arduino reference as details of all the methods available.
int BatteryVoltage = analogRead(A0);
MyTable.SendData(F("Battery voltage"), BatteryVoltage, F("mV"));
The property table visualizer displays a list of name-value pairs in a table. The contents of the table may be freely edited by clicking in any cell. New values can be added either by serial commands received from your Arduino sketch or by entering a name and value pair in the last row.
The table can be sorted by clicking on a column heading. The order of rows can also be customized using the up and down arrow buttons on the toolbar.
Send the value of properties to the connected device. The Send All button sends all of the property values in the table while Send Selected sends only the property values selected.