Introduction: Block Programming With MSP430 Launchpad

This instructables shows how to use Ardublock graphical program with MSP430 Launchpad, a low cost Arduino like microcontroller.

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.

BlogSpot indicates that it is possible to use Ardublock with Energia to program MSP430 Launchpad. However there were no instructions.

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

Hardware:

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) :

Ardublock http://sourceforge.net/projects/ardublock/files/a...

Energia http://energia.nu/download/

 

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.

Comments

author
pvbot made it!(author)2014-04-08

Thanks for catching my typo.

author
aye_dreee_an made it!(author)2014-04-07

Great instructable!

I had to modify the directory path for my setup to work. I placed the ArduBlock-all.jar file here:

"<ENERGIA_INSTALL>\tools\ArduBlockTool\tool"

Note that the deepest/last folder is "tool", not "tools", which is shown in the instructable. Once I changed it, ArduBlock appeared in Energia. (be sure you restart energia after you paste the ArduBlock .jar file into the directory).

Happy Coding!

author
pablo+de+paris made it!(author)2014-03-17

can it be used with an Arduino Uno?

author
pvbot made it!(author)2014-03-18

I believe so, ardublock is written for arduino please see ardublock website.