Pages

Thursday, 15 December 2016

It's an Arduino Christmas!

It's that time of the year again... and the workshop was bereft of Christmas decorations...

So something was quickly conjured up.

My colleagues, Laura and William, fashioned a cardboard christmas tree. Ryan wired up 6 LED's and some current limiting resistors up to the 6 "Analog in" ports on an Arduino board, and I wrote the world's shortest sketch...


void setup() {
DDRC = 0B00111111;
}
void loop() {
PORTC = int(random(63));
delay (10);
}

How's that?

Minimalist!

No comments:

Post a Comment