Scheduled Relays

This project will show you how to schedule to drive the outputs on a MKR Relay Proto Shield using a MKR1000!

Components and Supplies

Apps and Online Services

About This Project

This project will show you how to drive in a programmed way the relays on a MKR Relay Proto Shield. In particular using web server hosted on the MKR1000 you will be able to set the alarm time using your browser!

Get Started

To get started you have to:

  • Put your MKR1000 board in top of your MKR Relay Proto Shield.
  • Upload the code on your board.
  • Open the serial monitor and copy the board's IP address.
  • Open your browser and paste the IP address. You should see a page similar to this:
The control page
The control page
  • Click on the -- and use the arrows to set the time:
Set your time
Set your time
  • Click on submit!
Success message
Success message

When your time will be matched (in this example at 10:30 AM) the two outputs on your MKR Relay Protoshield will be driven HIGH for five minutes!

Code

How to Use and Improve This Example

You can use this example to make your own gardening system and small automation in general! Use the MKR1000 IoT capabilities to ask for weather forecast and use them to have a smarter ON/OFF policy.

Suggest changes

The content on docs.arduino.cc is facilitated through a public GitHub repository. If you see anything wrong, you can edit this page here.

License

The Arduino documentation is licensed under the Creative Commons Attribution-Share Alike 4.0 license.