Push button wiring

Hi Initializing the TX_SDA pin of the VESC with


and checking it at runtime with:


(as per http://vedder.se/2015/08/vesc-writing-custom-applications/)

What is the wiring for a push button and a resistor that I need to make?

I cannot make it work following the example (I can only read the potentiomenter value)…the push button reading is totally inconsistent/random.

Much appreciated!

My mistake. First time I stupidly messed up with the wires connections.

But yes, the pulldown configuration of the TX pin makes my push button work the opposite way, i.e. pushed when it’s not and viceversa. I will try to configure it as pullup(?) or not configure it at all if, as you said, it works as well.

At this point, I would need a very simple bluetooth system to eliminate the wires in interfacing 2 push buttons to the VESC.

Any ideas/hints would be greatly appreciated.