Robotics Project

As I don’t have much experience or aptitude with Robotics, I decided to copy a project from the Arduino workbook. I chose to do the color mixing lamp, and without any knowledge of what it even was or what it was supposed to do, I went right into building and coding it. It was only after coding it and testing it that I realized what the color mixing lamp was actually supposed to do. Turns out, it just takes the red, green and blue light values of the environment and displays them on an LED, making this officially the most useless invention I’ve ever seen, second only to dehydrated water.

Dehydrated water. Yes, this is really a thing. Maybe I’ll buy it and incorporate it into my final project.

This block of code establishes the pins that each LED sensor is connected to, as well as which color pins of the big LED are connected to which pin. It also sets the values of the light sensors to 0, which allows it to detect any change in ambient light colors.

This reads values from red, green, and blue sensors, divides them by 4, and then prints both the raw and mapped values to the serial monitor.

Finally, the Arduino takes these values and displays them on the LED, reflecting the ambient room light color.

How the code works

  1. Establish sensor and LED pins
    • The code begins by registering which LED/sensor pins are connected to which pin.
  2. Reset all values to 0
    • This allows the sensors to only pick up new data.
  3. Compile light sensor values
    • This checks to see what values each sensor is picking up
  4. Print to serial monitor
    • This logs down all the sensor values.
  5. Display on LED
    • Each color value is then displayed to its respective pins.


Comments

3 Responses to “Robotics Project”

  1. mcrompton Avatar
    mcrompton

    Hi, Josh. I’m not sure what I’m looking at here. Can you give me some context? What is the assignment? What is the project? What is your code supposed to do? Diving directly into an explanation of code without setting some context leaves your reader confused. I think that you know what your doing, I just don’t see clear documentation.

    1. Hi Mr. Crompton, I have resubmitted it.

  2. mcrompton Avatar
    mcrompton

    Thank you Josh. Yes, this does seem like a device with limited utility, but you have learned something about how to use a device to interact with the environment. While basic, it does address the basic nature of the assignment. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *