32u4 pins not isolated?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
jhf5167
 
Posts: 9
Joined: Fri Aug 12, 2022 12:26 am

Re: 32u4 pins not isolated?

Post by jhf5167 »

int val3 = 0;
void setup() {
pinMode(13, OUTPUT);
pinMode(3,INPUT_PULLUP);
}

void loop() {
val3 = digitalRead(3);
Serial.println(val3);
}

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: 32u4 pins not isolated?

Post by adafruit_support_bill »

Code: Select all

val3 = digitalRead(3);
What is connected to digital pin 3? Your photos show that your switches are connected to A3.

To read A3 as a digital input use:

Code: Select all

val3 = digitalRead(A3);

User avatar
jhf5167
 
Posts: 9
Joined: Fri Aug 12, 2022 12:26 am

Re: 32u4 pins not isolated?

Post by jhf5167 »

OMG I'm an idiot, I just took it for granted that I already did that. Thanks so much.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”