

To display the temperature in Celsius, comment out line 28.īy itself, the display will update every time the temperature changes even slightly. This will display the temperature in Fahrenheit on the 7-segment display. Sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments) To light up an LED with the anode connected to a digital pin, you set the digital pin to HIGH: void setup() 1K ohms is a good place to start, but you can calculate the ideal value with an LED resistor calculator. The resistor value will determine how bright the LED shines. Note: All LEDs need a current limiting resistor placed on either the anode side or cathode side to prevent the LED from burning out. With the LED’s anode connected to a digital pin, the cathode is connected to ground:


The LED can be turned on or off by switching power at the anode or the cathode. To power the LED, you connect the cathode to ground and the anode to the voltage supply. The anode is the positive terminal and the cathode is the negative terminal: It includes all of the parts, wiring diagrams, code, and step-by-step instructions for 58 different robotics and internet of things projects that are super fun to build! LED BasicsĪ single LED consists of two terminals, an anode and a cathode. The 3-in-1 Smart Car and IOT Learning Kit from SunFounder has everything you need to learn how to master the Arduino.
