Mkr pullup resistance

Hi. Im trying to conbect 8 buttons to an arduino mkr 1400, using the internal pullup resistors from the arduino board but i can only put 1 button to work with internal resistor. Does the mkr have an internal resistor to each pin pins? Thanks in advance

Please post your schematic; a hand drawn circuit in jpg or png is far preferable over a pretty Fritzing picture.

I've never worked with a mkr board, but according to the specs for the processor, each I/O pin has a switchable pullup resistor. Most microprocessor internal pullups tend to be pretty large. On the order of 50-100K.

I would try putting a 10K pullup on one of the switches. If that fixes your problem, then you have our answer.

The internal pull-ups are part of the pin structure. You need to enable it for each pin individually.

Please provide your sketch if you need any more help with this.

If you want to learn more about the pins, have a look into the SAMD21 datasheet. You can find a direct link in the store. It is not the latest version but good enough. Otherwise look at the Microchip web page.

Hi again

This is my test code for the buttons. Only "botao1" is turning the led off. Could it be something in code? Thanks in advance.

const int  botao1 = 6;
const int  botao2 = 7;
const int  botao3 = 8;
const int  botao4 = 9;
const int  botao5 = 10;
const int  botao6 = 11;
const int  botao_start = 12;
const int  botao_stop = 13;

void setup() {
  // put your setup code here, to run once:

  Serial.begin (9600);
  pinMode(botao1, INPUT_PULLUP);
  pinMode(botao2, INPUT_PULLUP);
  pinMode(botao3, INPUT_PULLUP);
  pinMode(botao4, INPUT_PULLUP);
  pinMode(botao5, INPUT_PULLUP);
  pinMode(botao6, INPUT_PULLUP);
  pinMode(botao_start, INPUT_PULLUP);
  pinMode(botao_stop, INPUT_PULLUP);


void loop() {
  // put your main code here, to run repeatedly:

  int buttonState = digitalRead(botao1 || botao2 || botao3 || botao4 || botao5 || botao6 || botao_start || botao_stop);

  if( buttonState == LOW )
        // turn the LED On
        digitalWrite(LED_BUILTIN, HIGH);
        // otherwise
        // turn the LED Off
        digitalWrite(LED_BUILTIN, LOW);

You can only read one pin at a time.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.