The basic steps are:
- When deciding which components to add to your project, some useful questions to ask are:
- Is the sensor or actuator already supported by the UPM sensor library? Browse the list of supported sensors in the Sensor Library Explorer to find out.
- Is example code available? Modifying an example is often faster than writing code from scratch. See the Sensor Library Explorer for code examples that you can paste directly into your project.
- Connect the components to your board. The exact steps to do this vary depending on your sensor or actuator, and whether you're using a kit such as the Grove* - Starter Kit Plus: Intel® IoT Edition or connecting components using a breadboard and jumper wires.
- Write or modify your project code to interact with the sensor or actuator.
For a quick example of adding a new sensor to your project, see Example: Adding a light sensor to your project.
The Intel IoT Developer Kit provides several ways to get started adding sensors:
Intel® XDK comes with built-in Node.js* project templates to perform simple tasks, such as reading from digital or analog input devices and making use of pulse-width modulation (PWM). You can quickly create a new project using one of these templates, then modify the code for your needs.
The UPM sensor library (also called libupm) provides support for over 100 different sensors. You can find and reuse example code for your sensor and modify it for your needs. For steps, see Adding sensors to your project using the Sensor Library Explorer.