Help, Serial is only replying 0!
help! serial monitor reporting 0 when pump in letters/numbers
please help, im kinda new!
code: [select]
//this program calculate points on plot should rotate shape to, using arduino purely math co processor!
//this near advanced , 1 plot point @ time, patient!
int x = 0;
int y = 0;
int incominginfo;
int correctedbyte;
void setup() {
serial.begin(4800);
serial.print("hello, welcome transformations rotation calculator. steps: 1, input x , y respectively.");
serial.print("\n");
serial.print("please use numbers when asked.");
}
void loop() {
if (serial.available() > 0) {
// read incoming byte:
incominginfo = serial.read();
if (incominginfo = 10) {
//do nothing
}
else {
incominginfo = correctedbyte;
}
// got:
serial.print("i received: ");
serial.println(correctedbyte);
}
}
please help, im kinda new!
code: [select]
if (incominginfo = 10) {
i not know else might wrong, is. = assignment, == comparison.
the serial input basics thread might of interest.
Arduino Forum > Using Arduino > Programming Questions > Help, Serial is only replying 0!
arduino
Comments
Post a Comment