The project wakes us up when the sun rises. This is detected using a light sensor and comparing it with a threshold.
Setting up the Particle
1. Connect photon to the laptop and go to https://setup.particle.io/.
2. Click on setup a photon and click next.
3. Run the downloaded file.
4. Go through the instructions and connect to the Photon-... wifi SSID.
5. Enter your Wifi's SSID and Password and connect to the Internet. The photon starts blinking Cyan when the connection is established.
6. Go to https://docs.particle.io/guide/getting-started/build/photon/. Navigate to Particle Build.
7. Create an account on Particle Login and give your device a name.
8. You can now code using the Web IDE.
9. As I am using the Grove sensor I connected the signal to A0 and power pins to VIN and GND of the Photon.
10. Currently I am publishing the events to the Particle cloud as well as Serial Monitor.
To enable the serial monitor, you need to give the necessary permissions on command line as well as the enable it in code. To enable permissions in the command line:
a. sudo chmod a+rw /dev/ttyACM0
b. particle serial monitor
Enabling serial monitor in code is similar as we do in Arduino.
11. The output on terminal is:
Comments