Outcome
I followed the Particle set up and made a simple circuit to add inputs and sensors. All these tests went all as required. Please make it a full screen to watch the video for each exercise.
The first exercise is to combine a switch and potentiometer. The switch should turn on and off the light while the potentiometer will fade up and down the light (but only when it's on). However, it is hard to take a picture/video to show me pressing the pushbutton and adjust the potentiometer at the same time. So here I only show the picture of adjusting the potentiometer to dim the light while the code combined the two together.
Then comes the sensor section. The circuit is shown below and all following exercises are based on this circuit.
First I tested the set up. When there is lots of light the LED is bright. When there is little light it’s dim. In the video, I change the ambient lighting level by covering the sensor using my finger.
Exercise1: Modify the program so that the LED shows the opposite. When there is little light, it will be bright and when there’s lots of light, it will be off.
I added another variable to distinct the photoCell reading and the LED dimming level(actual LED lighting level). In this exercise, LED shows the opposite which means that the higher ambient lighting('light') leads to a smaller LED lighting level('dim').
In this section, I used push-button, photo resistance, and LED. The push-button is an overall switch and all the actions will happen only when the button is pushed. When the button state is low, the LED will dim according to photocell readings. But if the light levels are below 600, the LED turns off.
This is design for the following scenario: You want to read but you don't want to read with the lighting which is too strong and bad for your eye. The dimming is like the screen lighting level. The LED will adjust the dimming and when the ambient lighting is no longer suitable for reading, the LED will turn off. And there is an overall switch to control the dimming system.
This is a very interesting process. I have learned the knowledge of different inputs and sensors and how to combine them with LEDs. Also, I think it is interesting to design a circuit logistic based on a scenario. I feel like I am trying to solve a real-world problem myself.
You can upload files of up to 20MB using this form.