In the stomach pulsing like a heart beat. I would like to add that to the full script on pin30

The casing is designed to receive a NeoRing of Adafruit, I still need to get one though... In the meantime we can use a led!

 

 

 

int ledPin = 30;
unsigned int i=0;
boolean rise=true;
int period=1250;

void setup()
{
pinMode(ledPin, OUTPUT);
}

void loop()
{
if(i == period)
{
i=1;
rise= !rise;
}
if(rise == false)
{
digitalWrite(30, LOW);
delayMicroseconds(i);
digitalWrite(30, HIGH);
delayMicroseconds(period-i);
i=i+1;
}

if(rise == true)
{
digitalWrite(30, LOW);
delayMicroseconds(period-i);
digitalWrite(30, HIGH);
delayMicroseconds(i);
i=i+1;
}

}

wkinne

10 years 4 months ago

looks sweet

a 16 or 24 NeoRing of Adafruit?

kmcgerald

10 years 4 months ago

Does it turn red when he's about to do something evil?  :) 

It could be useful for giving system status info like the internet connection being on or offline, battery level, Human detected on PIR, Kinect, or OpenCV.