Skip to content

Arduino library for multiple buttons on single analog pin

License

Notifications You must be signed in to change notification settings

madneon/mdnAnalogButtons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository moved to:

https://git.madneon.com/

mdnAnalogButtons

Arduino library for multiple buttons on single analog pin

Usage

4 buttons example using 1x10k and 4x1k resistors on A0 pin:

#include <mdnAnalogButtons.h>

mdnAnalogButtons buttons(A0, 4, (byte[4]){22, 42, 58, 72});

void setup() {
	Serial.begin(9600);
}

void loop() {
	byte b = buttons.pop();
	if (b != 0) {
		Serial.println(b);
	}
}

About

Arduino library for multiple buttons on single analog pin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages