I am developing on a board with RS485 line drivers; these are half duplex where the direction is controlled by a DE pin. This is easy to configure iun STM32Cube IDE, but how do I translate this into micropython?
I'm thinking that it may be possible to subclass the uart class with the extra DE pin functionality? For my application the micropython device is the bus master so arbitrates the bus, making the design a little easier.
Before I go reinventing the wheel has anyone done anything with RS485 and micropython?
RS485 driver
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: RS485 driver
I don't know if this has already been done - a forum search might be your friend.
Re implementation in Python:
In general subclassing built-in types is not well supported by MicroPython. It's usually best to use composition rather than inheritance.
Re implementation in Python:
In general subclassing built-in types is not well supported by MicroPython. It's usually best to use composition rather than inheritance.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.