Howard Skills Dev V: Working with Networking
Made by Howard Teng
Made by Howard Teng
Created: December 5th, 2024
The goal of this project is to learn how to communicate with the other device via cloud and control each other's output. The skill dev will showcase how the paired device share data among and interact with each other through the publish and subscribe function.
The project follows the instructions provided on the course website about events and cloud networking. My partner for this project is Keerthanna, who is also working with me on the final project. The code we developed utilize the Particle.publish function to generate events on the cloud and use a webhook to notify these events to each other's device. The input that triggers the publish function is a ball tilt sensor. An event will trigger when the tilt state of the sensor is different from the previous state. The output that we chose is a solenoid. When the device detects a published event, it will do one cycle of solenoid motion. The completed circuit was a modified version of the circuit provided in the solenoid tutorial that includes the ball tilt sensor and a external power source for the solenoid. The code was written on the particle app and flashed to the Photon2 module. The code is provided below:
The circuit was built as shown in video provided below. The code worked as intended. The two device was able to communicate with each other via the ball tilt sensor. When the ball tilt sensor on one device is shaken, the solenoid on the other device will react and start moving as a response.
The project successfully connects two device with each other and allowed networked interactions and data sharing. We built a circuit that incorporates the function of a ball tilt sensor and a solenoid that allows the communication between two devices through the inputs of the sensor. One issue during testing was that the the photo2 dev board tends to frequently lose connection, making the devices irresponsive sometimes. we also agrees that the code of our ball tilt sensor can use some refining to decrease delay and more accurately triggers the other device. Some other additional practices that can be done include utilizing the shared data to add specific conditions to the solenoid motion and changing the input sensor.
~