Search found 38 matches

by zaord
Mon Oct 05, 2020 8:32 am
Forum: MicroPython pyboard
Topic: Problem with PULL_DOWN internal function
Replies: 5
Views: 142

Re: Problem with PULL_DOWN internal function

Sorry, I was talking about the user button 1 for my hardware, not the user button of the pyboard ;) I don't have this issue if I just make a one line code test as you said so It might come from hardware or code ;) My problem is if I both connect the board to power supply and USB, the usb is making t...
by zaord
Mon Oct 05, 2020 8:11 am
Forum: MicroPython pyboard
Topic: Problem with PULL_DOWN internal function
Replies: 5
Views: 142

Re: Problem with PULL_DOWN internal function

Do you have any solution to acces the Pyboard REPL with external power supply connected + usb connexion ? Could it be cuased by electromagnetic interactions with other wires ? Because I check just the line as you said nad I never get errors ... Here is my code : from step import Stepper import utime...
by zaord
Sun Oct 04, 2020 9:40 pm
Forum: MicroPython pyboard
Topic: Problem with PULL_DOWN internal function
Replies: 5
Views: 142

Problem with PULL_DOWN internal function

Hi Here, I have a problem in my code here : self.SW2 = machine.Pin('X12', machine.Pin.IN, pull=machine.Pin.PULL_DOWN) # P1switch async def InvPress(self): await uasyncio.sleep_ms(1000) #print('Sw2',self.SW2.value()) while True: #print(self.SW2.value()) if self.SW2.value(): if self.PressPos == 1: sel...
by zaord
Wed Aug 12, 2020 5:15 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

Re: uasyncio parralel threading seems to not work

Hi peter ! Do you know reference of good microcontroller ?

Best Regards,

Ewen
by zaord
Sun Aug 09, 2020 9:28 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

Re: uasyncio parralel threading seems to not work

My question is that the stepper routine I post above Have a sleep to vary the speed of rotation of my stepper, and this await seems to not allow the other coroutine to run since the oled refresh function is like so slow that is freeze the screen. So I wonder if it is normal of if it's due to the fac...
by zaord
Sun Aug 09, 2020 8:02 am
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

Re: uasyncio parralel threading seems to not work

Hmmm Good to know :)

Thanks a lot Peter !
by zaord
Sat Aug 08, 2020 2:49 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

Re: uasyncio parralel threading seems to not work

Okay, I get several error that I could fix with the _exception_handler, but my code is actually still frozen during my stepper function execution. So I have some question : 1) Is it possible to call await uasyncio.sleep_ms(120) in the function stepper from the function InvPress which is called by th...
by zaord
Sat Aug 08, 2020 2:36 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

Re: uasyncio parralel threading seems to not work

Hi,

I found maybe a mistake in your tutorial

async def main():
loop = asyncio.get_event_loop()

Isn't be uasyncio.get_ instead ?

I try and come back if I have more questions !
by zaord
Sat Aug 08, 2020 11:21 am
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

Re: uasyncio parralel threading seems to not work

Hi here, It's seems that I did not put Any await so only one routine could be run and never the others. Here I put the code updated : uasyncio.run(self.main()) async def screen(self): await uasyncio.sleep_ms(100) Writer.set_textpos(ssd, 0, 0) # In case previous tests have altered it wri = Writer(ssd...
by zaord
Fri Aug 07, 2020 3:26 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio parralel threading seems to not work
Replies: 11
Views: 648

uasyncio parralel threading seems to not work

Hi here, I try to use two routine I wants to be exectued in the same time continulsy, but Only the first one is running... Where I am wrong ? async def screen(self): Writer.set_textpos(ssd, 0, 0) # In case previous tests have altered it wri = Writer(ssd, small, verbose=False) wri.set_clip(False, Fal...