Control the brightness of a led from the dashboard with a slider.

This tutorial is part of the Nairda learning path. You can build it step by step inside the app, which checks every block you place before letting you move on.


The steps

  1. We add a While loop, which repeats forever.
  2. We create a number variable called brightness.
  3. We declare a led on pin 13.
  4. Inside the loop we put a delay of 100 milliseconds.
  5. Behind it we put the led and give it the variable brightness.
  6. On the dashboard we put a slider and give it the variable brightness.

When you finish, the app takes you straight to the next tutorial in the path.

Build it in Nairda