Serial monitor

Hello, i want to send some informations to some variables in arduino.
for example i want to send those values 255 -15 10 8.5 from serial monitors to specefic variable on arduino.

please could you help me :slight_smile:
thanks

ivoid setup() {
// put your setup code here, to run once:
float a,b,c,d;

}

void loop() {

// after the variable get those values
a=255;
b=-15;
c=10;
d=8.5

}

What you want is something like

float a,b,c,d;
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
a=Serial.parseFloat();
b=Serial.parseFloat();
c=Serial.parseFloat();
d=Serial.parseFloat();
}

void loop() {
// the variables have gotten get those values
// a=255;
// b=-15;
// c=10;
// d=8.5
}

@John: does that work? I tried it on 1.6.5 and I get nothing.

what i want that i can change the value in every time when the program is runing

Delta_G (in reply #1) referred to an article to read; as there was no link: Serial Input Basics

Have a look at Serial Input Basics. It also includes a parse example.

...R

Thanks