0% Complete
0/25 Steps

Activity: Count when Pressed

Here is a challenging task for you.

Using the last circuit you have made, count the number of times switch is pressed on the serial monitor. Here are a few things you have to keep in mind while programming:

  1. Counting should be done only when the switch is pressed.
  2. Switch pressed one time will be counted only once, doesn’t matter if it is pressed for 1 second or 10 seconds.
  3. The count should be displayed on the serial monitor when the switch is pressed, not everytime loop executes.

Pull Down Switch

You can use the below program to start with:

After writing the program you have to save it and upload it here as the assignment. 

Submitting the assignment is a must in order to receive the certificate after completing the course.

Follow the steps below to upload your assignment:

  1. Click on Choose File.
  2. Select your image from the pop-up window that opens up.
  3. Once the image is selected, click on Upload Assignment.
evive Alert
File types which are allowed are INO. The maximum file size allowed is 3 MB.

Good luck!

Log in with your credentials

or    

Forgot your details?

Create Account