Programming
microcontrollers can be a tricky and long process, especially for a
beginner about this field because it requires knowledge of registers,
fuses, specific features, etc. Meanwhile with arduino, it
standardizes its hardware configuration which in turn makes the
device much easier to program and to configure. Therefore, for a novice having an interest in microcontroller programming, arduino is a good
place to start learning.
Related post:
Here
we are going to make a hello world program with this device:
Step
1. open your arduino software, and click File – Examples – Basics
– Blink.
On
the sketch, you can make a bit trials, like changing the delay value
like I do here:
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(100);
The
comment and the code on the arduino sketch examples are self-explain.
In
this step, you will see a compilation process on the screen message
of the arduino
Scroll
up on the screen message until you see ‘Blink.cpp.hex’ like on
figure 3 and copy its location file (including its name) as shown
bellow:
/tmp/build3051087855229231.tmp/Blink.cpp.hex
![]() |
Step 4. Copy & paste the location on arduino-proteus-design |
![]() |
Figure 3. Led design |
The
last step is to run the simulation and you will see the led is
blinking. Here you can experiment the code by changing the delay time
to make the led flash faster or slower, or to change the pin instead
of pin-13 as shown on the figure 3.
0 Comments
Post a Comment