Monday, February 29, 2016

ArduiNo? More like ArduiYes.

Activities: Learn basic use of the Arduino microcontroller through partner programming.

Partner: Katrina Montales

1. Blink with a delay of 10 - the delay is in milliseconds, so the LED is turning and off so fast that it looks like a continuous stream of light (similar to the fluorescent lights in most of our buildings). If we were to take a high speed video, we would be able to see the the LED flashing on and off.



2. Pattern with (at least) 3 LEDs of different colors using the delay() function


With each new LED, we set the delay to be of different intervals. This was simple, yet gratifying at the same exact time. Getting this little step to work felt extremely rewarding. Something about building something with your own hands feels very empowering, like "I made that!!!" 

3. The potentiometer takes in the input based on where the knob is pointing (the resistance) and sets that to be the value to be the delay between the LED flashing on and off. This was cool to see how we could directly change the input through the potentiometer through hardware changes rather than software changes.




4. Pattern with (at least) 3 LEDs of different colors that does not use the delay() function. This program tells the LEDs to turn on or off based on the time that has elapsed since the beginning of the loop (the millis() function). This was frustrating because we originally only had one variable for the timekeeper (lastTime), but that was changing the behavior of all three LEDs, so creating a time keeper for each LED simplified our code a lot better. (Overall, however, this took a long time to understand.)




5. Using a photocell, we set the LED light to go on when the photocell reads that the light input is at "Dim." After some googling, I found out that a photocell is basically a resister that changes its resistive value depending on how much light is shining on the sensor (squiggly part facing upward near the top of the breadboard). Adjusting the code that was already given to us was not too difficult, but super cool to see how this could be applied as simple light sensors (like for streetlights) around the world.









6. Using the tiny-tactile switch, turn the LED on and off. This task was different than the others because the button was an input. The button basically functions as a pull-up resistor -- meaning that when you push the button, it completes the circuit and allows the electricity (+5V) to flow through. I can definitely see how this could be used with morse code...



(candid of the documentation process, at its best, ps: katrina don't murder me)


7. Use Sweep and Knob (rotate between 60 and 120 degrees) to control the servo. An arduino board basically creates a platform for us to control the RC servo motors. The three wires attached to the servo are power (red), ground (black), and signal (yellow). These programs were basically written for us and were fairly straightforward, so not too difficult to understand. Any confusion was easily solved through looking at the Arduino documentation.

Configuration:



Sweep:



Knob:
























Skills:
  • coding in a language similar to C
  • arduino circuits/resisters/breadboard usage
  • input from the environment (using the potentiometer)
  • using millis() function within the loop()

4 comments:

  1. Jennifer, your post is both entertaining and informative. Snaps for using a switch very creatively to mark the rotation of the servo.

    ReplyDelete
  2. Jennifer, your post is both entertaining and informative. Snaps for using a switch very creatively to mark the rotation of the servo.

    ReplyDelete
  3. Wow, your posts are so fun and easy to look at/ read. I really liked all of the videos you included as well.

    ReplyDelete