Practice Problems
Practice Problems
PRACTICE PROBLEMS
Name : Date :
Regd-No :
OBJECTIVES:
To practice and learn the programming problems
DESCRIPTION:
For every programming problem, you will be required to do the following:
1. Create a block / flow diagram
2. Make a circuit diagram (only if required)
3. Write the pseudo code
4. Write the code according to any controller you are using (either Assembly or
C language)
Example Problem 1:
Consider an LED attached to pin 10 of the
controller. Write a code to flash the LED for 0.5
seconds after every 1 second.
Solution:
1. Flow Chart:
3. Programming Code
int LED = 10;
void setup()
{
pinMode(LED,OUTPUT); // makes pin10 an output pin
}
void loop()
{
digitalWrite(LED,HIGH); // making pin 10 HIGH
delay(500); // delay for 500ms
digitalWrite(LED,LOW); // making pin 10 LOW
delay(1000); // delay for 1000ms
}
1. Show the general layout of the required system based on Arduino Uno Board?
2. Draw a flow chart for the desired operation of the system.
3. What type of C instructions suggested to be used to implement such system?