replace mosfet class with pins_ functions, implement scheduler UNTESTED