The purpose of this guide is to get user's up and running with the new MSP432 LaunchPad and Educational BoosterPack MKII. The user will also be exposed to the basics of adding internet connectivity to a design using Temboo.
Before we begin, please ensure you:
1. Download and install the latest version of Energia. Energia can be downloaded from http://energia.nu/download/
a. Below the download links there are specific installation instructions for each operating system version. Please follow these instructions as you may also need to install drivers depending on your OS.
b. NOTE: In Windows, Energia must be installed to a path without spaces in order to function properly.
2. Create an account on Temboo.com.
The goal of this lab is to verify the hardware and software is setup correctly and to give the student a first taste of rapid prototyping in Energia.
1. Plug in your LaunchPad with the supplied USB cable.
2. Open Energia.
3. From the Tools menu at the top of the window, select Boards -> LaunchPad w/ MSP432 EMT (48MHz).
4. From the Tools menu at the top of the window, select Serial Port, and then pick the serial port associated with your MSP432 Launchpad.
5. From the File menu at the top of the window, select Examples -> 01. Basics -> Blink. This will open the blink example program.
6. Examine the code to see the basic structure of the program.
a. All Energia programs have two required functions: setup() and loop(). Setup is run one at startup and then loop runs continuously.
b. pinMode is used to set the direction of a GPIO.
c. digitalWrite is used to set the state of a GPIO.
d. delay pauses execution for a given number of milliseconds.
7. Click the red arrow pointing to the right at the top left of the Energia window. This will compile and upload your program to the board.
8. After programming completes verify that the red LED is blinking on your LaunchPad.
9. To take this a step further try:
a. Fading the LEDs by changing the calls from digitalWrite to analogWrite.
b. Try using the other colored LEDs on the board
The goal of this lab is to familiarize the student with the concept of a BoosterPack and how software libraries can speed development of advanced applications.
1. Plug the Educational BoosterPack MKII into the LaunchPad’s BoosterPack headers.
2. From the File menu at the top of the window, select Examples -> 09.EducationalBP_MKII -> AccelerometerLED
3. Read through the code. There is a line you will need to comment in in order to change the ADC resolution so the example works correctly. Comment in this line before proceeding to the next step.
4. Click the red arrow pointing to the right at the top left of the Energia window. This will compile and upload your program to the board.
5. Verify the color of the RGB LED changes when you tilt the board.
6. Dance around with your LaunchPad like you were at a rave.
7. Experiment with other examples for the Educational BoosterPack. Trying combining multiple examples to build a full application.
a. This time is meant to be free form so you can experiment and learn on your own.
b. If you wish to try once of the LCD examples you'll need to drop
the Screen_HX8353E.cpp (found at the bottom of this page) file into:
The goal of this lab is to introduce the student to the basics of adding internet connectivity to an application.
1. Plug the CC3100 BoosterPack into the bottom of the LaunchPad. The stack should now be:
a. Educational BoosterPack MKII
b. MSP432 LaunchPad
c. CC3100 BoosterPack
If you are at a location that requires your MAC address to be registered before you can connect, download the getMAC program from the bottom of this page, compile, and run it on your LaunchPad. Open the serial monitor and reset the board by pressing the reset push button. The MAC address should now be displayed in the serial terminal. Make note of the address and register your device on the network.
2. Create a new program in Energia (File -> New)
3. Go to your Temboo account and navigate to the Twitter Choreos
a. Once there, go to Tweets, Statuses Update
b. In the top right hand corner, click the IoT Mode switch. Configure the internet connection appropriately for the board and WiFi network you're using.
4. Scroll down this page and copy the contents of the header file box.
5. In Energia, at the top right of the window, click the down arrow and select new tab. Name this new tab TembooAccount.h.
6. Paste the contents of the header file box into this tab.
7. On Temboo, copy the contents of the Code box and paste them into the main sketch file in Energia. Be sure to select everything in that sketch before replacing it with the code from Temboo.
8. Add the following lines to your program:
// Set Choreo inputs
AccessTokenSecretValue = "RzlVqDmPHKaD1L315bvJ2MqhKfJW7Zsr76YfkomuKrL2a";
ConsumerKeyValue = "oa1pgd6ibazJFOa8X9Gp5BrmF";
StatusUpdateValue = "Look ma, I'm on twitter!";
These lines should be placed right before the call to StatusesUpdateChoreo.run() in the loop function. For the tweet to be successful it needs to be unique so please change the text. Twitter will prevent duplicate messages from being sent within a certain timeframe.
9. Compile and upload the code to your board. Open the serial monitor in the top right of the Energia window to view the debug output.
10. If everything looks ok in the serial monitor, go to twitter.com/iotdump and see if your tweet was successful.
11. Experiment by combining this twitter functionality with some of the example for the Educational BoosterPack. For example you could use the LCD_Joystick example to send out the coordinates of the cursor on screen whenever Button 2 is pressed.
a. A completed example of this is provided in the code section below.