2.5 Smart Device and Apps

Your team needs to build and program a functional prototype of your smart device using the provided IoT electronics kit. You'll need to code the device app that controls the smart device, as well as the web app that interacts with the smart device.

  • Build your smart device using the Photon kit

  • Code the Photon device app that controls your smart device

  • Code the web app that interacts with your smart device

  • Verify that your smart device and its apps work together correctly

circle-check

Build Smart Device

Your team must build a functional prototype of your smart device that can be demonstrated to the public. If necessary, you can simulate certain parts or actions as long as the main task of your smart device can still be demonstrated.

The project challenge requires that you use at least one physical input (sensor, button, etc.) and at least one physical output (motor, LED light, etc.) from the provided IoT electronics kit:

If desired, you can construct certain parts for your smart device using cardboard, 3D-printing, etc. The constructed parts could provide functional value by helping the device perform its task and/or aesthetic value by adding to the device's appearance for demonstration purposes.

  • For example, if your smart device uses a magnetic switch to detect when a door is open or closed, you could construct a small-scale door and attach the magnetic switch to it.

Code Device App

Your team will use the Particle Buildarrow-up-right online code editor to create the Photon device app that controls your smart device. You'll "flash" (download) the app to your smart device over Wi-Fi.

The IoT Code Guidebook has a reference explaining the different parts of a Photon device apparrow-up-right.

The IoT Code Guidebook has references explaining how to write code in your device app to:

Code Web App

Your team will create a web app that interacts with your Photon device over the internet through Particle Cloud. The web app will consist of an HTML file, a CSS file, and a JavaScript file.

The IoT Code Guidebook has templates with starter code for your web app, depending on whether you need just a single screen app or multiple screens:

The IoT Code Guidebook also has a reference explaining how to write code in your web app JS file to interact with your smart device through Particle Cloudarrow-up-right.

Verify Device and Apps Work Together

Throughout coding, be sure to test each new feature as you add it to your device app or web app. Make sure the new feature works correctly, and be sure all the existing features still work. Troubleshoot and fix any bugs or issues that you discover.

Once you've verified that your smart device and apps work together correctly, your team will create a product demo video.

❏ Deliverables

  • Submit a photo of your completed smart device

  • Download and submit your Photon device app file (.ino)

  • Submit your web app files (.html, .css, .js) – or a link to the web app files