Posts

Showing posts from October, 2025

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...

Knock Lock: Using the piezo input feature to create a coded lock

Image
      The basis of this project was based on using the piezo as an input device, rather than the output one used in previous projects. The piezo used here scans for three consecutive knocks in order for the lock to be turned off. There were a large amount of parts used in this project, with the most important three being the piezo, the three LED's, and the servo motor. The piezo is connected to the analog 0 pin, using the analog input to properly display the loudness of the knock. The outputs are connected to the LED's in digital pins 3, 4, and 5. When the switch pressed connected to 2, it will move the servo to the locked position. When three knock are knocked on the piezo, the yellow LED will flash for each knock, and if properly done, then the green LED will turn on and the servo will move into the unlocked position. The code works by setting up the piezo, switch, LED's, and servo/capacitor to their pins as needed, and their correct input/output functions. The loop fun...

Crystal Ball: Making a magic 8 ball from a LCD display and a tilt sensor

Image
      The basis of this project was having a Liquid Crystal Display (LCD) print messages (just as a magic 8 ball would) on its screen after you would have flipped it. LCD's work by magnetizing crystals in the liquid, and they create shadows that appear as the text in the display. The parts needed are the LCD, tilt sensor, and a variety of resistors, as well as a ton of wire. The LCD has 16 inputs, for a variety of reasons (which I am still learning), but some of the main ones are: Pin 1 being negative, pin 16 being negative for backlight, pin 15 being positive for backlight, and pin 5, which determines if it is read or write mode based on a HIGH or LOW input. The code works by using a switch case and a random number generator to change the text prompt every time the tilt switch detects movement. The prevSwitchState is there so that you cannot get the same case twice in a row, and multiples are impossible. The lcd.begin tell the LCD how much we are going to use (16 charact...

Making a ZOETROPE: Combing a DC motor, Potentiometer, buttons, and a 9v to create a moving picture

Image
     This project was based on a Zoetrope, a sort of "moving picture" that is created by spinning different frames of an image quickly in a circle so it "animates" to your eye. These animations usually have 16 frames, and can be slowed down or sped up based on how fast you rotate the motor.     The parts include a DC motor, which spins super based on power input. The H bridge controls the DC motor through 4 input channels, and when combined with the potentiometer you can alter the speed of the Motor while it is running. There are two buttons for controlling when the motor is on, and what direction it spins in. The 9v is connected to the right hand side of the board, and only powers the DC through the H-bridge. The buttons are connected to the 2 and 3 pins, with on off on 3, and directional change on 2. The three outputs go to the H-bridge where they regulate the DC motor. The motor speed is determined by the potentiometer, and the loop function checks to see the...