Using a Customizable Interface Development Tool with Arduino

Development tools that let you create drag-and-drop interface tools for Arduino and Raspberry Pi projects are quite popular. I got my hands on one to use in a unique chemistry project—here's how it went.

A few months ago I was confronted with an interesting challenge. I teach at a STEM-oriented after-school club and a student explained that he was making bismuth crystals and needed help with a somewhat unique problem.

If you don't remember from chemistry class (I didn't), bismuth is an element, atomic number 83. It is a silver-colored, soft metal which is solid but brittle at room temperature. If you melt it down and then let it cool, it will form crystals. Due to oxidation, the crystals will take on some surprising colors, from pink to green to blue. My student was making the crystals and selling them, but wanted a way to monitor and record the temperature of the metal as it heated and cooled. This way, if he got a crystal he liked, he could attempt to replicate it.

Some time later, we had a couple of Python scripts that would monitor the temperature, displaying it as a line graph on the computer screen and recording it to a CSV file for future reference. It wasn't pretty, but it worked. Since then, I've gone back and replaced all of our messy code with a single program: MegunoLink.

What Does It Do?

MegunoLink is a pretty cool program that allows you to create an on-screen interface for your project. It's compatible with just about any board that has a serial connection to the computer, including most Arduino boards and the Raspberry Pi. It can connect over USB, UDP network connections, and the XBee Series 2.
In my case, I am simply using an Arduino Uno, along with a photoresistor I had lying around.


My photoresistor setup

MegunoLink is, in essence, a smarter version of the serial monitor in the Arduino IDE. It reads all communications coming from the board and can send messages back. With MegunoLink, however, you preface each line of information with a special tag which tells the computer what the numbers and text in that line mean.
You create a quick drag-and-drop layout on screen, made up of various "panels". You can use anything from simple serial monitors to a few different kinds of graphs, or even maps if your board is passing GPS coordinates.
MegunoLink then takes that information and, based on the tag, sends it to the correct "panel" on screen. Sound complicated? No stress. If you're using Arduino, they have a library with a bunch of pre-made functions to make the process quick and easy.

Code

A program set up for MegunoLink is pretty much the same as what you might use for any other project. Note that I created a "TimePlot" object and that, instead of printing to Serial, I used the functions from the MegunoLink library.

                    #include "MegunoLink.h"

int tmpsns = A1;

TimePlot tempPlot("tmp");

void setup() {
  pinMode(tmpsns, INPUT);
  Serial.begin(115200);                   //pick your favorite baud rate!
}

void loop() {
  int tempRead = analogRead(tmpsns);      //read sensor
  tempPlot.SendData("Temp", tempRead);    //send data to plot
  delay(100);
}
                  

Reading Outputs from a Project

Upload your code, launch MegunoLink, then drag and drop a few panels to get things how you want them. To get some data that would be worth looking at, I just waved my hand around above the sensor a bit.
Among our panels for this project, we have a basic serial monitor. Note the way that the data is tagged.



If you wanted to forgo the provided library, or if you were using a different device, you would just use a normal serial print statement to send these messages (where the number at the end of each line is the actual reading from the sensor and the rest of the line is the tags for MegunoLink).
From that data, MegunoLink constructs a simple time plot. I left most of the settings at their defaults, but virtually everything about this plot is customizable, from the labels and limits on the axes to the colors of the plot and the shapes of the points. You can zoom and pan or even export the data to a CSV file with one of the buttons at the top.
If you need, you can even handle more than one graph at a time, whether you want them in separate panels or overlaid in the same panel. You can also use the tags on the data to direct the information to a table, to a specific serial monitor, or to a standard x,y plot (you would, of course, need to supply the value for both axes).



Providing Input to a Project

You can also do some cool stuff using MegunoLink as an input for your project. You can add an interface panel, drag buttons, sliders, drop boxes, checkboxes, labels, text boxes, progress bars—you name it. You can then specify what each control does by defining a string for it to send over serial.
For example, I created a panel with three buttons.



Each button sends a simple message—for example, "red", "blue" and "green"—and my Arduino is programmed to listen for those messages on the serial line. When one is received, it completes a specific action. In this case, these messages toggle an LED of the appropriate color. I had a lot of fun with this one, including hooking up a robot arm with buttons and sliders to control each of its joints. The are loads of possibilities.

Of course, the program isn't suited for every application. If you're just blinking a light, MegunoLink may be more complexity than your project needs. It's also only compatible with Windows and does require a bit of installation, but it does its job well. If you're looking for an easier way to read data from or send input to your Arduino or Raspberry Pi project, MegunoLink could be a good fit for you.

MegunoLink has a free trial if you'd like to try it on one of your projects. Do you have a favorite interface development tool for Arduino or Raspberry Pi, especially one that works on Mac or Linux? Let us know in the comments!
Previous
Next Post »
My photo

Hi, I`m Sostenes, Electrical Technician and PLC`S Programmer.
Everyday I`m exploring the world of Electrical to find better solution for Automation. I believe everyday can become a Electrician with the right learning materials.
My goal with BLOG is to help you learn Electrical.
Related Posts Plugin for WordPress, Blogger...

Label

KITAIFA NEWS KIMATAIFA MICHEZO BURUDANI SIASA TECHNICAL ARTICLES f HAPA KAZI TU. LEKULE TV EDITORIALS ARTICLES DC DIGITAL ROBOTICS SEMICONDUCTORS MAKALA GENERATOR GALLERY AC EXPERIMENTS MANUFACTURING-ENGINEERING MAGAZETI REFERENCE FUNDAMENTAL OF ELECTRICITY ELECTRONICS IOT ELECTRICAL ENGINEER MEASUREMENT VIDEO ZANZIBAR YETU TRANSDUCER & SENSOR MITINDO RENEWABLE ENERGY ARDUINO AUTOMOBILE SYNCHRONOUS GENERATOR ELECTRICAL DISTRIBUTION CABLES DIGITAL ELECTRONICS AUTOMOTIVE PROTECTION SOLAR TEARDOWN DIODE AND CIRCUITS BASIC ELECTRICAL ELECTRONICS MOTOR SWITCHES CIRCUIT BREAKERS CIRCUITS THEORY MICROCONTROLLER PANEL BUILDING ELECTRONICS DEVICES MIRACLES SWITCHGEAR ANALOG MOBILE DEVICES CAMERA TECHNOLOGY GENERATION BATTERIES FREE CIRCUITS INDUSTRIAL AUTOMATION SPECIAL MACHINES WEARABLES COMMUNICATION ELECTRICAL SAFETY ENERGY EFFIDIENCY-BUILDING DRONE NUCLEAR ENERGY CONTROL SYSTEM FILTER`S SMATRPHONE BIOGAS POWER TANZIA BELT CONVEYOR MATERIAL HANDLING RELAY ELECTRICAL INSTRUMENTS PLC`S TRANSFORMER AC CIRCUITS CIRCUIT SCHEMATIC SYMBOLS DDISCRETE SEMICONDUCTOR CIRCUITS WIND POWER C.B DEVICES DC CIRCUITS DIODES AND RECTIFIERS FUSE SPECIAL TRANSFORMER THERMAL POWER PLANT cartoon CELL CHEMISTRY EARTHING SYSTEM ELECTRIC LAMP FUNDAMENTAL OF ELECTRICITY 2 BIPOLAR JUNCTION TRANSISTOR ENERGY SOURCE 555 TIMER CIRCUITS AUTOCAD C PROGRAMMING HYDRO POWER LOGIC GATES OPERATIONAL AMPLIFIER`S SOLID-STATE DEVICE THEORRY DEFECE & MILITARY FLUORESCENT LAMP HOME AUTOMATION INDUSTRIAL ROBOTICS ANDROID COMPUTER ELECTRICAL DRIVES GROUNDING SYSTEM BLUETOOTH CALCULUS REFERENCE DC METERING CIRCUITS DC NETWORK ANALYSIS ELECTRICAL SAFETY TIPS ELECTRICIAN SCHOOL ELECTRON TUBES FUNDAMENTAL OF ELECTRICITY 1 INDUCTION MACHINES INSULATIONS ALGEBRA REFERENCE HMI[Human Interface Machines] INDUCTION MOTOR KARNAUGH MAPPING USEUL EQUIATIONS AND CONVERSION FACTOR ANALOG INTEGRATED CIRCUITS BASIC CONCEPTS AND TEST EQUIPMENTS DIGITAL COMMUNICATION DIGITAL-ANALOG CONVERSION ELECTRICAL SOFTWARE GAS TURBINE ILLUMINATION OHM`S LAW POWER ELECTRONICS THYRISTOR USB AUDIO BOOLEAN ALGEBRA DIGITAL INTEGRATED CIRCUITS FUNDAMENTAL OF ELECTRICITY 3 PHYSICS OF CONDUCTORS AND INSULATORS SPECIAL MOTOR STEAM POWER PLANTS TESTING TRANSMISION LINE C-BISCUIT CAPACITORS COMBINATION LOGIC FUNCTION COMPLEX NUMBERS ELECTRICAL LAWS HMI[HUMANI INTERFACE MACHINES INVERTER LADDER DIAGRAM MULTIVIBRATORS RC AND L/R TIME CONSTANTS SCADA SERIES AND PARALLEL CIRCUITS USING THE SPICE CIRCUIT SIMULATION PROGRAM AMPLIFIERS AND ACTIVE DEVICES BASIC CONCEPTS OF ELECTRICITY CONDUCTOR AND INSULATORS TABLES CONDUITS FITTING AND SUPPORTS CONTROL MOTION ELECTRICAL INSTRUMENTATION SIGNALS ELECTRICAL TOOLS INDUCTORS LiDAR MAGNETISM AND ELECTROMAGNETISM PLYPHASE AC CIRCUITS RECLOSER SAFE LIVING WITH GAS AND LPG SAFETY CLOTHING STEPPER MOTOR SYNCHRONOUS MOTOR AC METRING CIRCUITS BASIC AC THEORY BECOME AN ELECTRICIAN BINARY ARITHMETIC BUSHING DIGITAL STORAGE MEMROY ELECTRICIAN JOBS HEAT ENGINES HOME THEATER INPECTIONS LIGHT SABER MOSFET NUMERATION SYSTEM POWER FACTORS REACTANCE AND IMPEDANCE INDUCTIVE RESONANCE SCIENTIFIC NOTATION AND METRIC PREFIXES SULFURIC ACID TROUBLESHOOTING TROUBLESHOOTING-THEORY & PRACTICE 12C BUS APPLE APPS & SOFTWARE BATTERIES AND POWER SYSTEMS ELECTROMECHANICAL RELAYS ENERGY EFFICIENCY-LIGHT INDUSTRIAL SAFETY EQUIPMENTS MEGGER MXED-FREQUENCY AC SIGNALS PRINCIPLE OF DIGITAL COMPUTING QUESTIONS REACTANCE AND IMPEDANCE-CAPATIVE RECTIFIER AND CONVERTERS SEQUENTIAL CIRCUITS SERRIES-PARALLEL COMBINATION CIRCUITS SHIFT REGISTERS BUILDING SERVICES COMPRESSOR CRANES DC MOTOR DRIVES DIVIDER CIRCUIT AND KIRCHHOFF`S LAW ELECTRICAL DISTRIBUTION EQUIPMENTS 1 ELECTRICAL DISTRIBUTION EQUIPMENTS B ELECTRICAL TOOL KIT ELECTRICIAN JOB DESCRIPTION LAPTOP THERMOCOUPLE TRIGONOMENTRY REFERENCE UART WIRELESS BIOMASS CONTACTOR ELECTRIC ILLUMINATION ELECTRICAL SAFETY TRAINING FILTER DESIGN HARDWARE INDUSTRIAL DRIVES JUNCTION FIELD-EFFECT TRANSISTORS NUCLEAR POWER VALVE WWE oscilloscope 3D TECHNOLOGIES COLOR CODES ELECTRIC TRACTION FLEXIBLE ELECTRONICS FLUKE GEARMOTORS INTRODUCTION LASSER MATERIAL PID PUMP SCIENCE SEAL ELECTRICIAN CAREER ELECTRICITY SUPPLY AND DISTRIBUTION FEATURED MUSIC NEUTRAL PERIODIC TABLES OF THE ELEMENTS POLYPHASE AC CIRCUITS PROJECTS REATORS SATELLITE STAR DELTA VIBRATION WATERPROOF