This week I experimented with pressure sensor to control the LEDs. I made one with distance sensor on tinkercad as well. But due to my equipment overdue, I wasn’t able to borrow one from the shop 🤫🤫
Codes:
Reference: Youtube
Distance Sensor:
I referred to this link for the circuit and the codes
Notes:
Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647.
pinMode configures the specified pin to behave either as an input or an output
digitalWrite() — Write a HIGH or a LOW value to a digital pin.
Can use a resistor calculator: https://www.calculator.net/resistor-calculator.htmlc
load: the thing we are powering (LED/ other things)
transducer: A transducer is an electronic device that converts energy from one form to another. Common examples include microphones, loudspeakers, thermometers, position and pressure sensors, and antenna.
I love using this website to draw the circuits (bc i dont want to break my computer :D): https://www.tinkercad.com/
Ohm’s law: Voltage = Current * Resistance
In a series circuit, the sum of the voltages across components is equal to the supply voltage.
LED: 2V (1.5V) – 2.5V
Parallel circuits: anything connected to the same point will get the same amount of voltage (current divides across components in a parallel circuit)
⬆️ class notes
Leave a Reply