filmov
tv
02 Arduino Analog Read Serial Tutorial

Показать описание
Welcome everyone
In my previous video we used an Arduino to blink an LED
Today's build is another simple circuit
We are going to read a value of a photo resistor on our Computer
We will need the following
A 10K resistor
A Photo resistor
A bread board
and an Arduino
First lets connect the photo resistor
from a terminal strip to a positive rail
Then the 10K resistor between the
ground and the photo resistor
Grab a couple of Jumper wires
connect one between the Positive rail
and the 5v on the Arduino
Connect the other from ground
to the negative rail of the Breadboard
Connect one last jumper wire from the A0 pin to the terminal strip
And that it! We are all done with the circuit
Lets plug it in and have a look
at the Arduino IDE
Open up the example file Analog input read
from the File, examples,Basics menu
In the setup function there is code to start serial communications
and in the loop function there is a line of code to read the input
and then send that value to the serial port
We will be using the serial monitor to read those values
First verify the code
then upload the sketch to the arduino
Once the sketch is running on the arduino
open up the serial monitor from the tools menu
this shows a running value of the Photo resistor
If I put the photo-resistor in shadow the value in the serial monitor drops
If I shine a laser pointer on it the value increases
See how the value fluctuates as I shake?
In my next video see how I make a laser tripwire
using what we have learned about a photo resistor
Tobu & Itro - Sunburst [Creative Commos Music] by Creative Commons Music is licensed under a Creative Commons License
Follow Tobu:
@7obu
Follow Itro:
@itro
In my previous video we used an Arduino to blink an LED
Today's build is another simple circuit
We are going to read a value of a photo resistor on our Computer
We will need the following
A 10K resistor
A Photo resistor
A bread board
and an Arduino
First lets connect the photo resistor
from a terminal strip to a positive rail
Then the 10K resistor between the
ground and the photo resistor
Grab a couple of Jumper wires
connect one between the Positive rail
and the 5v on the Arduino
Connect the other from ground
to the negative rail of the Breadboard
Connect one last jumper wire from the A0 pin to the terminal strip
And that it! We are all done with the circuit
Lets plug it in and have a look
at the Arduino IDE
Open up the example file Analog input read
from the File, examples,Basics menu
In the setup function there is code to start serial communications
and in the loop function there is a line of code to read the input
and then send that value to the serial port
We will be using the serial monitor to read those values
First verify the code
then upload the sketch to the arduino
Once the sketch is running on the arduino
open up the serial monitor from the tools menu
this shows a running value of the Photo resistor
If I put the photo-resistor in shadow the value in the serial monitor drops
If I shine a laser pointer on it the value increases
See how the value fluctuates as I shake?
In my next video see how I make a laser tripwire
using what we have learned about a photo resistor
Tobu & Itro - Sunburst [Creative Commos Music] by Creative Commons Music is licensed under a Creative Commons License
Follow Tobu:
@7obu
Follow Itro:
@itro
Комментарии