Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEX printing to Console? #27

Open
gthawk64 opened this issue Jun 4, 2024 · 0 comments
Open

HEX printing to Console? #27

gthawk64 opened this issue Jun 4, 2024 · 0 comments

Comments

@gthawk64
Copy link

gthawk64 commented Jun 4, 2024

I'm running a BME680, PM25, and SCD41X, however i believe its the PM25 thats writing to console. (total guess).

I start my sensor script, which does a read from each of the sensors and I see all this being printed to console.
Is this something I inadvertantly turned on or is this a bug in the software somewhere?

Also hitting the checksum problem intermittently.
I'm unable to see anything that could explain the behavior.
Thanks,

$1D => ['0xa0', '0x0', '0x4c', '0xd4', '0xa0', '0x7b', '0xf2', '0x70', '0x4c', '0x35', '0x80', '0x0', '0x0', '0xac', '0xf5', '0x0', '0x4']
	$08 <= []
	$8C <= []
	$02 <= []
	$10 <= []
	$74 => ['0x8c']
	$8D <= []

The code looks like the following:

	def getPM25Data(self, t=datetime.now().strftime("%m/%d/%Y, %H:%M:%S")):
		try:
			aqdata = self.pm25.read()
			# Prepare the data row
			pm25_data = {
				"pm10_std": aqdata["pm10 standard"],
				"pm25_std": aqdata["pm25 standard"],
				"pm100_std": aqdata["pm100 standard"],
				"pm10_env": aqdata["pm10 env"],
				"pm25_env": aqdata["pm25 env"],
				"pm100_env": aqdata["pm100 env"],
				"part_gt_03um": aqdata["particles 03um"],
				"part_gt_05um": aqdata["particles 05um"],
				"part_gt_10um": aqdata["particles 10um"],
				"part_gt_25um": aqdata["particles 25um"],
				"part_gt_50um": aqdata["particles 50um"],
				"part_gt_100um": aqdata["particles 100um"]
			}

			return pm25_data
		except Exception as e:
			logger.error(f"Unable to read from PM25 sensor")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant