Go to advanced search

by Idahowalker
Mon May 17, 2021 11:23 am
Forum: Advanced users
Topic: MQTT losing connection after many hours
Replies: 13
Views: 1718

Re: MQTT losing connection after many hours

I used lots of print statements in the various threads to find out which thread quit the show. Then I had to figure out where the conflict arose and code for it. I did not notice where the code registered callbacks. I'd say if the disconnect callback was registered and upon a disconnect the callback...
by Idahowalker
Tue May 11, 2021 3:24 pm
Forum: Advanced users
Topic: MQTT losing connection after many hours
Replies: 13
Views: 1718

Re: MQTT losing connection after many hours

The issue as presented by the OP reads like scope has been lost. If the connection remains open, and the MQTT Broker is indicating that their is a good MQTT connection then some object is losing its scope. One thing to try is open up Task Manager, with your Python program NOT loaded and running. Mak...
by Idahowalker
Tue Apr 27, 2021 7:40 pm
Forum: Python
Topic: Multi processing spawns 2 process at close
Replies: 2
Views: 223

Re: Multi processing spawns 2 process at close

Here the code creates and starts its thinges as well as setup siganl to awat for a Ctrl-C. When the Ctrl-C happens the MQTT thingies are stopped, a message is put into the multiprocessing queue, the event is released. if __name__ == "__main__": oMP = cMP_FTP( mpEventFTP, mpQ ) con_pool = p...
by Idahowalker
Tue Apr 27, 2021 6:29 pm
Forum: Python
Topic: Multi processing spawns 2 process at close
Replies: 2
Views: 223

Multi processing spawns 2 process at close

I have added a multi processing thingy to my code. Now, after signal has done its thing, a message is sent to the multi process to halt. The full code #!/usr/bin/python3 import certs import LinearRegression as lr import paho.mqtt.client as mqtt import mysql.connector from   mysql.connector import po...
by Idahowalker
Tue Apr 27, 2021 1:40 am
Forum: Other projects
Topic: How to calculate battery lifetime on UPS ?
Replies: 6
Views: 584

Re: How to calculate battery lifetime on UPS ?

Get a digital multi-meter, measure the current, then add 10%, to account for surges and other unmeasured factors, then estimate battery life using the current.

Say you have a 1Ah battery and the current is .25A then you can get about 4 hours from the battery.
by Idahowalker
Thu Apr 22, 2021 12:59 pm
Forum: Beginners
Topic: Is it dangerous for other computers in the network to leave the pi connected to the internet?
Replies: 11
Views: 894

Re: Is it dangerous for other computers in the network to leave the pi connected to the internet?

I am currently in year 4+ of a 10 year test to determine how dangerous it is for my other computers in the network and leaving the Pi connected to the network.

So far, 'everything' works well and is lasting a long time. Err, lasting 4+ years.
by Idahowalker
Thu Feb 25, 2021 2:25 pm
Forum: Python
Topic: [SOLVED] Handling Ctrl-C / Kill in threads
Replies: 8
Views: 9677

Re: Handling Ctrl-C / Kill in threads

Did you try:
paddyg wrote:
Tue Mar 19, 2019 8:43 am
Not sure if it's applicable wrt signal stuff but I usually either set daemon = True
Which seems to work well for me. I use signal, I have 5 threads running. All shuts down fine with a ctrl-c.
by Idahowalker
Tue Feb 16, 2021 1:12 pm
Forum: Troubleshooting
Topic: how to send data from esp32 to raspberry pi
Replies: 6
Views: 1214

Re: how to send data from esp32 to raspberry pi

Here is some ESP32 code, written under the Arduino IDE, sending data to a RPi serving as an MQTT Broker: #include <ESP32Time.h> #include <WiFi.h> #include <PubSubClient.h> #include "certs.h" // include the connection infor for WiFi and MQTT #include "sdkconfig.h" // used for log ...
by Idahowalker
Tue Feb 09, 2021 3:53 pm
Forum: Other projects
Topic: Engine Management/Automotive Projects
Replies: 5
Views: 1071

Re: Engine Management/Automotive Projects

Perhaps for a first project it would be wise to use a prebuilt ODBCII adapter that does all the work of querying and replying to your request for info. That way you could learn about display the info you want to see on a screen, instead of digging down into the depths of ODBCII. 2 ways to do ODBCII,...
by Idahowalker
Tue Feb 09, 2021 3:44 pm
Forum: Python
Topic: How do you have a timer active....
Replies: 8
Views: 523

Re: How do you have a timer active....

Turn LED on, store the time. Part of the main loop on each pass check for current time - time past with LED on, when current time >= time past turn off led. No need to wait for a minute.
by Idahowalker
Wed Feb 03, 2021 12:57 pm
Forum: Python
Topic: python3 script runs on startup using (crontab -e ) for sometime and after that it automatically stops. why?
Replies: 4
Views: 451

Re: python3 script runs on startup using (crontab -e ) for sometime and after that it automatically stops. why?

My guess would be that your program is not doing the error handling thing, so when your program produces an error it poops. Try doing the try, except, finally, thing.
by Idahowalker
Tue Feb 02, 2021 12:41 pm
Forum: Python
Topic: Question on threading.
Replies: 4
Views: 443

Re: Question on threading.

Python Threading, task switching, and multiprocessing are not the same thing. If Python threading is using only one core, your long running thing do will still impact the core the main programming is running on. Multiprocessing puts your running thing do on another core. Use queue's to pass messages...
by Idahowalker
Sun Jan 31, 2021 11:04 pm
Forum: General
Topic: *sigh* I did it wrong
Replies: 12
Views: 903

Re: *shigh* I did it wrong

I'm not sure why anyone on the development team would be to blame for this? Of course. What was I thinking all this is my fault that I had to figure out that I needed to close my Python program and stop the MQTT Broker in order to get a complete, so far, install. I'm so very sorry for not knowing t...
by Idahowalker
Sun Jan 31, 2021 10:18 pm
Forum: General
Topic: *sigh* I did it wrong
Replies: 12
Views: 903

Re: *shigh* I did it wrong

Just for grins and giggles, I did the install script a 4th time This time, before I did the install, I stopped the MQTT Broker and stopped a Python program that was running during the previous installs. The 4th time the install skipped a lot of things that are up to date and already installed but di...
by Idahowalker
Sun Jan 31, 2021 10:00 pm
Forum: General
Topic: *sigh* I did it wrong
Replies: 12
Views: 903

Re: *shigh* I did it wrong

A reinstall solved this issue. Now onto the next thing they messed up on. So a mistake at your end then? Are you aware how offensive your second statement is to all the people who have spend the last few years working on this? Yes, there are bound to be mistakes, it's a hell of lot of work that has...
by Idahowalker
Sun Jan 31, 2021 7:29 pm
Forum: General
Topic: *sigh* I did it wrong
Replies: 12
Views: 903

Re: *shigh* I did it wrong

Plugged in the Pico on a RPI with VS installed and all the other thingies installed and, after trying to upload the blink a fricking led,, for the #include "pico/stlib.h a not found. I really dislike to b a bother, you guys are very sensitive to critiques, but could you be a darling and let me...
by Idahowalker
Sun Jan 31, 2021 4:46 pm
Forum: General
Topic: *sigh* I did it wrong
Replies: 12
Views: 903

Re: *shigh* I did it wrong

Strange they would release a defective example, but I'll check it out.
by Idahowalker
Sun Jan 31, 2021 3:39 pm
Forum: General
Topic: *sigh* I did it wrong
Replies: 12
Views: 903

*sigh* I did it wrong

Plugged in the Pico on a RPI with VS installed and all the other thingies installed and, after trying to upload the blink a fricking led,, for the #include "pico/stlib.h" a not found. I really dislike to b a bother, you guys are very sensitive to critiques, but could you be a darling and l...
by Idahowalker
Tue Jan 26, 2021 2:21 pm
Forum: Other projects
Topic: Solar powering
Replies: 9
Views: 1103

Re: Solar powering

An RPi is a power hungry device for solar. The concept with solar is that your project runs off the battery and not the solar cells. Typically solar cells in the 12V range have an unloaded voltage of 17ish or so volts and the actual voltage for charging a 12V battery is in the 14ish V range. There a...
by Idahowalker
Sat Jan 23, 2021 9:30 pm
Forum: Automation, sensing and robotics
Topic: Getting On To the Internet
Replies: 12
Views: 911

Re: Getting On To the Internet

Cell service is available, want on the Inet thingy, GSM module; try searching on "Arduino GSM module".

Save a bit-o-cash by going for an earlier service; like 3G
by Idahowalker
Sat Jan 23, 2021 7:25 pm
Forum: General
Topic: Will there be support for FreeRTOS
Replies: 17
Views: 5695

Re: Will there be support for FreeRTOS

nick.mccloud wrote:
Sat Jan 23, 2021 6:19 pm
Idahowalker wrote:
Sat Jan 23, 2021 5:59 pm
The customer wants...
I can organise a port for you - how much can you pay?
Thanks for taking up this project and I'll pay you 1 U,S,D.
by Idahowalker
Sat Jan 23, 2021 7:24 pm
Forum: General
Topic: Will there be support for FreeRTOS
Replies: 17
Views: 5695

Re: Will there be support for FreeRTOS

Why? We've provided functions for starting threads on the second core, along with spinlocks, mutexes, intercore mailboxes. Anything you can do with an RTOS you can do now, but with more accuracy (an RTOS can add a certain amount of jitter as there is more code to get through before things happen). ...
by Idahowalker
Sat Jan 23, 2021 5:59 pm
Forum: General
Topic: Will there be support for FreeRTOS
Replies: 17
Views: 5695

Re: Will there be support for FreeRTOS

Why? We've provided functions for starting threads on the second core, along with spinlocks, mutexes, intercore mailboxes. Anything you can do with an RTOS you can do now, but with more accuracy (an RTOS can add a certain amount of jitter as there is more code to get through before things happen). ...
by Idahowalker
Sat Jan 23, 2021 2:30 pm
Forum: SDK
Topic: good read
Replies: 3
Views: 470

Re: good read

jamesh wrote:
Fri Jan 22, 2021 5:12 pm
Please report any issues in the pico-feedback repo, so we can fix them.

Note that we use UK English spelling, so they will not be regarded as issues!
Tried that and someone got their hide chaffed; learned my lesson well.
by Idahowalker
Fri Jan 22, 2021 5:10 pm
Forum: SDK
Topic: good read
Replies: 3
Views: 470

good read

Overall the C/C++ Pico SDK was a good read. Besides a few glaring issues, I used write ISO 900/9001 documents, the info contained in the SDK answers a lot of questions I had about the Pico device. Thanks for the C/C++ SDK.

Go to advanced search