Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22021

MSP-EXP430F5529LP: 2 programs running at once

$
0
0
Part Number: MSP-EXP430F5529LP
Other Parts Discussed in Thread: ENERGIA

Tool/software:

Hi. I'm trying to have 2 different programs run at the same time. One Basic Blink and the other Basic DigitalReadSerial using the onboard Push Button on the MSP. These aren't the 2 programs I intend to use for the MSP however I just want 2 small easy test codes to quickly test on how to have 2 programs work together before sending it my main code. Can somebody help me with running these 2 codes at the same time? The codes are here:

Blink:

#define LED RED_LED

void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000); 
digitalWrite(LED, LOW); 
delay(1000); /
}

DigitalReadSerial:

int pushButton = P2_1;

void setup() {
Serial.begin(9600);
pinMode(pushButton, INPUT_PULLUP);
}

void loop() {
int buttonState = digitalRead(pushButton);
Serial.println(buttonState);
delay(1);
}

Like I said they are both very simple codes but just want them to figure out how to have 2 seperate codes function at the same time before trying it with my main codes.

If you can help me that would be amazing! Thank you.


Viewing all articles
Browse latest Browse all 22021

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>