Good evening everybody
I come back to you to ask for help.
I'm trying to find how I can get a whole number.
In my program, I have 255 on the monitor
It's juste 3 character, I want the number.
I put on the monitor Rgb(255,213,165)
And I'd like to have just the 3 numbers
ais c'est bien juste 3 caractères
Moi je vous le nombre
Code: [Select]
String monitserie = "";
void setup() {
Serial.begin(9600);
#define red
}
void loop() {
char str[16];
if (Serial.available())
{
monitserie = Serial.readString();
int nbCaract = monitserie.length();
monitserie = monitserie.substring(0, nbCaract-2); // Pour supprimer les caractères cachée \n (Lf 0xA) \r (Cr 0xD)
for(int rouge = 4 ; rouge< 7 ; rouge++)
Serial.print((int) str[4]);
}
}/code]