If you are a beginner, you can get started with Arduino Tutorials for newbie.
Humans usually go to work on weekdays, and stay at home or go to other places on the weekend. Therefore, smart devices should be able to switch their task based on this human behavior. For example, a traffic light system should act differently between weekdays and the weekend. RFID-based door in workplace may need to be activated only on weekdays.
In this article, I am going to show you how to switch an Arduino Uno-based IoT device’s tasks based on the day of the week.
PHPoC Shield not only provides the internet connection for IoT devices, but also provides the real-time clock (RTC) which is useful for scheduling.
1. Stack PHPoC Shield on Arduino
2. Install Arduino library and examples for PHPoC Shield:
On Arduino IDE, Goto Sketch -> Include Library -> Manage Libraries. Type “PHPoC” on search box. Click on PHPoC row and click “Install” button.
3. Or you can get .zip file here: https://github.com/phpoc/arduino
4. Run the code below
5. Modify two functions: weekdayTask() and weekendTask() according to your need.
Note that you can do much with Arduino when combined with a PHPoC shield because this shield has many powerful features such as IPv4/IPv6, TCP/UDP, SSL, ESMTP, etc.
For more information, visit http://www.phpoc.com/phpoc_shield_for_arduino.php and http://www.phpoc.com/support/manual/phpoc_shield_for_arduino
If you have any questions or something to discuss, don’t hesitate to leave a comment. I am glad to discuss it with you.
Comments
Please log in or sign up to comment.