0% found this document useful (0 votes)
28 views

Unoardusim Exercises: Department of Engineering

The document contains 4 questions about Arduino Uno exercises involving calculating the hypotenuse of a right triangle, turning on LEDs in odd and even patterns, adding a switch to select color of LEDs, and using serial input to select color of LEDs.

Uploaded by

Ted Chan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Unoardusim Exercises: Department of Engineering

The document contains 4 questions about Arduino Uno exercises involving calculating the hypotenuse of a right triangle, turning on LEDs in odd and even patterns, adding a switch to select color of LEDs, and using serial input to select color of LEDs.

Uploaded by

Ted Chan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

UNOARDUSIM EXERCISES

Q1. Write a program to calculate the hypotenuse of a right angle triangle. Use Serial Monitor
to perform the input and output.

Q2. Eight leds are connected to a Arduino Uno board. They are labelled 1-8. Write a program
to turn on the odd number leds for 2 seconds, then the even number leds for two seconds.

Q3. Add a switch to the circuit in Q2, such that when switch can select red or yellow leds to
turn on.

Q4. Referring to the circuit in Q2, using Serial input to select red or yellow leds to turn on.

DEPARTMENT OF ENGINEERING

You might also like