DIY SAM Smartwatch!
Gather Your Materials
Gather your friendship bracelet making materials, spray paint, modelling clay, and a SAM Tilt and SAM LED Light.
Mold the Clay
Next, you'll need to mold the clay into the shape of the two SAMs.
Make sure it hugs them tightly so they don't fall out!
Make the Watchband
To make the watchband, you'll need to make the friendship bracelet.
Use any pattern you like, but be sure to mind the gap between the bracelet and the watch face :)
Program the Watch!
Next, open SAM Space.
Turn on and drag the SAM Tilt and SAM LED Light onto the screen.
Drag on 2 Inverse blocks, a Hold, Switch, and Custom Code block.
Connect the Tilt to 1 Inverse.
Connect the Inverse to the Hold.
The Hold to the second Inverse.
And the Inverse to the Switch.
Connect the Switch to the Custom Code block.
And the Custom Code block to the LED Light.
Finally, connect the tilt to the switch.
Next, make sure that the Switch is set so that the Tilt block is the input.
Lastly, copy and paste the following into the Custom Code block:
"use strict";
//var output = 0;
//var output = Date.call('now');
//var output = Date.now();
t = Date.call('now').match(/\w* \w* \w* \d* (\d+):(\d+)/); //Commend this line out
//to save you project. un commend when you want to work with it again.
var hours = parseInt(t[1], 10); //Hour
if(hours>12){hours=hours-12;}
var minutes = parseInt(t[2], 10); // Minutes
var FIVEminutes = minutes / 5;
//var numTimesToFlash = 3;
//var Flag = 1;
if(Switch0 != 1)
{
for(var e = 0; e < hours; e++)
{
CM.sendTo("RGBLED1", [100,0,0], 500+(1000*e));
CM.sendTo("RGBLED1",[0,0,0], 1000+(1000*e));
}
for(var i = 0; i < FIVEminutes; i++)
{
CM.sendTo("RGBLED1", [0,0,100], 500+(1000*i)+(1000*hours));
CM.sendTo("RGBLED1",[0,0,0], 1000+(1000*i)+(1000*hours));
}
}
Deck Out the Body
Once the clay has dried, you'll need to spray paint it so that it's a cool color.
Then, fit your SAMs inside!
Ta-Da!
Tie the watch around your wrist and you've got a wearable!
To find out more, visit samlabs.com!