MSP430G2 blinky led example

This is a basic ‘hello world’ example for the MSP430G2 LaunchPad, this example uses the Energia development environment.

This is a first example I’ll be bringing more examples using this board fairly soon

In the schematic below you can see I’ve simply connected an LED to P1.7

Schematic

 

Code

This code was written in Energia available from http://energia.nu/

[codesyntax lang=”cpp”]

// the setup routine runs once when you press reset:
void setup() 
{                
  // initialize the digital pin as an output.
  pinMode(P1_7, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(P1_7, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(P1_7, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

[/codesyntax]

 

Links

T1 MSP-EXP430G2 LaunchPad Value Line Development Board Texas Instruments msp-exp430g2 launchpad

msp430 development board msp-exp430g2 launchpad

This div height required for enabling the sticky sidebar
Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views :