Re: micropython R1.9 ETA @@ released @@
Posted: Wed May 31, 2017 6:21 am
I agree that on() and off() for a Pin is potentially ambiguous. So don't use it. The intention of the recent changes is that in most cases you use Signal, which handles inversion if required. So you can write LeftMotor.on() which is unambiguous. If the hardware changes so that the sense of the bit is changed, you change one line of code, where the Signal is instantiated.
The Pin object is intended for device drivers and it works with __call__ or value(). So you can use either to your taste, although in a given program I'd pick one of the two and stick to it.
All of which is crystal clear.
The Pin object is intended for device drivers and it works with __call__ or value(). So you can use either to your taste, although in a given program I'd pick one of the two and stick to it.
Code: Select all
pin_cs_low(0)
pin_data_out.value(1)
pin_ck_out(0)
received_bit = pin_data_in()