Hand tools and fabrication machines
Ever walk into a room and have to feel around to find the light switch? Ever get in bed and then have to get back up to turn off the light? Never again! With the use of our automatic light switch you can walk into a lit room and turn off the light from the warmth of your bed!Details
A motion sensor is placed directly inside of the door attached to the first argon. When the door is opened it triggers a sensor that signals the second argon to run the code. This rotates the servos, pulling on the string and turning the light on.
When one wants to turn off the light, all they need is the IFTTT app on their cell phone. The second argon has been coded using the DO IT button widget to receive a signal when activated through the widget button on the person's cell phone to rotate the servo motor in reverse of the motion sensor code. This turns the light back off.
We have also coded a button on the cell phone to turn the light on if you want to turn it on remotely without triggering the motion sensor.
Displayed below are pictures of the experiment's set-up and a video showing how the experiment works.
Particle Cloud Interfacing
Along with the motion sensor and the servo motor code we have also made the two Argon's communicate back and forth. This what made the ability to use 2 Argon's possible one to contain the motion sensor and one to contain the two servos. You can see in our code that both of the Argon's publish data to the cloud when it is triggered by either the motion sensor or the app. They also publish to the cloud when the read what they have been subscribed to on the cloud. As shown below when the motion sensor on the first Argon named Aardvark senses motion it publish the event lightSwitchon, the second Argon Turtle then reads the cloud via a subscription command and knows to power the servo motors. Also, when Turtle is triggered by the app to turn the lights off it publishes lightSwitchoff and then Aardvark reads the cloud and publishes lightSwitchISoff so that they both know the light switch is off. This also occurs when the app triggers turtle to turn the light on it publishes lightSwitchOn2 in the cloud and Aardvark then sends out lightSwitchAlreadyOn.
As you can see in the above picture using the same app IFTTT we were able to make the Argon's publish live data to google sheets. This occurs via the IFTTT reading the cloud and waiting for the events to be published. Once lightSwitchOn, lightSwitchOff, or lightSwitchOn2 have been published it then takes the data and displays in google sheets as show below.
This data was then displayed in a graphical format to display what is happening in a better way. This can be see below in the 3 graphs each showing one command occurring.
Below are the links for the google sheets that contain the data for each light switch command.