Last active
April 9, 2017 11:29
-
-
Save s-estay/bc0833e34df6b754770e73b5220bbe60 to your computer and use it in GitHub Desktop.
arduino basics: sink current
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sink current through a LED to digital pin 7 | |
// connection: VCC - LED's anode .. LED's cathode - 1k resistor - pin7 set to low | |
// VCC is 5V | |
// LED's anode (+) long terminal | |
// LED's cathode (-) short terminal | |
// 1k resistor color code: brown black red | |
// code executed on Arduino Leonardo | |
void setup(){ | |
pinMode(7, OUTPUT); | |
} | |
void loop(){ | |
digitalWrite(7, LOW); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment