Академический Документы
Профессиональный Документы
Культура Документы
FLICKERING LED
Introduction:
A computer hardware and software company, project, and user
community that designs and manufactures microcontroller kits for building
digital devices and interactive objects that can sense and control objects in
the physical world. The project's products are distributed as open-source
hardware and software, which are licensed under the GNU Lesser General
Public License (LGPL) or the GNU General Public License (GPL), permitting the
manufacture of Gizduino and Arduino boards and software distribution by
anyone. Arduino and Gizduino boards are available commercially in
preassembled form, or as do-it-yourself kits.
The project's board designs use a variety of microprocessors and
controllers. These systems provide sets of digital and
analog input/output(I/O) pins that may be interfaced to various expansion
boards ("shields") and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some
models, for loading programs from personal computers. The microcontrollers
are mainly programmed using a dialect of features from the programming
languages C and C++. In addition to using traditional compiler toolchains,
the Arduino project provides an integrated development environment (IDE)
based on the Processing language project.
Objectives:
1. To be able to familiarize and differentiate the type of LEDS and how it
works.
2. To be able to make LED flickering.
3. To be able to know the importance of Resistors in a circuit.
Materials:
10 LEDS
Cables
330 Resistor
Arduino board
Computer/ Laptop with Arduino software installed
Breadboard
Procedure:
Part 1: Connecting Arduino to the computer
1. Open the Arduino IDE by clicking on the Arduino Icon (software).
2. Connect your Arduino to the computer using the USB cable.
3. Then click on the Sketch menu and check for any typos / errors
using verify button and Compile to the machine language if the
verification is successful.
4. If the above process is successful, you should see the message in
the status bar showing that the compilation is successful.
6. You might face some issues from step 3-5 if you have not selected a
correct board/serial port. So please make sure you went through the
part 1 carefully. Go to the Tools -> Serial Port -> COM number.
7. After checking the serial port, upload it again.
1. In the above Flicker code you see bunch of lines performing certain
operations. In our case, turning on and off an LED connected to the
Digital pin 11.
2. After declaring pin 11 to be your ledPin1, there is nothing to do in
the setup() function of your code.
3. The analogWrite() function that you will be using in the main loop of
your code requires two arguments.
4. Pick a random number between 100-255, then set LED to that
brightness then pick another random number between 10-150. Wait
for that amount of time (in ms).
delay (random(2));
// here we are asking Arduino to wait for 2ms before executing
the next instruction.
Now, try to change the delay times, for both on and off times,
and upload the code again. What did you notice?
References:
http://forum.arduino.cc/index.php?topic=7115.0
https://www.google.com.ph/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=8&cad=rja&uact=8&ved=0ahUKEwiIqovi
1fjRAhVGWLwKHXFTBPcQFghLMAc&url=http%3A%2F%2Fwww.richardvannoy.info
%2Flab-
05.php&usg=AFQjCNFE2i1IYdeFfoLQyo075bnFE_JFWg&bvm=bv.146094739,d.dGc