Skip to main content
9 events
when toggle format what by license comment
Jan 12, 2022 at 22:13 comment added ginjaemocoes @DaveX Your comment works perfectly. I shifted the previous pins to D2-D7 and moved the 4-digit 7-segment pins to D8-D12 and A0-A6. I still have two pins left: D13 and A7. I am unable to use A7 with #define D1 21, but the code works on pin D12 (with #define D1 12). Could you confirm that A7 should work just as well? And could you write an answer and I'll edit it with my code?
Dec 22, 2021 at 16:46 answer added NickLondon timeline score: 1
Dec 22, 2021 at 13:34 comment added xyz You can try to use a shift register.
Nov 11, 2021 at 23:02 comment added chrisl D0 and D1 are marked as TX and RX since this is connected to hardware serial. D13 is on the same side with A0, right at one end of the header next to the 3.3V pin.
Nov 11, 2021 at 20:54 comment added ginjaemocoes @chrisl I can't find D0, D1 and D13 on my nano, which are they? Yes, if A0-A5 can serve as digital pins, then it's simply a replacement of pin numbers. The Uno code compiles and uploads to Nano, so I'll try this simple replacement tomorrow.
Nov 11, 2021 at 20:46 comment added chrisl Uno and Nano have nearly the same pinout. Both have D0-D13 and A0-A5 (all can work as digital pins as the analog function of A0-A5 is just additional functionality). Excluding the Serial pins we have D2-D13 and A0-A5, so 12+6=18 pins. I cannot see the hat project (since I don't have an account there), but if we take the 3 pins that DaveX mentioned and the 12 for the 7 segment display we get 15 pins. You have enough pins.
Nov 11, 2021 at 20:33 history edited ginjaemocoes CC BY-SA 4.0
explained number of pins
Nov 11, 2021 at 19:31 comment added Dave X The "Don't Touch your face hat" uses only three I/O pins (D10-D12), and the 7-segment sketch appears to use 12 (D2-D13). A0-A7 are the same exact pins as D14-D21, so you have plenty of digital I/O. Change the hat sketch to use D14-D16 instead of D10-12, test again with the two separate sketches with all the hardware, then try to combine the code and post your code attempt.
Nov 11, 2021 at 19:14 history asked ginjaemocoes CC BY-SA 4.0