EasyManuals Logo

Texas Instruments MSP430 Student Guide

Texas Instruments MSP430
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #383 background imageLoading...
Page #383 background image
Lab 8
Gettings Started with the MSP430 - Using Energia (Arduino) 8 - 25
5. A couple more items to notice…
Just like standard C code, we can create variables. What is the global variable used for in this
example?
_________________________________________________________________________
Finally, this is a very simple way to read and respond to a button. What would be a more
efficient way to handle responding to a pushbutton? (And why would this be important to
many of us MSP430 users?)
________________________________________________________________________
_________________________________________________________________________
(Note, we will look at this ‘more efficient’ method in a later part of the lab.)
Reverse button/LED action
Do you find this example to be the reverse of what you expected? Would you prefer the LED to
go ON when the button is pushed, rather than the reverse. Let’s give that a try.
6. Save the example to sketch new file before modification.
Once again, we recommend saving the original sketch before modification. Save it to:
C:\msp430_workshop\<target>\energia\Button_reversed
7. Make the LED light only when the button is pressed.
Change the code as needed.
Hint: The changes required are similar to what you would do in C, they are not unique to
Energia/Arduino.
8. When your changes are finished, upload it to your Launchpad.
Did it work? _______________________________________________________________

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals