Howard Teng - Skills Dev II: Input and Sensors

Made by Howard Teng

48675 Week 2 Skill Dev

Created: November 7th, 2024

0

Goal:

The goal of this project is to learn how to use sensors to get inputs from the environment and change the output of the device accordingly. The project is using a force sensitive sensor (FSR) to detect pressure signals and adjust the brightness of the LED bulb according to the signal.


Process:

The project follows the instructions provided on the course website about connecting an LED bulb with a sensor, in this case a force sensitive sensor(FSR). The circuit was built according to the tutorial provided and a blue LED bulb is connected with the FSR. The code was written on the particle app and flashed to the Photon2 module. The code is trying to instruct the device to detect pressure on the FSR and adjust the brightness of the bulb according to the strength of the signal. One extra condition is added. If the pressure signal exceeds a predetermined threshold(fsrReading >1000), the bulb will start blinking, signaling that the pressure is too high.

code:

Outcome:

The circuit was built without much issue and the code worked as intended. When the FSR is lightly touched, the bulb will faintly glow according to how strong the signal is. When the FSR is pinched, the bulb starts glowing, signaling that the pressure exceeds the threshold. 


Reflection:

We successfully built a circuit that connects a sensor to the output device(bulb) and adjusted the signal with the sensor input. One issue during the code testing was that the bulb didn't respond to the sensor even though the sensor reading is working as intended when checking on cloud. The issue is resolved when the wire was connected to D1 instead of D2 on the photon 2 module.

The code used in this project is a slight variation of the code provided in the tutorial. I added an extra condition that instruct the bulb to blink if the signal is too high. I think it is a good practice on adding if statements and adjusting the output according to different conditions.

0
48675 Skill Dev II: Input and Sensors
Howard Teng - https://www.youtube.com/shorts/W9EgYTcU14I
x