[SOLVED] Problems with MQ-2 gas sensor

Hi,
I successfully installed the GrovePi-system, did some system checks (i2cdetect and blinking LED), so far everything seems to be in place.
I’m using a RaspberryPi Typ2 with the newest Raspbian Stretch available.

Now I want to start the gas sensor with sudo python3 grove_gas_sensor.py in the directory /home/pi/Desktop/GrovePi/Software/Python, nothing happens (the same for python 2.7 with just sudo python).
One strange thing: I checked the content of the sensor-py-File with sudo nano blkabla and found NO content, but checking it via the file manager of the Pi, there was a content.

Best regards and thanks for any help!

Bernhard

What version of the firmware are you running on the GrovePi? And is the current library on your Raspberry Pi the very latest?

Here’s the documentation for the GrovePi’s in case you need more information:
https://dexterind.github.io/GrovePi

Thank you!

Dear Robert,
thanks for your reply.

As I have set up the system just a few days ago, I think, I should have the newest available versions.

Can you specifiy, what you mean with firmware (does this mean the Raspbian version or stuff like that)?

Unfortunately I didn’t find a section in your documentation like that for the temeprature-humidity sensor

see here https://di-sensors.readthedocs.io/en/master/examples/temp_hum.html

In the page mentioned above even a unexperienced user will have success within short time.

I miss that for the MQ-2 and even for your CO2-sensor.

Best regards

Bernhard

----- Ursprüngliche Mail -----

Dear obert,
there was a (little) progress:

Now the setup of GrovePi went successfully through, using

curl -kL dexterindustries.com/update_grovepi | bash

As I did it just minutes ago, I guess I have the actual versions??

Then I moved to

pi@raspberrypi:~/Dexter/GrovePi/Software/Python $ sudo python grove_gas_sensor.py

and NOTHING happens.

So I strongly need your support…

Best regards

Bernhard

----- Ursprüngliche Mail -----

This is the API for the THP Sensor you are looking for:
https://di-sensors.readthedocs.io/en/master/api-basic.html#easythpssensor

Now, my question is, what does this have to do with the MQ-2 and CO2 sensors? The MQ-2 and CO2 sensors are sensors that aren’t supposed to be a part of the DI-Sensors. If I remember correctly, these 2 sensors are analog, so they should be working with the GrovePi out of the box.

Yes, this means you now have an up-to-date library on your Raspberry Pi. You’d still need to update the GrovePi’s firmware too (which is the firmware that sits on the actual GrovePi’s chip). It’s separate from whatever is on the Raspberry Pi.

Specifically, the firmware I talked about one paragraph above. In order to flash the latest firmware to the GrovePi, cd to your most up-to-date library of your GrovePi (which will be at /home/pi/Dexter/GrovePi) and then cd to Firmware and run:

bash firmware_update.sh

Run that, and once that’s done, in a Python interpreter, go check the reported version of the GrovePi by running grovepi.version(). It should return "1.3.0".

Thank you!

Dear Robert,
good news, the problem is apparently fixed!

The sensor is working quite well.

I appreciate deeply the good support in this issue!

Best regrads

Bernhard

----- Ursprüngliche Mail -----

What was the problem with yours? How did you solve it?

Well, it run perfectly directly after updating the firmware.

Does this sound as a possible source for my problems?

Best regards

B.

----- Ursprüngliche Mail -----

Aa I wasn’t sure if you did the firmware update. And yes, if the firmware is not up to date, then there’s a high chance that you won’t be able to interface with the GrovePi, provided you’re using the latest library.

Thank you!

This topic was automatically closed after 41 hours. New replies are no longer allowed.