Giving Life to Arduino’s Blink.ino

It’s been a while since I posted anything, so I thought I’d add this modified blink program for cosplayers to install on their Arduinos. It uses average human blink times, slightly randomized, to turn the lights off and on. Additionally there is a random chance of a second blink immediately following the main blink. This gives the sterile blinking light effect a somewhat more organic feel.
Enjoy. 🙂


Turns an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:

modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
modified June 2019
by Casey Wagner

This example code is in the public domain.

int ledA0 = A0; // the PWM pin the LED is attached to
int ledA1 = A1;
int brightness = 250;
int blink = 100;
int secondblink = 0;

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(ledA0, OUTPUT);
pinMode(ledA1, OUTPUT);

// the loop function runs over and over again forever
void loop() {
analogWrite(ledA0, brightness);
analogWrite(ledA1, brightness);


analogWrite(ledA0, blink);
analogWrite(ledA1, blink);

delay(random(275, 375));

secondblink = random(1,5);
if (secondblink == 2){
analogWrite(ledA0, brightness);
analogWrite(ledA1, brightness);


analogWrite(ledA0, blink);
analogWrite(ledA1, blink);

delay(random(225, 400));



Beneath the Morrslieb

The moonlit streets were nearly empty, as the wise folk of the town had mostly retreated inside. The few brave souls that ventured out in the stinking darkness were guards, or those with business that was best conducted out of the light of day.

Down the middle of the street came a slow procession of monks, hunchbacked and ragged, faces bowed down to the filth in which they walked. At their head a priest who called out the lamentations, the words slurring through bruised lips, and the sickly glow of a censer he swung as his side.
“Come they will,” he called, “and none shall stop them. Cursed creatures that hate the realms of man. Come they will, and devour, and we will be their sup.”

He stumbled, and fell to one knee, but no monk rushed to his aid. Heads down they marched, deep in meditation.

“From the March they will come. From the earth below us. Through our windows, over the walls, under our beds. Tooth and claw, they will come. All is lost.”

He staggered, and rubbed his bleeding mouth. The sore bubbled with infection that had not been there only this morning. He swung the censer and the sickly sweet smoke bathed him in its corruption.
“‘Ey now, priest!”, guards approached, rude ones by the make of them. None of the deferential tone of their brethren in the company of a Brother. “Whatcher up too, this time o’ night, oer?”

“Aye, why you out and waving yer smoker? Get ye under roof.”

The two guards were common street thugs conscripted to the watch. That much was evident. There were no real soldiers left to hold the cities with the war on.

They’d all marched North. To fight the Chaos.

The monks’ robes rustled in the wind, and they remained silent.

“We merely sing our lamentations on this day of woe, good gentlemen. The tide is upon us. The end has come. The days of man are at an end.” He sighed heavily, and a bubble of pus dropped to the ground from the corner of his lip.

“Maybe you should get your howlin’ nonsense off the bloody street”, the better spoken of the two said, “before you rile up summin’ important!”

The guard gave the priest a hard shove forward, and he fell, but the chain around his neck pulled him up short. Choking, he fell sideways, and scrabbled at the ground.

“Ere now, wot dis?” the shorter guard said, and pulled at the chain.

One end was around the priest’s neck, but the other was in the hands of the monk that followed him. The monk straightened and looked the guard in the eye.

“Dis end of man” it hissed.

The guard shrieked as the monks lunged forward, claws and teeth of a dozen Skaven scouts seeking his flesh. He was dead in seconds.

The other, his back to the wall held his own for almost a full minute before falling to a dagger in the throat. His whispered cries for help swallowed by the sickening incense of the Plaguebearer.

“Please,” the Priest whispered, “let me die now. Don’t let the rot take me. The city is yours. Just… let me die.”

“You die. Just not yet. Killing make Skaven hungry. Still much killing to do. Need you fresh. For sacrifice.”

“Oh gods, save me”, the priest moaned, and began to sob heavily

“Only rat god here. Eat your monks. Eat your gods.”

The rat leaned in close, smelling the priest’s flesh. “Horned Rat always eat.”

Driving Metal

Every day is the same. You blink away the grit that stings your eyes, choke down another lungful of dust and ash, and try to get by however you can. What little food you can afford tastes like stale cigarettes and refrigeration coolant. There’s no point in complaining. The smugglers never lack for customers, and they understand the economics of scarcity.

Can’t even buy your way off-world with a kidney these days. They just grow them in a lab, same as the meat you see the suits eating on the pipe. Real steak. Just like they grew in the tanks back on Earth.

This guy’s been making the rounds, hitting up all the down and outers who can drive metal. Smile that looks like it cost a year’s work to pay for, and practiced too often in a mirror. And eyes that don’t smile at all.

It’s a simple proposition. You want off this rock, he makes it happen. Food, money, and a clean place to sleep. Adrenaline modulators. Hydrostatic shock inhibitors. Vascular blowback dampeners. All the enhancements a mech driver needs to keep fighting beyond the veil of death.

And when you see that poor dumb bastard that signed up for the same thing coming at you, you don’t hesitate. You go in hot and you put that fucker down. Because that’s how it’s done.

Or tomorrow you wake up, blink away the grit that stings your eyes, choke down another lungful of dust and ash, and try to get by however you can.

Things Ancient and Obscure

The antique shop door rattles closed behind you. The bell above it makes a half-hearted jingle and falls quickly silent. There is no one to be seen. Wafting from the back comes the scent of decaying incense and soured meat.

You shoulder your way through piles of castoffs and detritus from the lives of people long dead. Homeless trinkets and baubles try to place themselves in your hands and pockets. The despair is palpable.

You step through the threshold into the back room. The air is thick with fetid smoke. An old woman with milky, unfocused eyes looks up at you.

“At last, you’ve come. Destroyer. Poisoner. Thief of life. To butcher and unmake what is before you. Come then. Have your slaughter. Take what is yours. I won’t interfere.”

“Lady,” you begin, “I’m a detective. I’m just here to ask you—“

Her eyes, lingering on a point in space behind you, suddenly snap to clear focus on your face.

“Be silent, fool” she hisses, “I wasn’t talking to you.”

Behind you, something steps out of the darkness.

It’s about time…

Guess I should get around to doing something with the site. I’ll be posting various microfiction, and promoting longer stuff if I get around to publishing. Stay tuned.