Back to Parent

Outcome


Exercise1-1:

Using button&potentiometer to control led

Combine a switch (or button) and potentiometer. The switch should turn on and off the light while the potentiometer will fade up and down the light (but only when its on).

Show Advanced Options
Show Advanced Options

Exercise 2-1

Currently, the program shows how much light is available. When there is lots of light the LED is bright. When there is little light it’s dim. Modify the program so that the LED shows the opposite. When there is little light, it will be bright and when there’s lots of light, it will be off.

Show Advanced Options
Show Advanced Options

Exercise 2-2

Instead of fading your light, why not turn it on or off when the light reaches certain levels.

For example, if the light levels are below 600 turn the light on (and bright), otherwise turn it off.

Modify the program to work in this way.

Show Advanced Options
Show Advanced Options

Practice Exercise: Combining Sensors and Inputs

Prepare a simple 2-in (sensors or inputs) 1-out (LED) device (i.e. your project will use three components (resistors and wire don't count!) and at least one must be a sensor). Present a really simple use case for a connected sensor device (perhaps solve a simple problem in your home).

  • Identify an interesting sensor that you'd like to explore.
  • Develop a working circuit with that component and write code to read and make use of information from that sensor (e.g. share the value online, translate it into an output).
  • Add a second component into the mix. This can either be an input (potentiometer, button, switch) or a sensor. Stream readings from both to the Particle Cloud at the same time.
  • Use conditional logic (if statements) to interpret inputs/sensor readings and trigger actions e.g. if the temperature is less than 50 degrees and the button is pushed...
  • Document your work on the Gallery and submit a link below


Show Advanced Options
Show Advanced Options

Reflection

I learned how to use the bend sensor!

Drop files here or click to select

You can upload files of up to 20MB using this form.