Say what?

Would I like to know why this:

if (digitalRead(4) == LOW) {
doSomething();
}

Randomly triggers as if there’s some unseen demon child hammering a pushbutton on pin 4, however…

int btn;
btn=digitalRead(4);
if (btn == LOW) {
doSomething();
}

… Always works perfectly?

Yes. Yes I would.

image
Makes about as much sense as forgetting to trim those extraneously long terminal block pins.

The tri-sign adventure

So I started working at the Miami Children’s Museum again on the exhibits team and boy, did they have some puzzles waiting for me to solve when I got there!

Ingredients:
One broken rotating billboard sign (I have no clue who made it, and this is a good thing, because I’d otherwise yell at them)
One SparkFun Redboard
One Pololu motor driver

One 24vdc power supply from Marlin P. Jones

One ginormous Leeson 1/4 horsepower right angle gearhead motor

\m/ OVER A DOZEN BLOOD SACRIFICES \m/

(and that’s just where I lost count)

This is the guts of one of those three panel rotating signs, like you see on billboards. Note the dead variable freq drive controller at top.

This sign was designed with absolutely no consideration for maintenance once installed. It’s totally ridiculous. The triangular aluminum rods that the sign panels are snapped into lift out (I discovered this after fighting with setscrews on their bottoms for most of a day thinking that’s how they came out!) revealing… a ginormous nigh impossible to access Bodine AC 3 phase 208v motor being driven off a Delta VFD… Uggghhh!!! The VFD was toast, its programming was unknown, it all had to go!

image

 

Continue reading »

When you and your Arduino do not give a fuck

I can say fuck on the Internet, right?

the wiring is


// fucks.ino: Arduino sketch for automatically running out of fucks to give. Should work on any board, wired to an HD44780 based display or compatible. Does it look like I give a fuck?
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// rs, enable, d4, d5, d6, d7
// on the lcd end these match to:
// 4, 6, 11, 12, 13, 14
// don't forget the 10k pot between gnd/5v with the wiper on lcd pin 3, ground pin 1, and +5 on pin 2,
// or a completely negative number of fucks will be given. this is undesirable but hilarious.
int fucks;
void setup()
{
fucks=100; // or whatever. watch me give a fuck.
lcd.begin(20,2);
lcd.setCursor(0,0);
lcd.print("Fucks To Give:");
lcd.setCursor(0,1);
lcd.print(fucks);

}

void loop() {
if (fucks>=1) {
lcd.setCursor(0,1);
lcd.print(fucks);
delay(250);
fucks--;
}
if (fucks=0) {
lcd.setCursor(0,0);
lcd.print(" Out Of Fucks ");
lcd.setCursor(0,1);
lcd.print("To Give! Fuck Off.");
delay(30000); // or just go fuck yourself
}
}

I could put up an example picture and video but I am out of fucks to give