Skip to content
This repository was archived by the owner on Sep 22, 2024. It is now read-only.

Files

Latest commit

 

History

History
14 lines (9 loc) · 826 Bytes

Assignment 3.md

File metadata and controls

14 lines (9 loc) · 826 Bytes

Assignment 3

Task 1

Write an Arduino Program with 1 LED and 2 buttons:

  • Button 1: Pressing the button starts or stops reading the status of Button 2.
  • Button 2: Tap the button any number of times.
  • The ON/OFF sequence of Button 2 should be the sequence seen in the LED.
  • That is, if Button 2 is pressed in the following sequence ON-600 OFF-400 ON-500 OFF-3000, the LED should blink with same sequence.

Task 2

Write a program to vary the brightness of an LED using a transistor as an interface. The range of brightness should be divided into 5 levels. The user can input either one, two, ..., fiveto get the brightness of the corresponding levels. If the maximum brightness is 100, each level should be 20. If the user enters three, the brightness should be corresponding to level three, that is, 60.