I'm using straight code to run my I/O (GPIO.output(blah), GPIO.input(blah), etc)...that works ok.
However, I'm interested in defining and using classes..are there some good I/O examples/tutorials that use classes?
I want to have a class called MyPumps in module pumpcontrol
with some pump names defined (really they are just I/O pins), such as:
PumpCold is gpio17
PumpHOT is gpio27
PumpMix is gpio22
Then I want to have some methods to run the pump & do some calculations:
io control & calcs go here
and one to ramp the pump
So I'd use it something like:
This is what I'm hoping to set up; I've got the general idea, but lack some details.