![]() Change the RGB values to adapt it to your style. The lines 65 to 71 define the colors used in the display.This way, the CPU should generate different questions every time it starts. Line 58 initializes the random number generator with the value read from the A3 pin - which is unconnected and thus should generate a random number itself.They should remain unchanged as this is the configuration that corresponds to the wiring on the perfboard. The lines 20 to 28 define the pins used for driving the display, the buzzer and the servo.The following line at the beginning of the code controls how many subsequent correct answers are needed before the servo will flip by 90° and thus release the lid.The display should now show the clock and the possible options. Once the board is set, connect the circuit via USB, then compile and download the program. Thus, you may try to avoid the external voltage regulator and its capacitors by connecting 6V to the RAW pin, not to VCC pin as in the diagram! There are, however, different (cheaper) clones of the Pro Micro out there and some of them are very limited output current capabilities, so the display may run unstable. ![]() As an additional fact, this site informs us that the RAW pin easily accepts up to 12V, so we could skip the external voltage regulator and connect the display directly to the Pro Micro. If this option does not show up, please install the supporting drives and IDE addons as described here. Make sure to select the "Sparkfun Pro Micro" board as shown in the picture. Start the Arduino IDE and load the attached Analog_Clock_Box.ino file. That is why I have thrown in the diode as a minimal way of voltage reducer. ![]() The motor did not really move, but it smelled funny after some seconds. In my first try, I have connected my servo to 4 fresh AA batteries which added up around 7 V. The interpretation of these terms, however, heavily depends on the brand of SG90 you will buy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |