Magic 8

150

2

We were wondering how to make a magic 8 ball without the magic 8 ball, so we decided to make one using an Arduino board, this Instructable will tell you how to make a working board, also it can be customized to whatever sayings that you want.

Supplies:

Step 1: Gathering Materials

1. You will need to get an Arduino Red Board.

2. The Arduino Software from https://www.arduino.cc/en/Main/Software

3. 2 blue, 3 yellow, 3 green, 3 white, 1 grey, 1 purple, 2 red wires

4. Liquid Crystal Display

4. 1 potentiometer

5. 1 Tilt sensor

6. 10-kilohm resister, 220-ohm resistor

7. 1 breadboard

8. 3 yellow, 1 blue jumper wires

Step 2: Building the Board

1. Start off with a arduino and a breadboard.

2. Take two wires and plug them into the ground and 5v port of the arduino. Then take the other end of the wires and plug it into the breadboard with the 5v in the positive (red) and ground to the negative (black). This should be done on the top left of the breadboard and the first two rows.

3. On the bottom left send the two wires from the positive and negative to row i with the negative wire being the lowest wire and the red wire is above it.

4. Put two wires into the arduino at 12 and 11 and then plug the other end into the breadboard. You take the one that you plugged into the 12 and put it in row i and the 4th column to the bottom. The wire that you plugged into the 11 goes right above the other wire and should be in row i (5th column from the bottom).

5. Get four more wires to plug into the arduino. Plug the wires into the 2, 3, 4, 5, and 6 ports. 5 port goes to the (11th port of the breadboard from the bottom in row i). 4 port goes to the (12th port of breadboard from the bottom in row i). 3rd port goes to the (13th port of the breadboard from the bottom in row i). 2nd port goes to the (14th port of the breadboard from the bottom in row i). The wire in the 6th port goes to row a and the fourth column form the top.

6. Take one wire and plug it into the breadboard in the positive spot like in step 2 and take the other end of it and plug it into row a column 3. Across from that will be the tilt sensor 4 pin. This will be placed to the right side of it with the front of the sensor facing left. This is plugged into row d column 3. Left of the tilt sensor their is a 10 kilaohm resistor. The top of the resistor should be brown and can be placed at row b column 4. The bottom of the resister should be gold/yellow and can go into row b column 8. Then left of the resister their is a ground wire that travels from the negative port to row a column 8.

7. Next is a positive wire that goes from row 10 in the positive port and the other end goes to row a and column 10. Below that a wire is placed at row b and column 11 and goes to row i column 28. Then their should be another negative wire coming from the negative port of column 12 that goes to row a column 12. Right of all the wires a potentiometer is placed with a resistance of 250 kilaohm. The first prong of the potententiometer should be placed on row d and column 10. The rest of the prongs should go below that as in column 11 and 12. In the negative port their is a wire at column 15 and goes to row i column 15. In the positive port their is a 220 resister and the gold end goes to the positive port and the orange part goes to row a column 16. On column 16 on the right of the resister on row c and column 16 and manipulate it towards row i column 16.

8. Last but not least place two more wires on the arduino at ports 11 and 12. The wire in port 12 goes to the breadboard and plugs into row i column 27. Port 11 wire then goes to the breadboard at row i column 25. The final piece is the LCD 16X2. The ground of the LCD should be at the bottom of the breadboard and the top of the LCD should read LED. The LCD goes to row j and is placed at the top at column 15 all the way down to column 30.

Step 3: Writing the Code

See pictures for code, also make sure you add the lcd into your code under the library tab.

After you wrote that code upload it to your board and shake to view your first magic 8 ball answer

Arduino Contest 2019

This is an entry in the
Arduino Contest 2019

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Arduino Contest 2019

      Arduino Contest 2019
    • Gardening Contest

      Gardening Contest

    2 Discussions

    0
    None
    joen

    13 days ago

    Hi. I like your idea about making an electronic 8 Ball. Sadly I don't have the electronic hardware you have but I was able to make the equivalent formula in Excel. Columns A and B are written as is. The formula in C:1 is "=RANDBETWEEN(1,8)". I expanded D:1 to make it more readable but it is not necessary. The formula there is "=LOOKUP(C1,A1:A8,B1:B8)". C:2 is just an open cell with a number in it to trigger C:1's random number. Just double click C:2 and then click on any empty cell to "shake" the 8 BALL. Thanks for giving me something to play with for a while.
    Please take care.

    Screenshot 2019-05-10 15.07.43.png
    0
    None
    seamster

    16 days ago

    Cool, do you plan to put this into any kind of enclosure or housing? That would complete it nicely I'd think.