1
TITLE: INTRODUCTION TO ARDUINO MICROCONTROLLER
SIMULATOR
Learning Outcome: 1. To identify the structure of Arduino microcontroller simulator (CLO3)
2. To identify the function of Arduino microcontroller simulator. (CLO3)
Tools :
Software
Arduino IDE
Arduino Simulator (UnoArduSim.exe)
Procedures :
ACTIVITY : USING THE ARDUINO SIMULATOR
1. Install Arduino Software.
2. Run UnoArduSim.exe program on your computer. Arduino UNO board will be
displayed as the simulator is only capable to simulate the Arduino UNO board.
3. Go to File -> Load INO or PDE program -> Program Files(x86) -> Arduino -> Select
Examples -> 01.Basics -> Blink from Arduino default folder. A sketch will be opened
up.
4. Click ‘Run’ icon (the light green/red down-pointing-arrow icon).
5. Visualize the result. You should see that the yellow on board LED blinks with one
second of delay between on and off period.
OBSERVATION Marks (1m)
Step 5: LED will be blink in one second according to the program (Press
downward/green arrow button will blinking the LED until the stop
button is press however the red arrow button it will display the
sequence of blinking the LED only once and needed to press it
again).
, 1
First LED
Second LED
On Board LED
6. Change the First LED input box to ‘13’. Visualize what happens.
OBSERVATION Marks (1m)
LED on pin 13 for first input box will be blink when press the
Step 6: green/red arrow button during one second of delay.
7. Enter the code editor by clicking ‘File -> Edit/View menu. Alternately, you can
doubleclick the sketch line to get the same result. After the View/Edit Program
window has appeared, edit the code so that pin 12 on the Arduino board follows the
behavior of pin 13 (Hint: pinMode, digitalWrite). Click ‘Adopt’ once you have done
editing. Change the Second LED input box to 12 to make the output becomes visible.
OBSERVATION Marks (1m)
The LED on pin 12 for second box is blinking according to the
Step 7: program.
8. Alter the code once again to make the Second LED blinks alternately to the First LED.
Modified Coding Marks (1m)
void setup()
{
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever void
loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH
Step 8: is the
voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the
voltage LOW
delay(1000); // wait for a second
digitalWrite(12, HIGH); // turn the LED on (HIGH is the
voltage level)
delay(1000); // wait for a second
digitalWrite(12, LOW); // turn the LED off by making the
voltage LOW
delay(1000); } // wait for a second
OBSERVATION Marks (1m)
TITLE: INTRODUCTION TO ARDUINO MICROCONTROLLER
SIMULATOR
Learning Outcome: 1. To identify the structure of Arduino microcontroller simulator (CLO3)
2. To identify the function of Arduino microcontroller simulator. (CLO3)
Tools :
Software
Arduino IDE
Arduino Simulator (UnoArduSim.exe)
Procedures :
ACTIVITY : USING THE ARDUINO SIMULATOR
1. Install Arduino Software.
2. Run UnoArduSim.exe program on your computer. Arduino UNO board will be
displayed as the simulator is only capable to simulate the Arduino UNO board.
3. Go to File -> Load INO or PDE program -> Program Files(x86) -> Arduino -> Select
Examples -> 01.Basics -> Blink from Arduino default folder. A sketch will be opened
up.
4. Click ‘Run’ icon (the light green/red down-pointing-arrow icon).
5. Visualize the result. You should see that the yellow on board LED blinks with one
second of delay between on and off period.
OBSERVATION Marks (1m)
Step 5: LED will be blink in one second according to the program (Press
downward/green arrow button will blinking the LED until the stop
button is press however the red arrow button it will display the
sequence of blinking the LED only once and needed to press it
again).
, 1
First LED
Second LED
On Board LED
6. Change the First LED input box to ‘13’. Visualize what happens.
OBSERVATION Marks (1m)
LED on pin 13 for first input box will be blink when press the
Step 6: green/red arrow button during one second of delay.
7. Enter the code editor by clicking ‘File -> Edit/View menu. Alternately, you can
doubleclick the sketch line to get the same result. After the View/Edit Program
window has appeared, edit the code so that pin 12 on the Arduino board follows the
behavior of pin 13 (Hint: pinMode, digitalWrite). Click ‘Adopt’ once you have done
editing. Change the Second LED input box to 12 to make the output becomes visible.
OBSERVATION Marks (1m)
The LED on pin 12 for second box is blinking according to the
Step 7: program.
8. Alter the code once again to make the Second LED blinks alternately to the First LED.
Modified Coding Marks (1m)
void setup()
{
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever void
loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH
Step 8: is the
voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the
voltage LOW
delay(1000); // wait for a second
digitalWrite(12, HIGH); // turn the LED on (HIGH is the
voltage level)
delay(1000); // wait for a second
digitalWrite(12, LOW); // turn the LED off by making the
voltage LOW
delay(1000); } // wait for a second
OBSERVATION Marks (1m)