Confusing bug
hi everyone,
i'm hardware designer, project i'm working on @ work requires me write software. i've got small snippit of code not working, , have no idea why.
when run code, get;
"invalid command" not appear anywhere else in code, must entering if statement. however, if entering if, receivedchars[7] couldn't 66, is.
does have idea might going on?
thank you!
i'm using hterm input , output data on usb arduino
i'm hardware designer, project i'm working on @ work requires me write software. i've got small snippit of code not working, , have no idea why.
code: [select]
if (receivedchars[7] != 66 || receivedchars[7] != 68) //66 = change disp, 68 = change brightness
{
serial.print("invalid command");
serial.print('\n');
serial.write(receivedchars[7]);
}
else
when run code, get;
code: [select]
invalid command
66
"invalid command" not appear anywhere else in code, must entering if statement. however, if entering if, receivedchars[7] couldn't 66, is.
does have idea might going on?
thank you!
i'm using hterm input , output data on usb arduino
Arduino Forum > Using Arduino > Project Guidance > Confusing bug
arduino
Comments
Post a Comment