Search found 51 matches

by beetle
Wed Nov 16, 2022 8:07 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

It works, but not so fast, lets tidy things up. I believe the 'error' you pass to your funtion is a string so you dont need errorstring=str(error) file.write(errorstring) all you need is file.write(error) But in case I'm wrong you can find out the type of any variable with the type() function. check...
by beetle
Wed Nov 16, 2022 4:49 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

Rissy, another snippet of code for you in case you are still wanting to get the correct time on the rpi-picoW. There is an alternative to ntptime and thats to use worldtime. If you want to go down that route then I suggest you copy the code to your picoW and run it. Then examine the code relating to...
by beetle
Wed Nov 16, 2022 3:44 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

Thanks for your input. I think that's what i was looking for from someone. Basically just tell me where I'm wrong and present an alternative solution that WILL work. I'll try out your solution tonight now! Thanks! (I wish everyone was as forthcoming with help and advice when I ask for a direct spec...
by beetle
Wed Nov 16, 2022 12:14 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

Rissy a final mention on the errorlog file, I would always include some form of date/time stamp in the log. See the following snippet as one way to include this. (many other ways to get and format a date time string of course). You dont need all of those file.wite statements on single lines as you c...
by beetle
Wed Nov 16, 2022 11:45 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

The error in your code is in the line file.write(str(message, error)+",") Firstly to mention the variables message and error are strings so no need to change them to string with str(). But nevertheless this needless conversion will not stop the code from working. The problem lies in the , twixt mess...
by beetle
Tue Nov 15, 2022 5:03 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

It tries multiple times to connect to the MQTT broker. Rissy, just another throwaway remark, once the rpi picoW has a wifi connection established, depending I suppose on using a good micropython mqtt client library, there should not be any reason to have to try to connect multiple time to a mqtt br...
by beetle
Tue Nov 15, 2022 4:51 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

If you look at my code in one of my previous posts, you'll see that "ex" is generated from the library file on the occurrence of whatever fault it is exhibiting, so in the example I showed, the text "Bus error" is actually generated there. I understood that Rissy but not having your set up I was mi...
by beetle
Mon Nov 14, 2022 11:58 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3214225

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

Rissy, still plugging away I see :D Looking at your code from a few posts back I think I see that your ex variable prints out as 'Bus error' ?? I expect some other error message could also be generated. I see you want to preface your error log with 'SHT Error' or whatever and I think you want to put...
by beetle
Sat Oct 01, 2022 12:50 pm
Forum: Raspberry Pi microcontroller boards
Topic: Strange behaviour with Thonny/standalone
Replies: 3
Views: 36789

Re: Strange behaviour with Thonny/standalone

Ha, just came across this when doing a final test to check if my picoW will come up when I get a momentary power cut which we can be prone to when the trees that line the powerline route have not been trimmed. If the picoW is down for about 10 seconds or so then it will reconnect to the wifi ok, oth...
by beetle
Fri Sep 02, 2022 7:34 pm
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 431993

Re: BMP280 / BME280 uPython

Rissy, regarding the oversampling that your micropython library allows it is done differently than the way you describe for you rpi library. In the micropython library snippet you show (as below) that there are 5 oversampling modes shown. As you can see when you create a class object to use the BME2...