loading
In this Instructable, we'll teach you how to create your own "Would you rather... " board game using conductive paint, an Arduino microcontroller, and some electronics components. Players take turns moving along the game path as directed by an electronic dice roll. Along the way, they answer questions each time their piece lands on an illuminating "special" spot.

This design can be adapted to any other game you like!

The "Would you rather..." game in action:

Step 1: Ingredients

Step 2: Design the Game

Draw a schematic (or two) which accounts for both the physical layout and interactivity of your game.
Just as with wires, your conductive paint traces cannot cross. All of the game piece (LED board) positive contacts should be on one side of the game path, while all of the negative contacts are on the other. This way, you can power the "special" spots in parallel.

Outline the game path (in pencil) on the magnetic paper.
Make sure that the width of the path is slightly less than the length of the game pieces. Sketch the conductive paths between game piece contacts and power.

Draw footprints and conductive traces for the Arduino-driven dice-roller.
Make sure to leave room on the game board for your Arduino mainboard, which will control a push-button dice-roller. Sketch the conductive paths between three LEDS, a switch, and the Arduino mainboard.

Step 3: Paint Conductive Path(s)

Prepare the conductive paint.
Thoroughly stir the conductive paint to ensure uniform distribution of copper particles. (If you don't do this, your painted paths will not be very conductive.) Using a syringe, transfer a small amount of paint into a smaller container. This will prevent your entire supply of conductive paint from oxidizing. Be sure to reseal your main paint supply before continuing!

Paint over your sketched conductive paths with conductive paint.
Although it may be tempting to paint thin and tidy lines, your paths will conduct best if they are at least 1/2" wide. (Note the increased path width in our pictures below.) Make sure that your conductive paths are distanced far enough from the game path - otherwise, the game pieces will light up on every spot instead of just on the "special" spots.

Test your conductive paths for continuity.
Let your paint dry completely. Then, use a multimeter to verify that you have continuity all along your conductive paths. If you're finding breaks in continuity, reinforce your paths with another layer of conductive paint. For instructions on how to use a multimeter see:
http://www.ehow.com/how_2043011_use-multimeter.html

Step 4: Prepare Circuit With Arduino Duemilanove

Set up your Arduino mainboard and software.
For help getting started with Arduino, visit: http://arduino.cc/en/Guide/HomePage. To make sure that your configuration is working, try running the "Blink" example: http://www.arduino.cc/en/Tutorial/Blink

Detect a button press.
Modify the code for "Blink" so that digital pin 6 is set high and is outputting 5 volts. This way, when the circuit is closed by a button press, the voltage is read from pin 5. When the button is not pressed, the circuit is open and analog pin 5 is reading 0.

int ledPin = 13; // LED connected to digital pin 13
int powerPin = 6; // digital 6
int btnPin = 5; // analog 5
int btnValue = 0;
int prevValue = 0;
boolean isPressed = false;

void setup() // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
pinMode(btnPin, INPUT); // take 5V in, pass it on to pin 5
Serial.begin(9600);
}

void loop() // run over and over again
{
digitalWrite(powerPin, HIGH); // send 5V out
btnValue = analogRead(btnPin);
if(btnValue > 512 && prevValue < 512) {
Serial.println("Pressed");
digitalWrite(ledPin, HIGH);
delay(500);
}
else if (btnValue < 512 && prevValue > 512) {
Serial.println("Released");
digitalWrite(ledPin, LOW);
}
else {
digitalWrite(ledPin, LOW);
}
prevValue = btnValue;
}

Add LEDs to your circuit, one at a time, and modify your code to ensure that you can control each one individually when the button is pressed.

int ledPin = 13; // LED connected to digital pin 13
int powerPin = 6; // digital 6
int btnPin = 5; // analog 5
int btnValue = 0;
int prevValue = 0;
boolean isPressed = false;
long randomPin = 0;
int led2 = 2;
int led3 = 3;
int led4 = 4;
int threashold = 700;

void setup() // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
pinMode(btnPin, INPUT); // take 5V in, pass it onto pin 5
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
Serial.begin(9600);
}

void loop() // run over and over again
{
digitalWrite(powerPin, HIGH); // send 5V out
btnValue = analogRead(btnPin);
//Serial.println(btnValue);
if(btnValue >= threashold && prevValue <= threashold) {
//Serial.println("Pressed");
digitalWrite(randomPin, LOW);
}
else if (btnValue < threashold && prevValue > threashold) {
//Serial.println("Released");
if (prevValue - btnValue > 50) {
Serial.println("LED ON");
randomPin = random(2, 5); // 2, 3, 4
Serial.println(randomPin);
digitalWrite(randomPin, HIGH);
delay(1000);
}
digitalWrite(randomPin, LOW);
}
prevValue = btnValue;
digitalWrite(randomPin, LOW);
delay(50);
}

Continue to modify your code so that now a random LED turns on when the button is pressed.

int ledPin = 13; // LED connected to digital pin 13
int powerPin = 6; // digital 6
int btnPin = 5; // analog 5
int btnValue = 0;
int prevValue = 0;
boolean isPressed = false;
long randomPin = 0;
int led2 = 2;
int led3 = 3;
int led4 = 4;
int threashold = 700;
int prevRandom = 0;

void setup() // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
pinMode(btnPin, INPUT); // take 5V in, pass it onto pin 5
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);

Serial.begin(9600);
}

void loop() // run over and over again
{
digitalWrite(powerPin, HIGH); // send 5V out
btnValue = analogRead(btnPin);
//Serial.println(btnValue);
if(btnValue >= threashold && prevValue <= threashold) {
//Serial.println("Pressed");
digitalWrite(randomPin, LOW);
}
else if (btnValue < threashold && prevValue > threashold) {
//Serial.println("Released");
if (prevValue - btnValue > 50) {
Serial.println("LED ON");

// turn on leds randomly
for (int i = 0; i < 5; i++) {
digitalWrite(2, HIGH);
delay(200);
digitalWrite(2, LOW);
delay(100);
digitalWrite(3, HIGH);
delay(200);
digitalWrite(3, LOW);
delay(100);
digitalWrite(4, HIGH);
delay(200);
digitalWrite(4, LOW);
delay(100);
}

delay(1000);

// turn on the correct/random pin
randomPin = random(2, 5); // 2, 3, 4
Serial.println(randomPin);
digitalWrite(randomPin, HIGH);
delay(5000);
}
digitalWrite(randomPin, LOW);
}
prevValue = btnValue;
digitalWrite(randomPin, LOW);
delay(50);
}

Modify your code further so that now, the LEDs blink for a few moments before illuminating one randomly selected LED. This LED will indicate how many spaces a player may move her game piece.

//int ledPin = 13; // LED connected to digital pin 13
int powerPin = 14; // digital 6
int btnPin = 2; // analog 5
int btnValue = 0;
int prevValue = 0;
boolean isPressed = false;
long randomPin = 0;
int threashold = 700;
int prevRandom = 0;
// LEDs 19, 10 11
int led1 = 19;
int led2 = 10;
int led3 = 11;

void setup() // run once, when the sketch starts
{
pinMode(btnPin, INPUT); // take 5V in, pass it onto pin 5
pinMode(powerPin, OUTPUT);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);

Serial.begin(9600);
}

void loop() // run over and over again
{
digitalWrite(powerPin, HIGH); // send 5V out
btnValue = analogRead(btnPin);
//Serial.println(btnValue);
if(btnValue >= threashold && prevValue <= threashold) {
//Serial.println("Pressed");
digitalWrite(randomPin, LOW);
}
else if (btnValue < threashold && prevValue > threashold) {
//Serial.println("Released");
if (prevValue - btnValue > 50) {
Serial.println("LED ON");

// turn on leds randomly
for (int i = 0; i < 5; i++) {
digitalWrite(led1, HIGH);
delay(200);
digitalWrite(led1, LOW);
delay(100);
digitalWrite(led2, HIGH);
delay(200);
digitalWrite(led2, LOW);
delay(100);
digitalWrite(led3, HIGH);
delay(200);
digitalWrite(led3, LOW);
delay(100);
}

delay(1000);

// turn on the correct/random pin
randomPin = random(1, 4); // 1, 2, 3
Serial.println(randomPin);
if (randomPin == 1) {
randomPin = led1;
}
else if (randomPin == 2) {
randomPin = led2;
}
else {
randomPin = led3;
}
digitalWrite(randomPin, HIGH);
delay(5000);
}
digitalWrite(randomPin, LOW);
}
prevValue = btnValue;
digitalWrite(randomPin, LOW);
delay(50);
}

Step 5: Port the Circuit to Paper Computing Arduino

If you have access to a paper computing mainboard, you can now port the circuit from the previous step. In order to integrate the paper computing Arduino mainboard and components into the board game, you'll need to do the following:

Update your code.
Change the pin numbers and adjust the threshold for detecting button presses from 512 to 300. Test your setup using alligator clips while the Arduino mainboard is connected to your computer.

// Variables
int powerPin = 17; // digital 17
int btnPin = 3; // analog 3

int btnValue = 0;

boolean isPressed = false;
int counter = 0;
long randomPin = 0;

// LEDs array: 19, 10 11
int led[]={
10,11,19};
int th = 100;

void setup() // run once, when the sketch starts
{
pinMode(btnPin, INPUT); // take 5v in, pass it onto pin 5
pinMode(powerPin, OUTPUT);

pinMode(led[0], OUTPUT);
pinMode(led[1], OUTPUT);
pinMode(led[2], OUTPUT);

Serial.begin(9600);
}

void loop() // run over and over again
{

digitalWrite(powerPin, HIGH); // send 5v to out
btnValue = analogRead(btnPin);

//Serial.println(btnValue);

if(btnValue <= th)
{
counter++;

if (counter > 5)
{
Serial.println("LED ON");

// turn on leds randomly
for (int i = 0; i < 5; i++)
{
for(int j=0; j<3; j++)
{
digitalWrite(led[j], HIGH);
delay(200);
digitalWrite(led[j], LOW);
delay(100);
}
}

delay(1000);

randomPin = random(0, 3); // 0, 1, 2
Serial.println(led[randomPin]);

digitalWrite(led[randomPin], HIGH);
delay(5000);

digitalWrite(led[randomPin], LOW);
delay(50);

counter = 0;

} // counter if close
} // if <100 close
else
{
counter = 0;
th= (th +100)%1000;
}

}

Update the game board.
Attach three surface mount LEDs and a push button to the game board (with glue). Paint the associated conductive paths, again testing for continuity.

Step 6: Assemble Game Board and Pieces

Paint the board spaces and background.
Paint each space a different color, leaving the game piece contacts exposed on the "special" spots. Then paint the background of the game board - it's fine to paint over your conductive paths.

Create the game cards.
Write "Would you rather..." styled questions on one side of the blank playing cards. Glue a magnet to the center of the opposite side of each card, so that they will stick together and to the board.

Customize the game pieces.
Add a different colored sticker to each of the game pieces in order to differentiate them. If you position the sticker over the LED, then you'll get a glowing effect when the LEDs illuminate on "special" spots.

Finishing Touches!
Use puff paint to write "START" and "END" on the respective spaces. Write the game title at the top of the board using a permanent marker/Sharpie. Indicate the numerical values "1", "2", and "3" near each surface mount LED with a permanent marker.

Step 7: Play!

Instructions for game play:

To start the game, the first player presses the button.

Depending on which light stays on, move 1, 2, or 3 spaces along the game path.

If you land on a "special" spot (with conductive paint contacts)...
- Move your piece so that it matches up with the conductive paint contacts and lights up.
- Turn over a card and answer the question.

If you land on a normal space, it is the next player's turn.
An arduino is complete overkill for this, unless i missed something. Any micocontroller is overkill for this, and the arduinos are $20-$30. the arduino could be replaced with a couple batterys.
It's main use is for the electronic die, you could play without it, but the flashing lights are a feature. L
"unless i missed something" the electronic die explains it :P
If students are playing games like this, cards &amp; <em>alcohol</em> are all you need...<br/><br/>L<br/>

About This Instructable

8,865views

12favorites

License:

More by game-dice:How To Make A Board Game Using Arduino 
Add instructable to: