Back to Parent

Outcome


Intention

The goal of this project was to explore some introductory skills for designing Internet of Things (IoT) devices. My goal was to make a smart light, using an LED, that could have adjustable dimming settings via Wi-Fi.

Img 1581.jpg.thumb
Show Advanced Options

Process

  I started with a simple circuit consisting of a Photon 2 microcontroller, a red LED, and a 1 kOhm resistor. At first, I started with my LED being controlled by pin D2 as I tested simple HIGH and LOW digital output controls to turn the LED on and off. I then tried to use this same D2 pin for pulse width modulation (PWM) control through the analogWrite() function, but it did not work. I then changed my circuit and code to control the LED using the D1 pin and as able to successfully adjust the brightness from my Particle Console. I used a Particle function that accepted a String input and converted it to an integer to set the brightness to if the value was withing bounds.  

Show Advanced Options
Show Advanced Options

Outcome

My project was successful because I was able to control the brightness of my LED over Wi-Fi from my Particle Console. I tested the brightness at various different levels and observed the change. You can see my work here: https://youtu.be/baOVN3q9evc?si=OdvN9r0wGIftDDqJ

Reflection

I learned how to make functions that you could interact with over Wi-Fi. In the future, I would add some complexity to this project by adding more LEDs or using an RGB LED so I could make different colors. Overall, this was a good introduction to learning how to communicate with the Photon 2 and to understand the capabilities of the different pins.

Drop files here or click to select

You can upload files of up to 20MB using this form.