Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Remotely Control Your LaunchPad with Firmata and Bluetooth

$
0
0
Programming a microcontroller for the first time can be a daunting task. What if you can remotely control your microcontroller by simply clicking few buttons on a PC GUI? 
 
Screenshot.png
 
With Energia support, I was able to port existing Firmata code used for Arduino onto LaunchPads. Firmata is a serial communication protocol that allows a host (PC) sending commands to the microcontrollers (MSP430). You can use it to toggle pins and LEDs, or read digital and analog inputs without writing any C code. This makes it super easy to test out your new sensor or debug your circuit. Bluetooth simply creates a virtual serial port that emulates a physical serial port wire, so you can control and monitor your board remotely.
 
Here is a demo video: 
 
The application GUI is written in NodeJS. The browser is connected to the Node server using web socket. Whenever the user clicks a button, a message is sent to the server and the server will send Firmata commands to the LaunchPad.
 
You can easily expand on top of the demo GUI I created by writing some javascript. Let's say you want to turn on an LED when the temperature is too high. You can let your Node server constantly check the temperature reading. Once it reaches the threshold, then set the LED pin to HIGH. 
 
You can find out the source code of my project at my GitHub page: https://github.com/shengzhao91/FirmataGUI

Viewing all articles
Browse latest Browse all 2077

Trending Articles