For a project for my PCL class, I was told to automate something in my house. I thought about it and decided that I wanted to automate my LED lights in my room to do something. I wanted to learn something new when I did this project. I decided on making my LED lights into an alarm clock for my eyes that would go off when it is the time that you set for the alarm to go off. I also decided that I would get the time using an world clock API.
How does it workThe project works by having the Particle Argon wired up to the LED lights and when it becomes the time set for the alarm clock to go off, the LEDs will strobe different colors until the alarm clock is turned off. The project is activated using an Alexa that when the trigger "Alexa trigger alarm clock on" is said, the project every minute will use the get the time from the API and if the time is equal to the time that was set in the code, the LEDs will start to strobe. To turn the LEDs off, the trigger "Alexa trigger alarm clock off" will need to be said.
DemonstrationWiring Steps- Follow the wiring steps given to allow for the Particle Argon to use the LEDs
- Upload code onto your Particle Argon
- Create an applet in IFTTT
- Create a webhook in Particle Console
I used IFTTT to connect to my Alexa and when the trigger phrase is said, the
You will need to create your own applet for Alexa to be able to trigger your argon. When you create your applet, make sure that your argon is on and that the you have uploaded the code onto your argon. Click on "add" next to "IF THIS" and search for Amazon Alexa. lick on "Say a specific phrase" and choose the phrase you want to say to trigger the Alexa.
Then you will need to click on "THEN THAT", click on your function name and leave the input blank.
You will need to create a webhook that will use the time API.
Click on this link, https://www.timeapi.io/swagger/index.html, and click on /api/Time/current/zone then click on try out.
You will need to change "Europe/Amsterdam" to which every country/city you live in or by. Click execute and the save the request URL that is given to you.
You need to make a new webhook in particle console which should look the same as the image unless you live in a different area.
For advanced setting all that needs to be added is what is shown below. (Change America/Chicago to what you put in before to get the URL)
Then create the webhook and when you click test when you with the events open in the Particle Console, you should get something like this.
If you are having problems with getting data from the API, use the particle console and use the test button on the webhook to see what information comes back.
If the LEDs are not the right color, check that your wiring matches the digital pins that are in the code or move the MOSFETs around to see if the helps.
Make sure that the LEDs you put up work properly without the argon attached because like in my video, something is wrong with my LED lights so the red LED color does not light for all of the LEDs.
Comments
Please log in or sign up to comment.