O'Reilly logo

Arduino iOS Blueprints by Fabrizio Boco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Arduino code

The full code of this project can be downloaded from here:

https://www.packtpub.com/books/content/support

For a better understanding of the explanations in the next paragraphs, you should open the downloaded code while reading.

The power plug has to activate the external appliance at different times for a different lasting and then deactivate it. We are going to call activation a turn on-turn off cycle. Each activation can be represented by a square wave (see the following diagram).

Arduino code

Each activation starts at its Start Time, lasts for a Length (during which the appliance is on) and repeats exactly after a Period of time. A one-off activation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required