Closed idegre closed 4 years ago
Hi, idegre!
I really appreciated your issue report. The reported issue is reproduced on my side, so I think I can fix it soon.
Hi, idegre!
I've fixed it, now it works as follows:
pi@raspberrypi:~ $ sudo python -m mh_z19 --serial_device /dev/serial0
{"co2": 535}
pi@raspberrypi:~ $ sudo python -m mh_z19 --version
0.6.3
Please update your mh_z19 module and tell me the result, thx!
No feedback.
when attempting to use the --serial_device parameter it always returns an error. sorry I don't have the exact error as I changed the code on my pi and didn't get any screenshots or the exact error. I found this when trying to use a usb->serial interface on my pi3 so i wouldn't need to deal with the onboard serial luckily its an easy fix, but i cant create a PR to save you the trouble https://github.com/UedaTakeyuki/mh-z19/blob/master/pypi/mh_z19/__main__.py#L56 here it should be
mh_z19.set_serialdevice(args.serial_device)
Describe the bug when attempting to use the --serial_device parameter it always returns an error. sorry I don't have the exact error as I changed the code on my pi and didn't get any screenshots
To Reproduce
sudo python3 -m mh_z19 --serial_device /dev/ttyUSB0
set_serialdevice(args.serial_device)
is undefined errorExpected behavior the command should work
Screenshots If applicable, add screenshots to help explain your problem.