So I was actually able to work out the first part of this assignment (the Basic Switch) when I was working on my final project. The setup and guide was extremely straightforward, no issues whatsoever. While I don’t have any picture proof (I immediately went from the button to utilizing a photoresistor and soon swapped out the light for a relay modulated grow light), I want to talk about the code I briefly used.
When playing with the setup, I knew that it would be easy to switch out the button for a photoresistor. I also knew that I’d have to make the light turn ON when the photoresistor was covered, so this was a nice start to also messing with the code I’d later use.
The next step was to switch gears and work on working with a photoresistor. Perfect. The guide gave a nice rundown on how the circuit works, which was perfect when transitioning into the final. I built everything and ran it according to the code provided, but switched the digital write functions to provide light when the photoresistor was covered, as to mimic what I’d be doing on the final;
Overall, I thought this was a fun, easy, and relatively straightforward project to crank out. It was a nice “starting” project before I dove into working with more complex circuits for the final, and I’m happy the circuits and explanations were easy to run through.
No comments:
Post a Comment