Intro to Arduino
Intro to Arduino
This week, we learned to use an Arduino. As a computer science major, I was pretty comfortable with coding, but was fairly new to using electric components. Thankfully, the course was quite clear on what I had to do, so I did not have much trouble with using the Arduino.
Blinking LED Lights
The first thing I did was connect an LED to the Arduino. There were multiple pins on the board, and I could control each of the pins by interacting with the numbers in the code. The + side of the LEDs would go into the numbered pins, and the – side of the LEDs would go to a ground pin. Once I was able to turn the LED on and off, I then moved on to making it blink in morse code, which was pretty straightforward.
The next thing I did was make a touch sensor that controls the LED. I added a very simple addition to the blinking LED I had. It was just a resistor and an alligator clip. With just the two additional components, I was able to make a touch sensor. When I touched the alligator clip, the light would turn off, and when I didn’t touch the clip, the light would turn on.
Custom Arduino Device
For the custom Arduino device, I decided to use a joystick and an RGB LED. The idea is to be able to individually control the RGB components using the joystick. Moving left and right cycles through the RGBs, and moving up and down controls the light intensity of the selected color. Pressing the joystick would set the LED to a random color. There were plenty of online resources that I could use, so figuring out which pin on the LED and joystick went to which pins on the board wasn’t difficult at all.
My purpose of the device was to prototype something similar to the Scribble Pen. The Scribble Pen is a pen with an RGB sensor, that can copy any color and use the color to write or draw with. While the concept is very interesting, I could not find any information on whether it was possible to modify the scanned color to the user’s liking. Not being able to change the color of your pen unless there is an object nearby with the exact same color you want, would be very frustrating. So, this joystick add on would enable the user to make slight modifications to an already scanned color, or come up with a new color that hasn’t been scanned by the pen.
I was able to make the custom device as I wanted, except for setting the LED to a random color. For some reason, the joystick was constantly saying that the button was pressed, even when nothing was touching it. I planned to try it with another joystick, but unfortunately, all the joysticks were rented out by the time I had a chance to visit the lab again. However, apart from that, I would say that my project was quite successful.
Scribble Pen: https://scribblepen.com/ (probably not a real product)