A prop that looks like a bomb from the movies.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Because we can. I had a 7-segment display left over from the #Talk Ranking Machine, and this really begged to be done. Yes, it's useless, silly, and potentially even dangerous if someone left it in a public place. But it was quite fun to do too.
Both the display and the battery holder are soldered directly to the Pro Mini -- the pinout just happens to match. There is no off switch, you just have to remove the battery. The code looks like this:
const int GND_PINS[] = {8, 12, 13, A2};
const int VCC_PINS[] = {A1, 11, 6, 4, 3, A0, 7, 5};
const unsigned char DIGITS[] = {
0b00111111,
0b00000110,
0b01011011,
0b01001111,
0b01100110,
0b01101101,
0b01111101,
0b00000111,
0b01111111,
0b01101111,
};
const int BEEP_PIN = 2;
void show7seg(int number) {
unsigned char digit;
div_t result;
for (int d = 0; d < 4; ++d) {
result = div(number, 10);
digit = DIGITS[result.rem % 10];
number = result.quot;
for (int s = 0; s < 8; ++s) {
digitalWrite(VCC_PINS[s], digit & (1 << s));
}
pinMode(GND_PINS[d], OUTPUT);
digitalWrite(GND_PINS[d], LOW);
delay(2);
pinMode(GND_PINS[d], INPUT);
}
}
void setup() {
for (int s = 0; s < 8; ++s) {
pinMode(VCC_PINS[s], OUTPUT);
}
for (int d = 0; d < 4; ++d) {
pinMode(GND_PINS[d], INPUT);
}
pinMode(9, OUTPUT);
digitalWrite(9, LOW);
pinMode(10, OUTPUT);
digitalWrite(10, HIGH);
}
void loop() {
static long int last = 0;
static int count = 2400;
long int now = millis();
if (now - last > 500) {
digitalWrite(10, LOW);
}
if (now - last > 1000) {
count -= 1;
if (count % 100 == 99) {
count -= 40;
}
last = now;
tone(BEEP_PIN, 1200, 25);
digitalWrite(10, HIGH);
}
show7seg(count);
}
And that's pretty much it. I might actually make it a game, by adding several wires that you have to cut, that would either stop the counter or make it go faster or something...
Create an account to leave a comment. Already have an account? Log In.
Good.. Now have a muslim extremist activist take this to school like with the with the suitcase "clock" and they might actually think its a bomb too.
Excuse me? What are you babbling about? What the heck is a "muslim extremist activist" and why is he at your school? And what does it have to do with any clock? Look at the date of this project and recheck your jumping to conclusions, please.
Awesome project!
But most (stereotypical) Bombs have red digits, but i also like blue the better ;)
Best regards, Stefan
I used blue LEDs, because they take higher voltage, and I was uncomfortable connecting them without any resistors, so I wanted to limit the damage, if any.
Okay, good reason. I wonder if the Batteryvoltage would exceed the Forward Voltage of the LEDs ;)
This is a 3V button battery, it has very weak current and the voltage drops immediately when you try to draw any sensible ampers. So that's much safer than, say, a 25C LiPo :)
Become a member to follow this project and never miss any updates
XDXD i clicked on the bomb tag and was disappointed by the project amount. we need more homeade bombs