MADT 304 week 2:
In this week we where tasked with wiring up an interactive circuit that can control multiple LEDs.
Class discussion also introduced the use of "if" statements which allow the use of Boolean logical operators(>/</>=/<=/==/&&) in order to filter data flow or command events.
Using a Potentiometer and mapping out thresholds with if statements we can pan LEDs.
Code :
I noticed something unusual if the " digitalWrite(pin#,LOW); " are all setup on an "else" statement. We can still pan the LED lights but somehow full power is only enabled on the last light in the circuit.
must be a syntax issue but it sounds Logical to shutdown all lights when parameters aren't met. (see video below and code).
I can see this type of circuit to be utilized for controlling many things, Connecting an analog variable switch(potentiometer) allows the user to physically interact with the electric circuit. Controlling not just the LED lights but anything wired into the Arduino.
Comments
Post a Comment