> For the complete documentation index, see [llms.txt](https://docs.launchboard.app/cxd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.launchboard.app/cxd/code-internet-of-things-2.0/tutorials/create-smart-light.md).

# C. Smart Light Device

In this third tutorial, you'll create a "Smart Light" device and program its apps.

## Tutorial Goals

The goals of this third tutorial are to help you:

* Practice connecting physical inputs and outputs to your Photon device
* Program a Photon app that controls your device's physical inputs and outputs
* Program a web app that interacts with your Photon device through Particle Cloud

## What is a Smart Light?

The [Philips Hue](http://www2.meethue.com/en-us/) smart light bulb was introduced in 2012. Today, there are several companies that offer smart light bulb systems.

From the outside, a smart light bulb looks like a regular light bulb. However, what seems like a simple light bulb is actually a full-fledged IoT device:  inside the bulb are multiple LED lights wired to a microcontroller circuit board that connects to your Wi-Fi network.

![](https://1128190565-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LEGLBX3AeXb13IcoB4Q%2F-LJQUSnHOwKdmZ_IYago%2F-LJQUffV0CI65cbUIYVp%2Fsmart-light-interior.jpg?alt=media\&token=5ec2a12e-c8b7-4837-b507-e0333a930971)

The smart light interacts with a mobile app that allows you to control an individual light or a group of lights. The mobile app might offer features such as:

* Remotely turn the light(s) on or off
* Set automatic timers to turn the light(s) on or off at specific times
* Adjust the brightness of the light(s)
* Change the color of the light(s)
* Sync the light(s) to music, movies, or games
* Control the light(s) using a voice assistant (such as: Alexa, Siri, etc.)

For this tutorial, you'll create a prototype of a Smart Light device using one LED. Your device will include a button to manually turn the light on or off. You'll program a Photon device app to control the LED using the button. You'll also program a web app that interacts with your Photon device over the internet to monitor the light's status and to allow you to remotely turn the light on or off.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.launchboard.app/cxd/code-internet-of-things-2.0/tutorials/create-smart-light.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
