So I am considering installing DIP switches to allow setting a unique ID for each. This can be read in code and appended/prepended to the client ID I use for MQTT messages. I think this is the best approach, but I don't have any DIP switches currently so I am hoping for a short term solution.
I got to thinking that I could use some of the GPIO pins on my NodeMCU v1.0 dev boards. If I am correct, I think I can get 32 unique settings out of using 5 pins. Thinking in terms of binary on/off, high/low.
Is it possible to connect a GPIO pin to GND or 3.3v so it can be pulled high or low and then read a set of 5 of these pins to get a value of 0 to 31?
Of course this is just temporary - a DIP would be better, but I only want to do this to 3 of my prototypes so I can avoid keeping track of the client ID setting in the sketch.
I'm not sure if I would use analog or digital pins for this. Can anyone tell me if this is possible and if so, just how I would go about doing it (hardware and software example).