Studio 2 - Circuits & PhysicalComputing - W24
Studio 2 - Circuits & PhysicalComputing - W24
rows 1 to 30: “a” to “e” & “f” to “j” are conductive strips, similar to a piece of wire.
the 4 outer rails “+” and “-” are also conductive strips.
https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard
These two are electrically the
same! But one is much neater.
Looking at the Circuit Diagram is Advantageous!
Looking at the Circuit Diagram is Advantageous!
Studio 2 Task 1
In TinkerCAD use an Arduino Uno,
Breadboard, 3 LEDs (1 green, 2 red)
and 220Ω Resistors, a Push Button
and 10kΩ Resistor.
Red
Create a code that:
when button is pressed, turn “off” Gr
the green LED and blink the two red Red
LEDs. You can choose the blinking
pattern.
When button open/not pressed, the
(green) LED is “on” and the two (red)
LEDS are “off”.
Goal Today
Today we will learn more Arduino Uno using Tinkercad
Circuits:
▪ What is an analog sensor?
▪ How to wire the TMP36 Temperature Sensor
- using a Breadboard
▪ How to create code to Test the sensor
▪ How to Read output using the Serial Monitor
▪ How to wire and use the LCD screen
Review from Studio 1
https://msdn.microsoft.com/en-us/library/dd126856.aspx
http://izalhidayat.student.telkomuniversity.ac.id/files/2015/08/a.jpg
Analog Input and Output pins
Temperature Sensor
TMP36 is a low voltage, precision
centigrade temperature sensor.
http://www.learningaboutelectronics.com/Articles/LM34-
https://www.sparkfun.com/products/10988 temperature-sensor-circuit.php
How do we wire the TMP36?
210 = 1024
03 Convert voltage into temperature using equation from spec sheet
How do we know what the
Arduino is reading??
Serial Monitor
Serial Monitor
baud rate
How to Use the Serial Monitor
01 Initialize the serial monitor in void setup ()
// 9600 is the baud rate
02 Tell the serial monitor what you want to display in void loop()
Test it
out!
LCD Display Using I2C
Communication Protocol
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
GND 0
VCC
SDA
SCL 1
Include LCD I2C Library
Initial message
https://ucdavis.co1.qualtrics.com/jfe/form/SV_8i8nptLBitOIM1U
Your responses will not be shared, they are for internal use only!
Studio 2 HW!
Studio 2 HW Challenge 1
Use the TMP36 and LCD screen to
display the temperature every 5
seconds, in Celsius and Fahrenheit in
the format of ->
Studio 2 HW Challenge 2
Use the TMP36 and LCD screen to
display the following:
“It’s too hot!!” if it’s hotter than 35
deg C
“It’s too cold!” if it’s colder than 10
deg C
“It’s great!!!!” otherwise
The End