Raspi with an Mux and simple Buttons
-
Hi there!
Lets hold it short, what i want todo:
Raspi pi Zero W + MUX Board (MUX74HC4067) + Simple Buttons
So, what i want to do is to use only about 5 GPIO Pins from the Raspi pi zero w with an MUX together.
The main code for the raspi would be sth. like this:void loop()
{
byte data;for (byte i = 0; i < 16; ++i) { // Reads from channel i and returns HIGH or LOW data = mux.read(i); Serial.print("Push button at channel "); Serial.print(i); Serial.print(" is "); if ( data == HIGH ) Serial.println("not pressed"); else if ( data == LOW ) Serial.println("pressed"); }
So i would get the information which button depending on i, and could send and information to the Serial Port.
The buttons would be the normal simple Buttons like this one here:
I would just connect them to with a resistor to the MUX to make a defined: "high" and " low"So my main Question is:
Is there a possibility to configure Buttons to the Serial Port?
IF Yes - How?
IF Not - What else would you assume?If you have any other questions please feel free to ask!
Best regards
Machete
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.