# Code Introduction

This IoT Code Guidebook is a supplement the [IoT Project Guidebook](https://docs.idew.org/project-internet-of-things/).

## What's in this Guidebook?

This guidebook contains a **series of IoT code tutorials** to help you get familiar with using your IoT electronics kit to build smart devices and program apps for them.

In addition, this guidebook contains **coding references** to help show and explain how to create a device app and web app that interact with each other through the internet. There are also references that show and explain how to connect specific inputs and outputs to your device and how to add code in your device app to control the inputs and outputs.

Finally, this guidebook also contains **links to external resources**, such as an online code editor (web IDE) for creating your device app, programming language references, and additional experiments for learning how to use your IoT kit.

{% hint style="success" %}
Be sure to check out the recommended [prerequisite knowledge](https://docs.idew.org/code-internet-of-things/prerequisite-knowledge) that will help ensure students are successful with the IoT code tutorials and IoT project.
{% endhint %}

{% hint style="success" %}
**HOW TO COPY CODE:**  When using these coding tutorials and references, you can copy a code block by clicking the **copy icon** displayed in the upper-right corner of the code block.
{% endhint %}

```cpp
// example code block

void setup() {
​
}
​
void loop() {
​
}
```

## Your IoT Electronics Kit

This guidebook is tailored for an IoT electronics kit called the [SparkFun Inventor's Kit for Photon](https://www.sparkfun.com/products/13320), which will simply be referred to as the Photon kit.

SparkFun sells a variety of other sensors and outputs that can be used with the Photon kit. If possible, it is highly recommended to add an [ultrasonic sensor](https://www.sparkfun.com/products/13959) to the kit for more design possibilities.

{% hint style="warning" %}
**NOTE:** Your instructor may have provided you with a different IoT electronics kit. If your IoT  kit uses **Arduino**, then you can still use this guidebook to help get familiar with using your IoT kit to build smart devices and program apps for them. The Photon kit is programmed using a language called [Wiring](http://www.wiring.org.co/reference/) that is nearly identical to [Arduino](https://www.arduino.cc/reference/en/). In addition, the [Photon circuit board](https://learn.sparkfun.com/tutorials/photon-redboard-hookup-guide) is similar to an Arduino circuit board (though there are a few differences).&#x20;
{% endhint %}

{% hint style="info" %}
**FYI:**  This IoT code tutorial focuses on coding **web apps** (using JavaScript) that interact with a Photon device. However, it is also possible to code [native mobile apps for iOS and Android](https://docs.particle.io/guide/how-to-build-a-product/mobile-app/) (using Objective-C, Swift, or Java) that interact with a Photon device.
{% endhint %}

## Copyright and License

Copyright © 2015-2025 by Jim Lyst and Michael Frontz, Indiana University Luddy School of Informatics, Computing, and Engineering at Indianapolis.

This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). You are free to use, share, or adapt this material for noncommercial purposes as long as you provide proper attribution and distribute any copies or adaptations under this same license.

[![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)
