Python • BME280, convert temp C to F
One last question I have is how to convert the Celsius temp in the BME280Code: from machine import I2Cimport time# BME280 default address.BME280_I2CADDR = 0x76# Operating ModesBME280_OSAMPLE_1 =...
View ArticlePython • Re: BME280, convert temp C to F
It looks like you are trying to modify the code in the library module .... DON'T. You're changes will be lost in updates. Plus it is not good practice unless the creator has told you how to overload...
View ArticlePython • Re: Unable to import cv2 on OpenCV installation
Sorry about the delay. I've been working hard on my end trying to figure out what the problem is. I have installed virtualenv but when I callCode: python -m venv envit returns errorCode:...
View ArticlePython • How to add seperate legends to the graph
Hi all, I am plotting a graph of three sub-plots. I am trying to add axis labels to these sub-plots. But I don't know how to add different axis labels to corresponding sub-plots. I want to add...
View ArticlePython • Re: How to add seperate legends to the graph
a1 = fig.add_subplot(311, ylabel="AAAA", xlabel="BBBB")a2= fig.add_subplot(312, ylabel="CCCC", xlabel="DDDD")a3= fig.add_subplot(313, ylabel="EEEE", xlabel="FFFF")Axes label shown for y-axis, but the...
View ArticlePython • Help with MQTT restart code
Morning All,For a while I've been using a Pi Zero W with a python script, sensors and relays to run my heating system, in combination with Home Assistant (HA). HA runs the thermostats, GUI etc. and...
View ArticlePython • Re: Help with MQTT restart code
Test mqttclient.isconnected() and if it's negative go through a connect() process. I'm sorry I don't have an example, most of my Mosquitto code acts as a client using connect, subscribe, get message,...
View ArticlePython • Re: W1Thermsensor Questions
However, I found myself struggling to setup a v-env in Bookworm, but I'm trying to figure that out.My suggestion is that if you developed your project without VENV then disable VENV globally for your...
View ArticlePython • Re: Trying two alternate 2 motors with one switch
I have tried code example you posted I get error?py", line 55 finally:IndentationError: expected an indented block after 'finally' statement on line 55That code came from your other helper,...
View ArticlePython • Problems in the venv environment
I'm getting this error message after installing gpio, lgpio, and RPi.GPIOI first installed the gpio package, but that gave me a lot of error messages while typing in the python promptCode: red =...
View ArticlePython • Re: Problems in the venv environment
I'm getting this error message after installing gpio, lgpio, and RPi.GPIOI first installed the gpio package, but that gave me a lot of error messages while typing in the python promptCode: red =...
View ArticlePython • Re: Zero 2 W vs Zero W
It's evolving, but not in a good way for the Zero's, The Buster desktop will not run either Chrome or Firefox in 64 bit, it seems to run out of memory, and seems to be in an endless swap cycle with...
View ArticlePython • Re: Activating a venv at boot time
I think you should change the way you've scripted your bash fileCode: . <venvname>/bin/activateThe above line works for me, provided you put the name of the venv where the <venvname> isTo...
View ArticlePython • Web Scraper
I am interested in consolidating data from several websites onto a spreadsheet that I can sort and rank. This data is intended for my personal use only. I have looked at a couple tutorials and begun...
View ArticlePython • Re: Web Scraper
I had a python scraper running on a pi zero.I used lxml.It took traffic information from the BBC and via LED's and a screen told my wife about issues on her work journey. I scraped every 5 minutes for...
View ArticlePython • Upload Code
Hello,I want to run a Python script or file on Raspberry Pi when booting. Is it possible without sudo nano /etc/rc.local , just by writing the script on PC and uploading it to Raspberry Pi? How could...
View ArticlePython • Re: Upload Code
You could write code on a pc and put it on your Raspberry Pi, you will have to enable filesharing first, but you won't be able to test it on a pc, and it seems a bit of a palaver to go through that...
View ArticlePython • Re: Problems in the venv environment
Is there any naming conventions I have to avoid, or folder conventions I have to follow?Seems like every time I create a venv, my venv environment gets messed up and won't run python scripts (it does...
View ArticlePython • NRF24L01 Pi to Pi communication
I'm using a modified version of the slave and master file from this tutorial: https://thezanshow.com/electronics-tuto ... rial-32-33 I am trying to modify the master file so that I can use take user...
View ArticlePython • Re: NRF24L01 Pi to Pi communication
Not tested: should be possible to send strings. Or list of integers.Code: message = "hello" radio.write(message)https://github.com/BLavery/lib_nrf24/bl ... 24.py#L248Statistics: Posted by ghp — Mon...
View Article