Skip to main content
Commonmark migration
Source Link

The problem here is that I want to connect 5 input buttons to an Arduino but I do not want to utilize 5 input pins of Arduino, is there any matrix like connection using which I can reduce the number of inputs used. The conditions here are:

  • All the buttons will be connected to ground and initialized using:

    All the buttons will be connected to ground and initialized using:

    pinMode(PIN_NUMBER, INPUT_PULLUP)

pinMode(PIN_NUMBER, INPUT_PULLUP)

  • Only digital input is required and not analogue

    Only digital input is required and not analogue

The problem here is that I want to connect 5 input buttons to an Arduino but I do not want to utilize 5 input pins of Arduino, is there any matrix like connection using which I can reduce the number of inputs used. The conditions here are:

  • All the buttons will be connected to ground and initialized using:

pinMode(PIN_NUMBER, INPUT_PULLUP)

  • Only digital input is required and not analogue

The problem here is that I want to connect 5 input buttons to an Arduino but I do not want to utilize 5 input pins of Arduino, is there any matrix like connection using which I can reduce the number of inputs used. The conditions here are:

  • All the buttons will be connected to ground and initialized using:

    pinMode(PIN_NUMBER, INPUT_PULLUP)

  • Only digital input is required and not analogue

Post Migrated Here from electronics.stackexchange.com (revisions)
Source Link

How should I connect 5 buttons to arduino so that I can use the least number of inputs all the buttons are connected to ground

The problem here is that I want to connect 5 input buttons to an Arduino but I do not want to utilize 5 input pins of Arduino, is there any matrix like connection using which I can reduce the number of inputs used. The conditions here are:

  • All the buttons will be connected to ground and initialized using:

pinMode(PIN_NUMBER, INPUT_PULLUP)

  • Only digital input is required and not analogue