Introduction: Block Programming With MSP430 Launchpad
Designing robot is challenging having to learn about electronic components, circuit diagram, bread boarding and complicated programming syntax and languages.
The idea of Ardublock block programming is to use simplify the programming or coding process to make is easy for makers and beginners alike.
I basically used Ardublock Arduino install instruction for Energia software. And it seems to work.
Energia and Ardublock are both open source (free) software that run on Windows, Mac and Linux platforms.
Arduino and Energia both use Wiring framework for their IDE which makes it possible to use Arduino sketches with Energia software.
Step 1: Requirements
MSP430 Launchpad kit comes with Launchpad board, two DIP chips, USB cable and 32 kHz crystal. All this for $10 with free shipping if ordered directly from Texas Instruments.
Software (free open source) :
Download Energia and Ardublock from above web sites.
Install Energia first as the Ardublock software will need to be placed in Energia environment.
In my example I installed Energia in C:\Energia.
Next, take the downloaded Ardublock *.jar file, in this case called ardublock-beta-20131031.jar, and place it in Energia tools directory, in my case it is C:\Energia\tools\ArduBlockTool\tool directory.
Note the spelling “ArduBlockTool” which is case sensitive.
Step 2: Creating Ardublock Blink Led Blocks
For the test we will make the red led (LED1) on MSP430 Launchpad blink on and off.
Open up Energia software.
From the Tools menu select Ardublock.
Create the block diagram for the blinking test by using the colored block controls.
Click on the control buttons/menu on the left side, select a control, drag and drop the control from the left side to the sketch pad on the right side.
Choose the appropriate pin number to activate. In this case I am activating pin 2 on the Launchpad.
Ardublock creates an Energia sketch called sketch_* with a date name.
Step 3: Upload Blink Sketch to MSP430 Launchpad
Plug in MSP430 Launchpad to your PC USB port.
In Energia Tools/Board menu select the appropriate MSP30 chip you are using.
Verify that Energia Tools/Serial Port is set to a valid com port. This is the port the MSP430 Launchpad should be plugged into. In my PC my Launchpad was plugged to COM4.
We should now be ready to upload Ardublock program to MSP430 board.
In Ardublock click the “Upload To Arduino” button. It says Upload To Arduino since Ardublock was initially developed for Arduino.
Behind the scenes Ardublock will write the blink sketch to Energia and upload the code to the MSP320 Launchpad.
In a few seconds the red led on the MSP430 board should be blinking on and off.
Step 4: Conclusion
You can experiment by changing the pin number to 14 and have Launchpad blink the green led.
Once successful you can build robot with sensors and motor by using MSP430 Launchpad, Energia and Ardublock graphical programming.