Sende senden nun eine fortlaufende Nummer zusammen mit ihrer ID
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -8,7 +8,7 @@ int id = 0;
|
||||
int baud = 19200;
|
||||
int enable = 2;
|
||||
char c;
|
||||
|
||||
int counter = 0;
|
||||
void setup(){
|
||||
pinMode(A0,INPUT);
|
||||
id = analogRead(A0)*10;
|
||||
@@ -32,9 +32,12 @@ void loop(){
|
||||
printSerial();
|
||||
delay(id);
|
||||
digitalWrite(enable,HIGH);
|
||||
mySerial.write("Howdy, this is Arduino #");
|
||||
mySerial.println(id);
|
||||
mySerial.print("Arduino #");
|
||||
mySerial.print(id);
|
||||
mySerial.print(": Counter = ");
|
||||
mySerial.println(counter);
|
||||
mySerial.flush();
|
||||
digitalWrite(enable,LOW);
|
||||
printSerial();
|
||||
counter++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user