Posts

Final Project: Reusing the Snake board design to create Tetris with the Arduino

Image
      This project is my final one, and I am super happy and sad to be at the end. I have learned so much in this course, and also had so much fun. There was a lot of creativity and design in making these projects, and I got to work hands on in NMID for the first time, which is something I will never say no to. This project layout will be the one I keep my Arduino as. The board setup works between my Snake and Tetris code, and is a great way to show what I learned in this class. The components for this one are the same as the Snake Arduino setup. The joystick is necessary for movement controls, like it was in Snake. Left and right move the pieces, down sends the pieces downwards, and up rotates the pieces so you can control their fit. The 8x8 LED array is meant to convey what the current game-board looks like, and when your current piece under control is moving. The last parts are the wire connectors, which connect the 5v, Ground, 8x8 LED array, and Joystick all to the Ar...

Art Meets Engineering: Using an Arduino compatible microphone to create light based on sound

Image
      This weeks project was based on using good engineering principals to create art. I tend not to be a very artistic person in general, but when I thought about art, I tend to think of movies, and moving colors, so I can up with the idea for colors to move based on the "strength" of your voice. While the piezo can detect stuff such as taps, I needed a microphone to detect actual sound input, so I had to order one off of Amazon. In the parts diagram below, swap out the piezo for the microphone, but everything else is exactly what I used. I connected all the regular LED's to digital pins 2-8 and 12, so that way I could just send a simple High/Low when I needed them on or off. I connected the RGB LED's pins to digital 9-11, so that way I could use the PWM technique to get analog results from a digital pin. I connected the final pin to ground. The microphone is connected to the 5V, ground, 0 digital pin, and the A0 analog pin to out put the digital and analog results. ...

Fun With Unity: Using an alternate controller to move a cube in Unity

Image
      This project used a potentiometer to control a cube in unity. The two programs were connected with serial through the Arduino IDE. The set up for the project was very simple, a potentiometer to move the cube, and a LED connected so we would know when the Arduino was running. The Potentiometer was outputting to Analog 0, so that way we could control a variable speed, and possibly have the cube stagnate, which couldn't be done with a digital pin. The LED is connected to digital 7, because we only need a high low to make it work. This project was very easy to complete, since all the instructions were written out for us. It was fun to get to use Unity again, which I have in the past, and also see how even a regular controller can be controlled through Unity, and also an alternate one. Tying in C# to the two connects things very well for me. Link to video showing work

Alternate Controller Project: Using a joystick to play borderless snake

Image
      This project was based around the game of snake, where to goal is to eat enough apples to make the snake fill the entire screen of the game. Once this is done, you have won. But if you run into yourself, then you die and have to restart. The gameplay is through the joystick, which is irregular for the game on snake, usually played on a keyboard using the arrow keys or aswd. I would usually include here a CSV snapshot that shows all the parts of the project, but since TinkerCAD didn't have most of the parts required, I will just list them out here. 1 Arduino Uno 1 Breadboard 5 male to male Arduino wires 4 male to female Arduino wires 1 Arduino 8x8 compatible LED display 1 Arduino compatible Joystick Both the 8x8 LED and the Joystick had to be bought separately from the "base" Arduino kit. As such, they required research into them to make sure I got the right parts, as well as how to use an implement them properly. One of the big mistakes I made involved the 8x8 LED, ...

Plant Problem Project: Using a Moisture Sensor to detect hydration levels in a plant

Image
      This project was based around using a moisture sensor to detect water levels in a plant pot, and using the outputted moisture levels to turn a LED on correctly based on the said water level. The three LED's used were the Red, Yellow, and Green. Red was a critical water level signal, at 1/3 and below moisture level. Yellow is the warning light, between 1/3 and 2/3 moisture level. Green is ok water level, and 2/3 and above moisture level. The Moisture sensor is the first sensor in this series that is not from the base Arduino kit, and is something that had to be sourced externally, through Amazon. The project was simple to make, and didn't require much on the hardware engineering side. I plugged the input side of the LED's into the D2, D3, and D4 pins for the Red, Yellow, and Green LED's respectively. I also plugged them into ground as-well. The moisture sensor required three inputs to function. One is the standard ground, the VCC is connected to the D8 pin, and the...

Tweak the Logo: Using serial connection and the processing app to make a background change color

Image
      This project was based around using the Processing coding software in conjunction with Serial.write monitering the current angle of a potentiometer to change the background color on the Arduino logo. The components here are super simple, just being the potentiometer and the Arduino itself. The potentiometer works by outputting the current angle that is twisted to. It is connected to the power and ground, and its output pin is connected to the Analog 0 slot, which is needed to convey the exact degree it is at. This is by far the most complicated coding I have ever done on any of the Arduino projects, for two reasons. The first is that this time we had to use two applications, one being the Arduino IDE which had a simple code uploaded that just wrote the current value of A0/4 to the monitor. The tough part came in when we needed to use a secondary coding platform, "Processing", in order to modify the background color of the Arduino logo. This project was based ar...

Touchy-Feely Lamp: Using the human body as a natural capacitor

Image
      The basis of this project is using the human body's natural capacitance (ability to hold electrical charge) to turn on a LED. The body can hold an electrical charge, and when touching a the wire connected to the Arduino, the LED will turn on.  This is one of the least complicated circuits we have done yet, with just 2 resistors a red LED, and out human hand (labeled potato battery on the csv) to run this circuit. Two wires are connected to digital ports 2 and 4, with a 1 M ohm resistor spanning them, and the "touching" wire on the 2 port one chain. Then another wire connected to the 12 digital port and a 220 ohm resistor make the red LED part of the circuit. The code utilizes the Capacitative Sensor Library, that you have to import into the code, shown in the first line of code. This allows you to initialize the CapacitiveSensor (your own body) with the two ports 4 and 2. We then set a capacitor threshold, that while the loop() function is running, we are check...