Nano Every (INPUT_PULLUP)

Right i started doing code for a Nano with Oled/RTC/SDcard, but it didnt have enough memory to support the OLED, so bought a Nano Every.

But the only thing not working is the buttons, there all wired up correctly as I switched back to the Nano and they work on same code.

So does the every not support INPUT_PULLUP ? ?

thanks in advance

does the every not support INPUT_PULLUP ? ?

It certainly does support it

Please post a small problem that illustrates the problem and the schematic of your project

Hi

GND pin to 3 push switches, then return wire to D2, D3, D4

code uploaded to standard NANO works perfectly, switch NANO to every on breakout sheild, OLED works, SDcard works, just not the push buttons. the D2 has a function where if its held for more then 5 seconds it triggers another part of code < thats only thing that works.

I even tried a wire from GND to D2,D3,D4

Usually a tap on the pins registers but this is intermittent

I thought maybe as this as the atmega4809 might not have a built in pullup resistor, when the atmega328 did

You mention hardware other than the switches

Disconnect all hardware other than the switches and run a bare minimum sketch that simply reads the input states and prints it. Post the code here

What do you see when you upload the program ?

Do you have

while (!Serial);

after the Serial.begin() function to ensure that hardware serial is ready to use ?

Cheers, i`ll makes a code with bare min for it.

I wasnt using serial.prints, as i have OLED screen working when the button presses it changes what the display shows.

Just seems odd it working with a NANO and not a the EVERY. It worked with the MEGA too

I did disconnect the sheild and try it with just the OLED, which is connected to A4/A5, but still no luck

I did disconnect the sheild and try it with just the OLED, which is connected to A4/A5, but still no luck

Just for completeness disconnect the OLED and print the values to Serial and although it may seem unnecessary, post the code here

Cheers, added serialprint and it could see the presses, before i had a debounce set to 50 millis, changed that to 500 and its fine now

CAH1982:
Cheers, added serialprint and it could see the presses, before i had a debounce set to 50 millis, changed that to 500 and its fine now

1/2 second is an insanely long debounce time for buttons. There is no doubt you are doing something wrong if that's what it takes to make it work.

Sorry, I had called it debounce its not actually

I have a button with 3 types of presses

clickpress, nano was set to 50, now to 250
short press under 3 seconds
long press over 3 seconds

the clickpress`s takes user into basic menu items, where as the longer presses takes you into the different settings pages