In the loop function, it is checked whether a byte was received from the serial connection. Nonetheless, it has been added to the wiring diagram for the sake of completeness.įirst, the pins for the tact switch (INPUT_PULLUP) and LED (OUTPUT) are set up. as both Arduinos probably share the same GND signal when powered from the same power supply. In order to make the serial connection work, the receive wire of one Arduino is connected to the transmit wire of the other Arduino. The transmit wire is connected to digital pin #11. The receive wire is connected to digital pin #10. The serial connection requires three wires: for GND, receive and transmit. The LED is wired to GND and the 1k resistor. The tact switch is wired to GND and two digital pin #2. Both Arduino setups have the basically the same wiring: a tact switch, an LED and a 1k resistor is added to a breaboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |