micropython-MQ icon indicating copy to clipboard operation
micropython-MQ copied to clipboard

Info request

Open dentex opened this issue 6 years ago • 2 comments

Hello! I was trying to use a Chinese module with a MQ7 sensor onboard. Using your library I found that MicroPython complained about some syntax errors (apparently; I'm not an expert). I changed it a little bit and I issued a reading... Then I had a final error I don't know how to fix:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "BaseMQ.py", line 150, in readScaled
ValueError: math domain error

Other than that, according to what the guys here were talking about, it seems that to issue a reading, the module must be powered respecting certain cycles (1,4V and 5V alternatively).

Do you have any advice in regards? Thanks.

dentex avatar Feb 01 '19 18:02 dentex

Hello! I was trying to use a Chinese module with a MQ7 sensor onboard. Using your library I found that MicroPython complained about some syntax errors (apparently; I'm not an expert). I changed it a little bit and I issued a reading... Then I had a final error I don't know how to fix:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "BaseMQ.py", line 150, in readScaled
ValueError: math domain error

Other than that, according to what the guys here were talking about, it seems that to issue a reading, the module must be powered respecting certain cycles (1,4V and 5V alternatively).

Do you have any advice in regards? Thanks.

Were you able to solve your problem? I'm facing the same "Math Domain Error" problem with MQ-2.

NahianMugdho avatar Nov 17 '22 16:11 NahianMugdho

I never actually used the module, sorry.

dentex avatar Nov 17 '22 17:11 dentex