Transcript
![Page 1: · Web viewSerial.println(time); // wait a second so as not to send massive amounts of data delay(1000); } Verkabelung vom Servo (bei unserem Servo ist das gelbe Kabel orange) Created](https://reader035.vdocument.in/reader035/viewer/2022070607/5aa43c2d7f8b9ae7438bc4df/html5/thumbnails/1.jpg)
Verkabelung mit LED
![Page 2: · Web viewSerial.println(time); // wait a second so as not to send massive amounts of data delay(1000); } Verkabelung vom Servo (bei unserem Servo ist das gelbe Kabel orange) Created](https://reader035.vdocument.in/reader035/viewer/2022070607/5aa43c2d7f8b9ae7438bc4df/html5/thumbnails/2.jpg)
Die beiden Methoden im ProgrammcodeÜbersicht BeispielprogrammBeispiel: LEDHIGH-> LED ist anLOW-> LED ist aus
Konstantenconst-> wird sich nicht ändernBeispiel: const int ledPin=13
![Page 3: · Web viewSerial.println(time); // wait a second so as not to send massive amounts of data delay(1000); } Verkabelung vom Servo (bei unserem Servo ist das gelbe Kabel orange) Created](https://reader035.vdocument.in/reader035/viewer/2022070607/5aa43c2d7f8b9ae7438bc4df/html5/thumbnails/3.jpg)
LED DIMMEN
Verkabelung von dem Infrarotsensor
Weisses Kabel-> analogen Pin (z.B. A0)Schwarzes Kabel-> GNDRotes Kabel-> 5V
![Page 4: · Web viewSerial.println(time); // wait a second so as not to send massive amounts of data delay(1000); } Verkabelung vom Servo (bei unserem Servo ist das gelbe Kabel orange) Created](https://reader035.vdocument.in/reader035/viewer/2022070607/5aa43c2d7f8b9ae7438bc4df/html5/thumbnails/4.jpg)
Interne Stoppuhr
millis()* Mit rückgabewert* Gibt die Zeit an wie lange das Programm durchlaufen ist.*
Beispiel: unsigned long time;
void setup(){ Serial.begin(9600);}void loop(){ Serial.print("Time: "); time = millis(); //prints time since program started Serial.println(time); // wait a second so as not to send massive amounts of data delay(1000); }
![Page 5: · Web viewSerial.println(time); // wait a second so as not to send massive amounts of data delay(1000); } Verkabelung vom Servo (bei unserem Servo ist das gelbe Kabel orange) Created](https://reader035.vdocument.in/reader035/viewer/2022070607/5aa43c2d7f8b9ae7438bc4df/html5/thumbnails/5.jpg)
Verkabelung vom Servo (bei unserem Servo ist das gelbe Kabel orange)