Using digitalRead(), you can read the 3 pins that the switches are attached to, each pass through loop. I also presume that the Arduino has 3 switches connected to it, each of which "selects" an answer. I presume you mean that each slide has one question, with three possible answers, only one of which is right. Each slide has 3 questions, but only one right answer. With a 16MHz crystal, loop could be called millions of times per second, providing you don't do anything to appreciably slow it down like analogRead(), Serial.print(), or (worst of all) delay(). The Arduino sketch consists of a setup() function that is called once, and a loop() function that is called in an infinite loop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |