Search found 112 matches

by IHOXOHI
Sat Jul 04, 2020 10:50 am
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 2203

uasyncio and display

Hi, I tried to use pms5003 wich give air quality data and need the uasyncio module. I would like display data on a epaper. I tried to add epaper code in the pms module in a simple definition (line 59) that I call in the def(print) of pms module (line 449). But after 2 rights cycles, nothing happen. ...
by IHOXOHI
Fri Jul 03, 2020 4:10 pm
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Yep, I tried a classical pms "main" wich contain the pmeregister.callback() command that is on your github'srepository: import machine # import pms5003 import uasyncio as asyncio #from . import pms5003 from pms.pms5003 import PMS5003 import pms.pms5003 _DEFAULT_MS = 20 class Lock: def __init__(self)...
by IHOXOHI
Fri Jul 03, 2020 2:36 pm
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Yop, my 451 line : "if len(data) != preframe_len and len(data) > 0:" That's great! I'm very happy that the pms5003 works! Thank you very much. My sister is an aerosol researcher, and she doesn't have a better precision! It's amazing! For example, a virus coud be bigger than 0.3 um. (the covid is not...
by IHOXOHI
Fri Jul 03, 2020 10:08 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Yo,

Same result with :
"if self._uart.any():
self._uart.read(self._uart.any())"
for replacing the flush's command...

Finally, It works, the frame contains values wich looks rights... No?

I have just to keep them in variables like "pms2.5 = frame[1]"

No?
by IHOXOHI
Fri Jul 03, 2020 8:35 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

OK, Sorry, A simple mistake of me. I haven't change the pin correctly in my file... Now I have this error: >>> import pms5003_test None wakeUp wakeUp got lock Sending command: 228,1,False,16000 waiting 40.0s readFrame False False __read_frame readFrame got: (2, 2, 3, 2, 2, 3, 687, 187, 20, 2, 0, 0, ...
by IHOXOHI
Fri Jul 03, 2020 8:15 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

I have connected : rx-pms to tx-pyboard(X1) tx-pms to rx-pyboard(X2) gnd to gnd vcc to v+ The "uart.read()"'s command return None. I have placed it just after the "uart = machine.UART(1, baudrate=9600)"'s command I have reversed rx and tx connection without success. I will test to change the flush c...
by IHOXOHI
Fri Jul 03, 2020 7:27 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Yes, a lot! first one: " Got no available bytes No response to wakeup command wakeUp wakeUp got lock Sending command: 228,1,False,16000 waiting 40.0s " 2nd one: " ---------------------------------------------------------- Setting to active mode while sleeping ----------------------------------------...
by IHOXOHI
Fri Jul 03, 2020 6:55 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Maybe I have to wait this afternoon? 8-)
by IHOXOHI
Fri Jul 03, 2020 6:21 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Hi Kevin, Thanks for your support. Thanks for sharing your knowledge. After test alls yours recommandations, the pms looks initiate correctly. But I have had an error about the debug line "pms5003.set_debug(True)" So I have changed it by "pms.pms5003.set_debug(True)" and "imported the module like " ...
by IHOXOHI
Wed Jul 01, 2020 10:48 am
Forum: Drivers for External Components
Topic: PMS5003 air quality sensor library
Replies: 33
Views: 10566

Re: PMS5003 air quality sensor library

Hi, I'm trying to use pms5003 with pyboard. The line "uart = machine.UART(4, tx='X1', rx='X2', baudrate=9600)" return an error "extra-argument" So I have changed this by " uart = machine.UART(4, baudrate=9600)" I have error : " module has no PMS5003 attribute" With "uart = machine.UART(4, baudrate=9...