Spooky Coding Pumpkin

Introduction: Spooky Coding Pumpkin

This project was fun for our intro to programming class:). We are no experts at coding or pumpkin carving so it was a very interesting concept to come up with and our results were great.

Supplies

There is a good amount of supplies to gather up so we took the liberty of including where we obtained most of the materials.

- Arduino and USB connector, usually included https://www.amazon.com/Arduino-A000066-ARDUINO-UNO...

- LED lights https://www.amazon.com/Diffused-Lighting-Electroni...

- wires https://www.amazon.com/EDGELEC-Breadboard-Optional...

- resistors https://www.amazon.com/Elegoo-Values-Resistor-Asso...

- breadboard https://www.amazon.com/gp/product/B00LSG5BJK/ref=p...

- pumpkin (fairly large) from any grocery store

- carving tools from wal-mart

- 3D printer (optional for a base), ours was provided by our amazing intro professor

- and lastly a computer with a USB connection unit

These items come in a large bulk, for multiple uses. There is also the option of buying a kit with all the things included, large variety online. :)

Step 1: Basic Carving

You may choose to carve your pumpkin as you wish:). For our project we decided to be a little punny and give it something engineering related, "Trick or Code" LOL. Grab your carving tools and your creativity, BEGIN! This was my first attempt at carving and I feel like it turned out ok, so beginners are welcome to take a crack at it.

Step 2: Code

For our coding process we used the program Octave, its installation was very simple. Once the installation process is complete, you must connect your Arduino to the computer and ensure that it connects. After it connects, we are ready to begin the coding process. Here is our code for an example:

For each LED, you assign it a spot in the Arduino, ex: LED1 would belong to spot 13 on the Arduino. Once a spot for each LED is placed into the code, the rest of the code can be written. This code can be expanded to work with multiple LEDs, or even fewer ones. It can also be used to your liking by changing speed and time for each one.

int LED1 = 13;

int LED2 = 12;

int LED3 = 11;

int LED4 = 10;

int LED5 = 9;

void setup ()

{

pinMode(LED1, OUTPUT);

pinMode(LED2, OUTPUT);

pinMode(LED3, OUTPUT);

pinMode(LED4, OUTPUT);

pinMode(LED5, OUTPUT);

}

void loop()

{

digitalWrite(LED1, HIGH); /*Turn on LED1*/

delay(230); /*Wait 230 milliseconds, (time can be changed to desired) */

digitalWrite(LED3, HIGH); /*Turn on LED3*/

delay(230); /*Wait 230 milliseconds, (time can be changed to desired) */

digitalWrite(LED2, HIGH); /*Turn on LED2*/

delay(230); /*Wait 230 milliseconds, (time can be changed to desired) */

digitalWrite(LED5, HIGH); /*Turn on LED5*/

delay(230); /*Wait 230 milliseconds, (time can be changed to desired) */

digitalWrite(LED4, HIGH); /*Turn on LED4*/

delay(230); /*Wait 230 milliseconds, (time can be changed to desired) */

digitalWrite(LED1, LOW); /*Turn off LED1*/

delay(400); /*Wait 400 milliseconds, (time can be changed to desired) */

digitalWrite(LED3, LOW); /*Turn off LED3*/

delay(400); /*Wait 400 milliseconds, (time can be changed to desired) */

digitalWrite(LED2, LOW); /*Turn off LED2*/

delay(400); /*Wait 400 milliseconds, (time can be changed to desired) */

digitalWrite(LED5, LOW); /*Turn off LED5*/

delay(400); /*Wait 400 milliseconds, (time can be changed to desired) */

digitalWrite(LED4, LOW); /*Turn off LED4*/

delay(400); /*Wait 400 milliseconds, (time can be changed to desired) */

}

Step 3: THE BUILD

Now it is time for the main build, the actual circuit!!! For this part you must gather up all your materials and we will give you a step by step to this simple build.

For the first step you need to examine the Arduino, breadboard and LED lights. For the Arduino, you will notice that there is connections that are numbered on the side, kind of looks like a wire fits inside (it does!!). For the breadboard, you will see small holes throughout it, these are for all the connections, you will see that each hole has a specific number and letter assigned to it, this is key to ensuring connectivity. And lastly, examine the LED lights, you will see that one side is longer and one side is shorter. This is key to ensuring a connectivity because the long side is always negative and the short side is positive.

For our first step we will be connecting a black wire from the Arduino hole labeled GND to a positive hole on either side of the breadboard.

This will ensure that there is a connection from the breadboard to the Arduino. Up next we will be extending five resistors from the positive hole in the breadboard a labeled hole in the breadboard, such as A29, A25, A20, A15, and A10, ensuring that they are spaced out to give the lights some space to shine.

Right beside these resistors we will be placing wires, color doesn't matter, however, we did choose to go for a color coordinating system, thought it would make it look neater. So for example, say you put the resistors on the exact spots I mentioned, you would put the wires on A30, A26, A21, A16, A11.

Next we place the bulbs directly on top of these on row B (if desired position is like ours). The key is to have the negative leg of the bulbs directly on top/below the resistors and for the positive leg to be on top/below of the wire. To ensure positive to negative, vice versa, connectivity. or else this will not function and no lights will be turned on.

Once the setup is complete, we will be connecting the Arduino to the USB and the USB to the computer, with the code already inputted and program already open so that we may easily check for functionality.

If it works and the circuit was correctly built, you will get quite the light show, if not then no worries, go back and double check your work to correctly build an awesome circuit, YOU GOT THIS!

A simple way to ensure that there is connection would be to build the small circuit on TinkerCad first and repeat the steps IRL for a much simplified version, rather than having to struggle to build, take apart, and rebuild.

Step 4: 3D Base (optional)

Since this build is going into an ooey gooey pumpkin, we thought it would be nice to add a base on the inside, our professor suggested to try to take a crack at working with AutoCad, such as TinkerCad or Inventor, in our case we worked with both and got to experience working with them firsthand.

For our both of our inventions we went ahead and decided on a simple base to fit the pumpkins round inside, but we did know that we would want the breadboard and Arduino to be stuck in place rather than just being free on the inside, being able to wiggle around.

Our rough draft was in TinkerCad and our final result that we actually 3D printed was in Inventor. It took us a little over 2 hours to get such a simple design finalized, truly difficult but an awesome experience.

We took our measurements in inches for our pumpkin, our breadboard, and our Arduino to ensure that

1. our base was small enough to fit into the pumpkin, we recommend a large pumpkin.

2. The hollowed out space was large enough to allow the Arduino and breadboard to have some wiggle room but that it wasn't too deep so that they would still be visible from the side.

Step 5: Results

A fully carved pumpkin with an over the top light show!!!! Pretty awesome regardless:). This project was a fun experience and I really enjoyed creating it. It was pretty stressful but overall, but when Halloween night came and I had an awesome project to put on display outdoors with some Halloween music on blast, I forgot all about the work and only enjoyed the display.

Be the First to Share

    Recommendations

    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Tinkercad to Fusion 360 Challenge

      Tinkercad to Fusion 360 Challenge
    • Science Fair Challenge

      Science Fair Challenge

    Comments

    0
    randofo
    randofo

    1 year ago

    Blinky pumpkin light show!