Search found 119 matches

by IHOXOHI
Tue Jul 07, 2020 5:28 pm
Forum: Drivers for External Components
Topic: good use of MICS-6814 sensor (gaz) ?
Replies: 4
Views: 5515

Re: good use of MICS-6814 sensor (gaz) ?

After calibration with 2 arduino ; one with the 3 gas sensor (I2c), and the other with an analog MQ-2 sensor ; wich doesn't have exactly same values, I obtain that... in " my normal" testing condition... adc = ADS1115(i2c = i2c, address = 72, gain = 5) value_no2 = adc.read( rate=0, channel1=0 ) valu...
by IHOXOHI
Sun Jul 05, 2020 4:52 pm
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

Re: uasyncio and display

Yip,

Data-saving works too with uasyncio (and pms (and display)).
by IHOXOHI
Sun Jul 05, 2020 11:09 am
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

Re: uasyncio and display

Yes! It works! So goood!!! my "main" : import machine import uasyncio as asyncio from pms.pms5003 import PMS5003 import pms.pms5003 from time import sleep import time import epaper2in9 from pyb import SPI import pyb # SPI3 on Black STM32F407VET6 spi = SPI(2, SPI.MASTER, baudrate=2000000, polarity=0,...
by IHOXOHI
Sun Jul 05, 2020 7:11 am
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

Re: uasyncio and display

Hi,

I have the return :
"AttributeError: 'module' object has no attribute 'run' "

I will try to replace the "loop_run_forever" command by " uasyncio.get_event_loop()" in a "while True" boucle...
by IHOXOHI
Sat Jul 04, 2020 9:50 pm
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

Re: uasyncio and display

Nice!

Thanks a lot again...

And I will study how to use uasyncio... and try the v3 version too. It looks a powerfull tool.
by IHOXOHI
Sat Jul 04, 2020 3:02 pm
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

Re: uasyncio and display

Otherwise, When I tried to add code in my "main" file for get other data than pms data, it doesn't works. The line "loop.run_forever()" prevents further data collection. It's why I tried to add code in the pms module wich call the uasyncio module... It works 2 cycles... but no more. To simplify my a...
by IHOXOHI
Sat Jul 04, 2020 2:45 pm
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

Re: uasyncio and display

Yes
Sorry
I have included the code in a balise code for good presentation but it dosen't happen what I was thinking...

Maybe I have to re-open a topic?
Could I destroy this?
by IHOXOHI
Sat Jul 04, 2020 10:50 am
Forum: Drivers for External Components
Topic: uasyncio and display
Replies: 12
Views: 6663

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: 25559

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: 25559

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...