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 #382 background imageLoading...
Page #382 background image
Lab 8
8 - 24 Gettings Started with the MSP430 - Using Energia (Arduino)
Lab 8b – Pushing Your button
Next, let’s figure out how to use the button on the Launchpad. It’s not very difficult, but since
there’s already a sketch for that, we’ll go ahead and use it.
1. Open the Button sketch (i.e. program).
Load the Button example into the editor.
File Examples 2.Digial Button
2. Try out the sketch.
Before we even examine the code, let’s try it out. (You’re probably just like us … going to try
it out right away, too.)
When you push the button the (GREEN or RED) LED goes (ON or OFF)? ______________
By the way, you probably know this already from earlier in the workshop, but which button are
we using? If you’re using the F5529 Launchpad, then the “user” buttons are called PUSH1
and PUSH2; the example uses PUSH2 (the board silkscreen says P1.1) as shown here:
Examine the code
3. The author of this sketch used the LED in a slightly different fashion.
How is the LED defined differently in the Button Sketch versus the Blink sketch?
_________________________________________________________________________
4. Looking at the pushbutton…
How is the pushbutton created/used differently from the LED? ________________________
_________________________________________________________________________
What “Energia” pin is the button connected to? ___________________________________
What is the difference between INPUT and INPUT_PULLUP? ________________________
_________________________________________________________________________

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