Page 304 - Tasarım Beceri Atölyeleri Öğretmen El Kitabı
P. 304

Serial.begin(9600);

               pinMode(2,OUTPUT);

               pinMode(3,OUTPUT);

               pinMode(4,OUTPUT);
               pinMode(5,OUTPUT);

               }



               void loop() {

               while (Serial.available())
               {

               delay(3);

               char c = Serial.read();

               readvoice += c;

               }


               if(readvoice.length() > 0)

               {

               Serial.println(readvoice);

                if(readvoice == “forward”)

               {

               digitalWrite(2, HIGH);
               digitalWrite(3, LOW);






           296
   299   300   301   302   303   304   305   306   307   308   309