Page 101 - KEC Khaitan C8.2 Flipbook
P. 101

Step  1    Open Arduino IDE on your computer.

                 Step  2    Copy and paste the following code:



































                 Step  3    Connect the Arduino board to the computer via USB cable.

                 Step  4    Click Upload to send the program to the Arduino.

                   Checkpoints:
                   If the upload fails, check the correct board and port settings in Tools > Board & Port.




                           PRACTICAL APPLICATIONS

                   Blinking Multiple LEDs at different speeds.

                   Simple Light Show: Turn on and off LEDs in a pattern.

                   Traffic Light Logic: Red, yellow, green in a timed cycle.



                      REVISIT


                   ▶   Outputs toggle devices (like LEDs) ON or OFF.

                   ▶   Wait blocks insert time delays, orchestrating sequences.
                   ▶   Pin assignments must match the physical wiring.
                   ▶   Projects such as a traffic light show how we integrate multiple outputs with carefully planned timing.








                                                                               Controlling Outputs & Managing Timing  99
   96   97   98   99   100   101   102   103   104   105   106