So it came in the mail today.
What is it you ask?
It's a programmable I/O board. From Hell.
54 configurable inputs/outputs. 16 independent analog inputs. 12 of the outputs are PWM that can be used to dim LED's or control servos...
Also arriving is 2 8-relay boards to connect to it.
Whats this all mean?
I can either pre-program this board, or leave it hooked up to a PC via USB. Or both. It can turn on/off up to 16 electrical devices (lights, fog machine, wiper motors) with the attached relay boards, it can control servos, do light displays, or send serial commands to the MP3 breakout boards I bought to activate sound effects.
Inputs? Oh yeah, it's got inputs. It can read pressure pads, motion sensors, laser beam light sensors. All configurable through the program interface, or it can just send the results back to a PC to be processed and commands sent back over USB.
Oh I'm a happy boy today.
A lot of work to do - its not a plug and play device - you need to program it. That being said - once programmed, it's an incredibly powerful brain/nerve center for a haunt.
Nothing makes me more excited to think about setting up a moton sensor to see someone approaching my coffin thumper... once activated it starts scratching and growling sounds. A pressure pad closer to the coffin sets off the rattling lid and growling sounds... and then... BOOM! The spring loaded metal arm inside slams against the lid as the rattling cranks up to full tilt, and a green glow flashes inside the coffin as fog spills out the sides.
Oh, it's a happy day![]()
-
The Great Pumpkin
- Join Date
- Sep 2010
- Posts
- 304
Bwahaha! My Arduino Mega is here! –
09-27-2010,12:17 PM
-
09-27-2010,12:22 PM
What do you need to program the board?
-
The Great Pumpkin
- Join Date
- Sep 2010
- Posts
- 304
09-27-2010,12:32 PM
Board hooks to your PC via USB.
You use the free programming software/SDK/whatever you want to call it. Which also compiles and loads the code on the board for you.
The code functions a lot like programming in C. It's crazy simple. For example, if you had a LED hooked up to pins 2, 3 and 4, and wanted to cycle them 1 at a time, every second, here's the code:
void setup() {
// initialize the digital pins as an output.
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
}
int led = 2;
void loop() {
digitalWrite(led, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(led, LOW); // set the LED off
led = led + 1;
if(led > 4)
led = 2;
}
And thats IT... the loop says send 5v to pin 'led' (which starts at 2), wait 1 second, then turn the pin off. Increment 'led' by 1... if it's higher than 4, send it back to 2.
And it loops.
Its one of the most amazing pieces of hardware I've ever seen for... well... anything... you could build a robot, a security system, a real-world interface for your computer (use a proximity sensor to see how close you are to it... use accelerometers for control). Using the outputs you can control darn near anything.
Oh, and it has addons... ethernet, wifi, bluetooth, RFID...
I bought the Mega board - it has more IO. The standard board is smaller, and cheaper.
Here's the standard at sparkfun (where I got mine. Good people there)
http://www.sparkfun.com/commerce/pro...roducts_id=666
Its only $25.
I got the mega - $64 (now $50 - I gotta email them about that) because it has a lot more capacity.
-
09-27-2010,12:43 PM
Hmmm, easy if you are familiar with the syntax. I was hoping it had some kind of graphical interface like VSA or at least something like Exorcist. After all of these years, I still break out in a rash when I see anything that looks like DOS!
-
The Great Pumpkin
- Join Date
- Sep 2010
- Posts
- 304
-
Zombie
- Join Date
- Oct 2008
- Posts
- 20
10-20-2010,11:41 AM
Arudiono's are great, but that's what the person who started the thread was talking about. They program in a C-like syntax. Arduino just adds some hidden code (and a couple of constraints) to make it easier to use. It's not a visual programming approach. BUT don't let that stop you. For things like prop control it's very easy, and since there is tons of sample code (starting with the "Hello World" equivalent of making an LED blink on and off), it's easy to get started and program what you want building from the existing samples. For a pure beginner, check out the book [ame="http://www.amazon.com/Getting-Started-Arduino-Make-Projects/dp/0596155514"]Getting Started with Arduino[/ame]
If you know anything about electronics and microocontrollers, it's likely far to simple a book, check out the free on-line info. But for a newbie, it's a great intro.
-
The Great Pumpkin
- Join Date
- Sep 2010
- Posts
- 304
10-20-2010,12:06 PM
Oh absolutely. I've been programming it for a few weeks now, and it's going live on friday.
Heres what I have my arduino doing:
It monitors a laser tripwire. When broken it sets off a spider victim (turns on and off a wiper motor at random intervals).
It monitors a motion sensor - when activated it turns on a pump that spews black fluid out a zombie's mouth, and turns the zombies motor on.
It monitors another motion sensor. When it sees activity it fires up a coffin animatronic. It makes the lid rattle by turning on a wiper motor. It makes the fogger turn on IF the fogger is ready (it reads a light sensor attached to the fogger's ready-light). It makes a ultra-bright green LED flicker randomly, and lastly through the built in serial link, it chooses some random mp3 files to play from a mp3 breakout board I bought that's serial controlled. All of these are also random as for times, sounds, light, etc... so it's never the same thing each time its triggered.
All three of these functions can also be manually turned on by pressing buttons on a control box I made, as well as a global killswitch toggle on the control box to shut everything down in case there are little kids too scared of the props to approach.
When it's time to shut down for the night, I flip another switch and it puts the arduino into surveillance mode... instead of triggering zombies and coffins, the motion sensors instead trigger floodlights. I'm considering having it play a MP3 that states the area is under video surveillance as well as an audible warning to anyone trying to screw with my haunt.
All this is controlled by a little circuit board, programmed by myself to do EXACTLY what I want it to do.
I'm more trilled now than when I posted the OP.
-
10-20-2010,12:15 PM
Seriously there needs to be a drooly smiley. I just got a cold chill as the geek wave washed over me.
I would love to do something like this and someday will....
And, /*drool*/ command line code...
My favorite!
-
The Great Pumpkin
- Join Date
- Sep 2010
- Posts
- 304
10-20-2010,12:18 PM
It was a LOT of work getting it here.
I had to build a relay board to control the higher voltage/AC devices. I bought a few but they took forever to arrive, and I'm a geek - I knew I could make my own cheaper.
I had to build a "shield" - its a circuit board that attaches to the arduino to give me the pinouts I need... like power, ground, connectors for all the wires, etc.
Its been a labor of love, and its pretty awesome. My goal is to have everything done by Friday evening... I'll see if I can grab some videos.



LinkBack URL
About LinkBacks
Bwahaha! My Arduino Mega is here!



Bookmarks