Hello everyone!
I am currently running into a weird problem with a sketch:
* basically i am sending commands all ending with a newline for end of command("\n") from a python script.
* The newline on the arduino side (whether using the ascii code or simple character compare) is reckognized correctly on
all my other Arduinos
except on the Arduino Pro Mini (8mhz, 3.3V)
* Here is the relevant part of the code:
void loop()
{
while(Serial.available()>0)
{
uint8_t c=Serial.read();
if((c == 10) || (c == 13))
{
parse_command(commandBuffer,commandIndex);
for (int i=0;i<commandIndex;i++)
{
commandBuffer[i]=' ';
}
commandIndex=0;
}
else
{
commandBuffer[commandIndex]=c;
commandIndex++;
}
}
}
I am completely baffled by what is going on so if anyone has an idea, i would be very glad !
Thanks in advance!