Back to Parent

3. Coding the circuits

Step Counter

The step counter registers each step when the tilt sensor senses a shake. Then the Photon sends the current step number to the particle cloud. The initial thought was to send just a signal indicating a "step" and let the other Photon to do the counting. However, we decided to separate two Photon's responsibility so that the first Photon would take care of all the calculation and the second Photon would just execute the action.

Another feature for the step counter is the ability to let users control the system online. We created two cloud functions: system and reset. As a result, when users type "ON" or "OFF", they turn the system on or off. When they type "RESET", the step counter goes back to 0. In future implementations, we could let the Photon to automatically reset the counter in as daily basis, but for now we need users to manually set the counter.


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0