justincampbell/whipped-cream

Active low controls

Opened this issue · 4 comments

Does whipped-cream support active low controls? It looks like from reading runner.rb that it only supports active high controls.

Yes, it does. Take a look at sensors.

I was thinking more about output controls like buttons and switches.

I didn't get you. Could you please write down what are you trying to accomplish?

Runner#configure_buttons, Runner#configure_sensors, and Runner#configure_switches currently do not pass any options other than :direction to the PiPiper::Pin initializer. PiPiper pins do support an :invert option that I believe would accomplish what you're looking for, but the Runner#configure_xxx methods would need to be updated to call #create_pin with it.

It looks pretty simple, but I'm away from my dev machine at the moment.