Virtual Panel: PC-Based Control Over Arduino Experiments © MIT

Writing only Arduino code, it is easy to set up control over experiments and display results on your PC's panel application.

  • 5,479 views
  • 0 comments
  • 20 respects

Components and supplies

Apps and online services

About this project

Virtual Panel is a toolbox for experiment control and display. It is a combination of a Windows application and two small Arduino libraries.

Writing only Arduino code, it is easy to set up control over experiments and display results on the panel application on your PC.

The panel allows to select controls from an existing set of displays, LEDs, buttons, sliders and more.

A button click or scroll-bar change causes an event in the Arduino code.

This way you can set up control and output with a minimum of easy understandable extra code.

Experiment

The first intended purpose of the panel is to support experiments, making it quick to setup control and display output. Either as text or as graph.

Prototype

The second purpose is to support prototyping. The panel lets you figure out quickly what controls you need and how they should work. Making the step to a hardware implementation easier. I find, however, that in many cases the VirtualPanel Implementation "will do" and is convenient enough to serve it's purpose.

Walktrough

Features

The VirtualPanel application features 5 panels with different functions:

  • Main Panel

Basic set of Buttons, Displays, Led's and Sliders. This panel is always visible.

  • Monitor Panel

Additional display space (for instance for debugging) and a scroll box for logging.

  • Graph Panel

Graph and draw functionality.

  • Info-Panel

Informational text on your experiment. Including possibility to link to documentation web pages.

  • Message Log Panel

Messages log of communication between Arduino and VirtualPanel.

The Main Panel and Graph Panel feature a predefined set of controls that can be selected from the Arduino. The Monitor- and Info Panel have a defined appearance where the Arduino controls only the content. The Message Log Panel simply log all messages.

Tutorial

In the VirtualPanel examples you find a sequence of examples show how to use the different features.

These examples can easily be adapted or combined to meet your requirements.

In addition you find a set of showcases(only for AVR/Uno, Nano, Mega) turning your Arduino into an oscilloscope, logic analyzer, frequency counter and more.

Programming VirtualPanel

A code example from the tutorial set. This example sets up a panel with just a button a led and a display.

#include "VirtualPanel.h"
bool    Power = false; // Power status
int Value = 0;  // Integer variabel
void setup() 
{
 Panel.begin(); // init port and protocol
}
void loop() 
{
 Panel.receive(); // handle panel events form the panel (must be in the loop)
 if (Power) Value = random(1,100); else Value = 0; // my own proces
 Panel.sendf(Display_1,"%d",Value); // Show Value on display_1
 delay(250); // delay 
}
void PanelCallback(vp_channel event) 
{ 
 switch (event) 
 {
   case PanelConnected: // receive panel connected event
     Panel.send(ApplicationName,"Minimal"); // set the application name
     Panel.send(Led_1,"$OFF"); // Turn Led_1 off (black)
     Panel.send(Button_3,"on/off"); // Button_3 visible and set text "on/off"
   break;
   case Button_3: // Catch button pressed
     Power = !Power;
     if (Power)
       Panel.send(Led_1,"$RED"); // Turn Led_1 on (red)
     else
       Panel.send(Led_1,"$OFF"); // Turn Led_1 off (black)
   break;
 }
}

Auto Connect

On startup the panel automatically looks for a Virtual Panel enabled Arduino board and connects to it when found.

Tested On

The panel library has been tested on UNO, NANO, MEGA, MEGA2560, DUE, ESP8266 and ESP32. Does not (yet) work on Leonardo.

Download / Documentation

In the VirtualPanel Library - examples you find a set of tutorial sketches.

Download: https://github.com/JaapDanielse/VirtualPanel/releases

Documentation: https://github.com/JaapDanielse/VirtualPanel/wiki

Code

Schematics

VirtualPanel only uses the USB/Serial connection
Virtualpanelbanner mzzms4uxmv

Comments

Similar projects you might like

ESP01 Webserver to Control Your Arduino UNO, Mega or Nano

Project tutorial by adamsstephen

  • 2,779 views
  • 3 comments
  • 12 respects

Control an LED with the Remote Control

Project showcase by Nicholas_N

  • 9,163 views
  • 3 comments
  • 16 respects

SERENA: Alarm Control Panel

Project tutorial by Michael Marinis

  • 7,953 views
  • 2 comments
  • 17 respects

Jesty - Control your PC with Gestures

by Mohamed Fadiga

  • 2,735 views
  • 0 comments
  • 6 respects

IoT Based Homemade Robot with Android and Voice Control Tech

Project showcase by Md Amirul Islam

  • 1,363 views
  • 0 comments
  • 5 respects

IR Remote Control for Presentation PC

Project showcase by PiotrSylwesiuk

  • 2,572 views
  • 1 comment
  • 5 respects
Add projectSign up / Login