Replies: 4 comments 1 reply
-
Try pip3 install adafruit-blinka |
Beta Was this translation helpful? Give feedback.
-
Ah in that case you should probably use the Allsky python venv. Try the following source ~/allsky/venv/bin/activate Then tun your script |
Beta Was this translation helpful? Give feedback.
-
Tried that to no avail. All these scripts were running fine till I did the upgrade. Every time I use pip3 I get an error. |
Beta Was this translation helpful? Give feedback.
-
Should add I am on python version 3.11.2 |
Beta Was this translation helpful? Give feedback.
-
This was working great until I did a fresh build. I think/Thought I had reloaded the correct libraries, but I still get errors.
using this code:
`#!/usr/bin/python3
import time
import math
import board
from adafruit_bme280 import basic as adafruit_bme280
i2c = board.I2C() # uses board.SCL and board.SDA
bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)
b = 17.62
c = 243.12
gamma = (b * bme280.temperature /(c + bme280.temperature)) + math.log(bme280.humidity / 100.0)
dewpoint = (c * gamma) / (b - gamma)
dewpoint= dewpoint *9 /5 +32
temperature = bme280.temperature * 9/5 +32
pressure = bme280.pressure /3386 *100 +.92
humidity = bme280.humidity +3.5
humidity = (round(humidity,2))
temperature =(round(temperature,2))
pressure = (round(pressure,2))
dewpoint = (round(dewpoint,2))
probe = open("/home/pi/allsky/config/overlay/extra/temphum.txt","w")
probe.write ("ProbeHum="+str(humidity)+"\n")
probe.write("ProbeTemp=" +str(temperature)+"\n")
probe.write ("ProbePress=" +str(pressure)+"\n")
probe.write ("ProbeDP=" +str(dewpoint)+"\n")
probe.close()
error returned: Traceback (most recent call last):
File "/home/pi/dew-heater/temp_hum_press.py", line 5, in
import board
ModuleNotFoundError: No module named 'board'`
Possible I loaded the wrong library, or placed it in the wrong place?
Beta Was this translation helpful? Give feedback.
All reactions