Internet Control Light and Pump

It's possible to control electronics from your adafruit.io page.

  1. Start by logging into your adafruit.io account


If you haven't added your credentials to your "secrets.py" document see step 2 of this tutorial.

2. Create a new feed called "internet_motor"

3. Create a new dashboard (or you can add to your test dashboard)

4. Open your dashboard and look for the gear icon.




From the dropdown menu, choose create new block


There are many blocks to choose from, choose the on/off button.




5. Use these settings to control the pump.



Then press "update block"



6. Use this code example to control your motor with the button on your dashboard.

Note: that this code is just a combination of what we learned in the posting data tutorial and the controlling pump tutorial, with an added "if" statement in the messages function.

7. You should now be able to control your motor with the button.









Note that if you download Adafruit.io to your phone, or go to your site from your phone, you can control the motor with that device as well (as shown in this image).

Challenges

  • Can you turn on the motor for only 5 seconds each time you interact with it from your dashboard?

  • Can you pick a block and get it to control the speed of the motor?

  • It's more complex, but you should be able to control your RGB LED ring, with a button, over the internet.

  • Can you figure out how to change the RGB ring colors from a dashboard block?