peterhinch / micropython-async

Application of uasyncio to hardware interfaces. Tutorial and code.
MIT License
744 stars 169 forks source link

Where is ESwitch? #113

Closed beetlegigg closed 1 year ago

beetlegigg commented 1 year ago

Hello Peter, I have just used your Switch class as found in V3 > primitives > switch. (very nice too and I have it working with events). But then I read your docs on event programming and it says use .from primitives import ESwitch' but I cannot find the ESwitch in the primitives anywhere. So I'm confused. Where do I find the ESwitch? (I probably just need a stronger cup of coffee :-) )

peterhinch commented 1 year ago

If you look at the "lazy loader" in init.py you'll see that it's in events.py. Docs are here.

beetlegigg commented 1 year ago

Many thanks, I see it now. On to trying out ESwitch to see if its much different to using the Switch class utilising the event objects before I commit to putting one or the other in my project.