![]() Here, one of the two resistors is the resistance value from our force. In the code below, there's a variable that saves the button's state, so the LED will turn on and turn off conforme it changes. Select the electronic components needed for the circuit in the fritzing library. ![]() This code was made to be used with the pull-down resistor. When the push-button is unpressed, the LED turns off. When the push-button is pressed, the LED turns on. The configuration of the i/o pins is described in the code. Fritzing for Inventors: Take Your Electronics Project from Prototype to Product explains how to use this set of free, open-source electronics prototyping tools to lay out breadboards, create schematics, and design professional-quality printed circuit boards (PCBs). The resistor value is chosen considering the internal resistance of microcontroller, so I recommend, if you wanna know more about it, this article: Pull-Up Resistors. As you can see in the picture, the assembly is very simple, but if you want to change some i/o pins, you must change the code too.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |