Answer the question
In order to leave comments, you need to log in
MSP430 Lanchpad, how to correctly send data to serial port?
Play around, on occasion I bought Lanchpad MSP430.
So in this kind of thing, a complete zero, slowly master the table.
The diode blinked, reacted to the buttons and met me in the examples of sending messages to the serial port.
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(myStrings[i]);
}
const int ledPin_g = GREEN_LED;
const int ledPin_r = RED_LED;
// variables will change:
char* myStrings[]={
"This is string 1", "This is string 2", "This is string 3",
"This is string 4", "This is string 5","This is string 6"};
void setup() {
pinMode(ledPin_g, OUTPUT);
pinMode(ledPin_r, OUTPUT);
// initialize serial communication:
Serial.begin(9600);
}
void loop() {
for (int i = 0; i < 6; i++){
Serial.println(myStrings[i]);
digitalWrite(ledPin_g, HIGH);
delay(130); // arbitary wait time.
digitalWrite(ledPin_g, LOW);
delay(170); // arbitary wait time.
}
digitalWrite(ledPin_r, HIGH);
delay(100); // arbitary wait time.
digitalWrite(ledPin_r, LOW);
delay(100); // arbitary wait time.
}
Answer the question
In order to leave comments, you need to log in
I don't understand much about this, but I had a similar problem and solved it like this:
TimerSerial mySerial;
void setup() {
mySerial.begin();
mySerial.println("Callibrating");
}
The software I uploaded:
#include <TimerSerial.h>
TimerSerial mySerial;
void setup() {
mySerial.begin();
mySerial.println("Callibrating");
}
void loop() {
Serial.println("Callibrating");
delay(1700);
}
Binary sketch size: 1 732 bytes (of a 16 384 byte maximum)
Erasing...
Programming...
Done, 1732 bytes written
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question