Week 7: I2C devices

This week was a little confusing because I didn't really know what a I2C device was.

Turns out its anything that accepts SDA(Serial data) and SCL(serial clock)


For this assignment I chose a color sensor because I knew for sure it was I2C.

Heres a diagram of the color sensors pins.



The color sensor and a orange LED on a pcb board.



WORKS!!!!





Video of me running "auto_mode" on Arduino.

This "auto_mode" came with the library I downloaded.

Also this gitlab really helped me test the color sensor.

In hindsight, putting a single color LED next to the color sensor was kinda of dumb.

Can't really measure different colors when theres one color blasting all the time.

Next time, I will be sure to make the LED connect to a digital pin and not the 3.3V pin.

Or I can just remove the LED :)



Heres a video of my game not working because of the problem I mentioned above.

Picture of pulseview analyzing the SDA and the SCL pins while my game is running.





Here is a schematic of a air sensor connected to a ATmega312 and a battery.


The air sensors cool feature is that it can detect the amount of CO2 in the air!
You could put this in your garage and have it detect if there is too much CO2 in there.
Once it detects the dangerous level of CO2 it can trigger a alarm.