Jump to content
43oh

actanonverba1977

Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by actanonverba1977

  1. So I'm getting an "X" not declared in this scope error. All I'm trying to do is blink the internal LEDs on my launchpad using external buttons. I know this subject has been brought up before but nothing in the other threads were helpful. I am running Energia 1.8.11E23 on windows 10 and I am using a MSP-EXP430F5529LP.

    My code is as follows:

    int button1 = P2_5;

    Int button2 = P2_4;

    Int button1State =0;

    Int button2State=0;

    void loop() {

    pinMode(LED1,OUTPUT);

    pinMode(LED2,OUTPUT);

    pinMode (button1, INPUT);

    pinMode (button2, INPUT);

    }

    void loop() {

    button1State=digitalRead(button1);

    button2State=digitalRead(button2);

    if (button1State==HIGH)

    { digitalWrite(LED1,HIGH);}

    else 

    {digitalWrite (LED1,LOW);}

    If(button2State==HIGH)

    {digitalWrite (LED2,HIGH);}

    else 

    {digitalWrite (LED2,LOW);}

     

     

     

     

     

     

×
×
  • Create New...