Hey everyone
So you know that time in the morning when you switch off your alarm or hit snooze and lie in bed staring at the ceiling, staring at your smartphone or dozing back to sleep? Well Sparki can now be my snooze alarm.
For those ten minutes Sparki will move slightly disturbing me from falling back to sleep, and once those ten minutes are up, Sparki will play an annoying tune, guaranteed to get me out of bed!
He’ll also wish me a nice day!
#include <Sparki.h> // include the sparki library void setup() { sparki.RGB(RGB_OFF); sparki.servo(60); } void loop() { for (int i = 0; i < 6; i=i+1) { delay (100000); sparki.moveLeft(30); sparki.moveRight(30); } sparki.clearLCD(); sparki.drawString(10,2, "Good morning Ash"); sparki.updateLCD(); delay (3000); int left = sparki.lightLeft(); int right = sparki.lightRight(); if (left>=right) { for (int i = 0; i < 6; i=i+1) {sparki.beep(740, 600); delay(400); sparki.beep(540, 400); delay(400); sparki.beep(540, 200); delay(200); sparki.beep(440, 200); delay(200); sparki.beep(640, 400); delay(400); sparki.beep(740, 200); delay(400); sparki.beep(740, 200); }} sparki.clearLCD(); sparki.drawString(10,2, "Hope you have a good day"); sparki.updateLCD(); delay (3000); sparki.clearLCD(); sparki.drawString(10,2, "ha en fin dag"); sparki.updateLCD(); delay (3000); }
Let me know what you think….there are loads of ideas I have for this code 🙂
Well, that sounds like a good wake up call! No Snoozing now LOL 🙂
LikeLike
That’s absolutely adorable!
LikeLiked by 1 person