Introducing the “O Watch” – A kids programmable Arduino smartwatch

The O Watch!

The O Watch is a ‘Precise Time Keeper’ :). Using a DS3231 Real-time-clock (RTC) module with a backup battery, it is able to keep time for years with high precision. This is made using Sparkfun Microview, RTC module and a LiPo battery and charger from Adafruit.

The Design Vision:

IMG_3277

The first prototype:

 

The Smartstrap!

Smartstrap

Acknowledgments:

Advertisements

Interactive Neopixel Lamp (INL). LED Neopixel + Arduino Uno + Ultrasonic Ping Sensor

An interactive lamp that changes speed based on distance of objects in front of it. This uses the Arduino UNO a 60 LED Adafruit NeoPixel strip and an Ultrasonic Ping Sensor.

This also introduces the concept of functions in programming. The circuit is fairly straight forward as Om has tried to illustrate in this diagram! 🙂

Neopixel INL

Refer to Adafruit’s Neopixel Überguide and the Arduino Ping Sensor examples for detailed how to’s. (Note the ping sensor we used has a two separate pins for input and output rather than just one shown in the Arduino example.).

Here is the code.

#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, 2);

int delaytime=30;
const int pingPin = 7;
const int echoPin = 8;

void setup() {
 strip.begin();
 strip.show();
 pinMode(pingPin, OUTPUT);
 pinMode(echoPin, INPUT);
}

void loop() {

 delaytime=pingyity();
 for(int i=0; i<60; i++){
 strip.setPixelColor(i, 255, 0, 0);
 strip.show();
 delay(delaytime);}

 delaytime=pingyity();
 for(int i=0; i<60; i++){
 strip.setPixelColor(i, 255, 255, 0);
 strip.show();
 delay(delaytime);}

 delaytime=pingyity();
 for(int i=0; i<60; i++){
 strip.setPixelColor(i, 0, 255, 255);
 strip.show();
 delay(delaytime);}

 delaytime=pingyity();
 for(int i=0; i<60; i++){
 strip.setPixelColor(i, 0, 255, 0);
 strip.show();
 delay(delaytime);}

 delaytime=pingyity();
 for(int i=0; i<60; i++){
 strip.setPixelColor(i, 0, 0, 255);
 strip.show();
 delay(delaytime);}

 delaytime=pingyity();
 for(int i=0; i<60; i++){
 strip.setPixelColor(i, 255, 0, 255);
 strip.show();
 delay(delaytime);
 }
}

int pingyity()
{
 //Send ping signal out
 long duration, inches;
 digitalWrite(pingPin, LOW);
 delayMicroseconds(2);
 digitalWrite(pingPin, HIGH);
 delayMicroseconds(5);
 digitalWrite(pingPin, LOW);

 //read ping sensor signal input
 duration = pulseIn(echoPin, HIGH);
 // convert the time into a distance
 inches = duration / 74 / 2;

 //set light delay time based on sensor
 if(inches<=30) return(inches);
 else return(30);
}

Adafruit Neopixel LED strip on Spark Core Arduino

Getting start on the Adafruit Neopixel on the Spark Core. This shows a WS2812B 60 LED strip from Adafruit and uses the Neopixel port on Spark Core to run it.

It is quite easy to code thanks to the Adafruit library and a good way to get kids introduced to the for loop.

#include "neopixel/neopixel.h"
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, D2, WS2812B);

void setup() {
    strip.begin();
    strip.show();}

void loop() {
    for(int i=0; i<60; i++){
    strip.setPixelColor(i, 255, 0, 0);
    strip.show();
    delay(5);
    }
    for(int i=0; i<60; i++){
    strip.setPixelColor(i, 255, 255, 0);
    strip.show();
    delay(5);
    }
    for(int i=0; i<60; i++){
    strip.setPixelColor(i, 0, 255, 255);
    strip.show();
    delay(5);
    }
    for(int i=0; i<60; i++){
    strip.setPixelColor(i, 0, 255, 0);
    strip.show();
    delay(5);
    }
    for(int i=0; i<60; i++){
    strip.setPixelColor(i, 0, 0, 255);
    strip.show();
    delay(5);
    }
    for(int i=0; i<60; i++){
    strip.setPixelColor(i, 255, 0, 255);
    strip.show();
    delay(5);
    }
}