Page 1 of 1

Using Different Temperature Sensors (MCP9600)

Posted: Mon Jan 16, 2023 7:17 pm
by Peter
Hello everyone

New to BierBot and I am trying to use a MCP9600 temperature sensor connected to a raspberry pi 3 over I2C serial port. I know the sensor works fine with the Pi but when running BierBot set up it does not find the temperature sensor. I believe this is because BierBot uses W1ThermSensor to find and get readings which does not seem to support the MCP9600.

My current thoughts on a solution are changing main.py and setup.py where W1ThermSensor is used to an alternative which works with MCP9600

Any advice would be greatly appreciated

Re: Using Different Temperature Sensors

Posted: Tue Jan 17, 2023 6:25 am
by Bernhard
Hi Peter,

cool you're giving BierBot Bricks a shot!

The software currently indeed only supports DS18B20. So your assumption is correct.

As the code is open source you're very welcome to add that functionality and submit a pull-request (PR) to include your changes for everyone in my repo. Another user already did something similar (https://github.com/BernhardSchlegel/Bie ... rryPi:main) but did not submit a PR (yet). Maybe you already knew parts of this

So your current thoughts are absolutely valid! Maybe a a prompt before "confirm(f"Do you want to scan for temperature probes now?",default="y")" asking "Which type of temperature sensor do you want to scan for (DS18B20, MCP9600)".

Go ahead and create a fork. If any questions should arise (I'm not too familiar with MCP9600) along the way let me know, i.e. here.

Cheers,
Bernhard.

Re: Using Different Temperature Sensors (MCP9600)

Posted: Sun Jan 22, 2023 3:32 pm
by Peter
Hi,

Thanks for your response. I have made a fork on GitHub adding MCP9600 compatibility

https://github.com/JohnMcClane4/BierBot ... aspberryPi

Thanks

Re: Using Different Temperature Sensors (MCP9600)

Posted: Sun Jan 22, 2023 4:29 pm
by Bernhard
Hi Peter,

code looks nice! :) Do you want to submit a PR?

One comment: instead of `for sensor_type in ("w1", "mcp9600"):` I'd do for "sensor_type in ["w1", "mcp9600"]" to use a list instead of a tuple..

Did you (test) brew already?

Cheers,
Bernhard.