Page 63 - Robo_Genius_V1.0_flipbook_C8
P. 63

Step 4 Click on the Sensor option, drag the read LDR block, and drop it inside the first empty
                          space of the comparison operator. Change the pin from A0 to A3. Then, click on the Math
                          option, drag the number block, and drop it inside the second empty space of the comparison
                          operator. Change the value from 0 to 255. Also, change the comparison operator from =
                          (equal) to < (less than).






















                 Step 5  Click on the gear icon on the if block, and add an else block to the if condition.

























                 Step 6  Click on the Output tab, drag the Set LED on block, set it to HIGH, and drop it inside the
                          if condition. Change the pin from 0 to pin 8. Similarly, drag the Set LED block again from
                          the output tab, change the pin number to 8, set it to LOW, and attach it inside the else
                          condition.




















                                                                           Programming with Tinker Orbits Kit  61
   58   59   60   61   62   63   64   65   66   67   68