Go to advanced search

by pierrot10
Sun Jun 21, 2020 11:12 pm
Forum: General discussion
Topic: What's the minimum A to boot a Raspberry
Replies: 10
Views: 537

Re: What's the minimum A to boot a Raspberry

Dear All
Thank for all of your replies.
Then I believe I should renplace with a Raspberry Zero. I have one, I will try in the next day.
by pierrot10
Sun Jun 21, 2020 6:42 pm
Forum: General discussion
Topic: What's the minimum A to boot a Raspberry
Replies: 10
Views: 537

What's the minimum A to boot a Raspberry

Hello all I believe a Raspberry Pi need a power of at least 2A to boot, that's right? I am annoyed because I used that product: https://www.waveshare.com/solar-power-manager.htm to power a Raspberry Zero. It's a solar power management. It's works fine with a Raspberry Zero, but with a Raspberry Pi w...
by pierrot10
Thu Jun 11, 2020 9:40 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

Hello A more robust solution is to test for whatever state you need the system to be in I can't check network connectivity because my Raspberry will be in the field where there is no connection, excepted a LoRaWAN connection. As soon as it has booted, the script will measures the Air Quality and sen...
by pierrot10
Thu Jun 11, 2020 8:44 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

Great, thanks for your reply!!!
Do you think, 10 sec is not to much? when crontab is "called" after the rasberry start booting?
Tks
by pierrot10
Thu Jun 11, 2020 7:46 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

In fact the problem was not from cron or Raspi. A line of my code was the gulty. I have a another sort question. I added this on my crontab file @reboot cd /opt/ecoaqi/ && ./aqi-v1.py >/var/log/aqi-v1.log 2>&1 When the aqi-v1.py file will be lunched? How can I make sure, it will lunch when the Raspi...
by pierrot10
Tue Jun 09, 2020 6:28 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

Hello budd THANK A LOT This hilight me on a existing error and stupid error Your script is an executable file (ls -l /var/opt/api/aqi1.py shows permissions something like -rwxr-xr-x ) and has the "Hashbang" line #! /usr/bin/python3. Therefore it is not correct to include python3 in the crontab line....
by pierrot10
Tue Jun 09, 2020 4:15 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

OK; I just found where is my problem. If I cd /opt/aqi/ sudo aqi1.py it works if I cd sudo /opt/aqi/aqi1.py it does not work, because the Could not find font file font5x8.bin Traceback (most recent call last): File "/opt/ecoaqi/aqi-v1.py", line 434, in <module> display.text('ECO-SENSORS.CH', 0, 0, 1...
by pierrot10
Tue Jun 09, 2020 4:05 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

@jbudd

So you means, I shoudl change in that way?

Code: Select all

*/2 * * * * python3 /opt/aqi/aqi1.py>/var/log/aqi1.log 2>&1
What's the &1?
by pierrot10
Tue Jun 09, 2020 3:57 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

Dear All Thank for you reply. Let me to give you more detail My script has a loop. In the while, I have two functions which will measure the particulat matter. It switch on the fan and switch it off. The fan si switch on/of with that command sensor.sleep(sleep=False) sensor.sleep(sleep=True) When th...
by pierrot10
Tue Jun 09, 2020 12:44 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

Re: How can I debug my crontab

Sorry, I corrected the spelling mistake
by pierrot10
Mon Jun 08, 2020 10:57 pm
Forum: General discussion
Topic: How can I debug my crontab
Replies: 19
Views: 690

How can I debug my crontab

Hello I was used to have a sleep in a loop to run my script every 2mn. Now I added the following import sys sys.exit('Exit the script and wait for the next cron'). I am surprised to see this when the script exit id: 56, p1<br>id: 57, p2<br>id: 58, a1<br>id: 59, a2<br>id: 60, la<br>id: 61, lo<br>id: ...
by pierrot10
Sat May 23, 2020 5:10 pm
Forum: General discussion
Topic: How can I send data over WiFi to a remote PHP sevrer with PycURL
Replies: 1
Views: 99

Re: How can I send data over WiFi to a remote PHP sevrer with PycURL

Here is the solution I hope it can help print('[INFO] Sending data with PycURL') c = pycurl.Curl() c.setopt(c.URL, 'http://www.website.ch/include/save.php') c.setopt(c.HTTPHEADER, ['Accept: application/json','Content-Type: application/json']) c.setopt(c.POST, 1) # If you want to set a total timeout,...
by pierrot10
Fri May 22, 2020 8:11 pm
Forum: General discussion
Topic: How can I send data over WiFi to a remote PHP sevrer with PycURL
Replies: 1
Views: 99

How can I send data over WiFi to a remote PHP sevrer with PycURL

Hellooo I need to send some measures to a remote server running PHP. There already is a PHP script done for that. Initially, my Raspberry run python3 and LoRaWAN and all measures are sent with LoRaWAN to this PHP script and it works fine. My python script collect the measures and use the following v...
by pierrot10
Thu May 21, 2020 12:29 pm
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

Re: How to setup UART

Dear All Many thanks for all your clarification. That's very usefull. I am going to try. Inactivating the console only means that the Linux kernel will not send messages to it as it boots up and it will not run a shell session on it when it is booted OK I understand now what you mean Do not look for...
by pierrot10
Thu May 21, 2020 10:19 am
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

Re: How to setup UART

Thanks Heater for your replies.

What I still not understand, if I inactive the console, what will change.
I will be able to SSH to nano, and edit, display messages

But inactivity the console, what will "inactive me" to do :D :D
by pierrot10
Thu May 21, 2020 9:46 am
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

Re: How to setup UART

Dera All many thanks for our answers. Yes I have installed Buster and not an oldest verison ;) SSH is nothing to do with serial ports. SSH does not use serial ports. SSH is done over your network connection to the Pi, either ethernet or WiFi. Yes I know, it's my fault, I badly form my question Again...
by pierrot10
Wed May 20, 2020 9:23 pm
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

Re: How to setup UART

Hello B.goode, I read this but I am still confused. I updated my first post https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=274636&p=1663941#p1663941 because I read some french documentation about UART, UART PL011, console. This help me toi understand but I am still confused as I need UART f...
by pierrot10
Wed May 20, 2020 8:47 pm
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

Re: How to setup UART

What sensors are these? Do they have a 3.3V UART? Have you remembered to connect ground?
Hello,
It's a CO2 sensors https://pypi.org/project/mh-z19/
I connected:

Vin to 5v of the Raspberry Zero
GND to GND
Tx to Rx
Rx to Tx
by pierrot10
Wed May 20, 2020 8:45 pm
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

Re: How to setup UART

By default, the UART transmit and receive pins are on GPIO 14 and GPIO 15 respectively, which are pins 8 and 10 on the GPIO header Various UART Device Tree Overlay definitions can be found in the kernel github tree. The two most useful overlays are disable-bt and miniuart-bt. disable-bt disables th...
by pierrot10
Wed May 20, 2020 7:56 pm
Forum: General discussion
Topic: How to setup UART
Replies: 17
Views: 543

How to setup UART

Hello! I need to use a sensors which need UART (Tx & Rx), My raspberry is a Zero with Buster $ uname -a Linux ecosensors1 4.19.97+ #1294 Thu Jan 30 13:10:54 GMT 2020 armv6l GNU/Linux I connected Tx of the sensors to Rx of the Pi and Rx to Tx. I powered my Raspberry and unfortunately I could not ssh ...
by pierrot10
Wed May 20, 2020 9:08 am
Forum: General discussion
Topic: Something strange when a re-run a python3 script
Replies: 3
Views: 203

Re: Something strange when a re-run a python3 script

Hello Once by runing ps aux |grep root I could kill the job sudo kill -9 ID But no way to run the job. I really have to remobe the power cable from the raspberry and power it again to be able to run my script once. I suspect the issue around the USB connection. The SDS011 sensor is powered as soon a...
by pierrot10
Tue May 19, 2020 11:24 pm
Forum: General discussion
Topic: Something strange when a re-run a python3 script
Replies: 3
Views: 203

Re: Something strange when a re-run a python3 script

I discovered somethings interresting. The sensor is going to sleep sensor.sleep(sleep=False) After it finished to calculate the Air Quality. If I press ctrl+c before it sleep, I can re-run, if press after, I can not. But same question, why with the first Rasperyy, I could interrupt the script at any...
by pierrot10
Tue May 19, 2020 10:51 pm
Forum: General discussion
Topic: Something strange when a re-run a python3 script
Replies: 3
Views: 203

Something strange when a re-run a python3 script

Daer All I am experiencing somethings strange with my second installation. I created a Python script to calculate the particuéar matter. I configured the first Raspberry Zero and I could lunch the script. When I pressed ctrl+c to stop the script, I could re-run it Now I installed the same script on ...
by pierrot10
Sat May 16, 2020 8:25 pm
Forum: Français
Topic: Est-ce qu'un Raspberry Zero peut etre alimenté avec du 3.7V
Replies: 1
Views: 141

Est-ce qu'un Raspberry Zero peut etre alimenté avec du 3.7V

Bonjour,
J0ai eu echo qu'on pouvait être alimenté avec une batterie de 3.7V 15000mAh (c'est la batterie que j'ai), mais je doute quant à la véracité de cette information.
Est-ce qu'on peut vraiment faire quelque chose avec une telle batterie?
by pierrot10
Thu Apr 30, 2020 9:44 am
Forum: General discussion
Topic: Someone has installed DyndDns?
Replies: 19
Views: 689

Re: Someone has installed DyndDns?

Dear Ernt Thank for your clarification. To be sincerely, I have not understand all. At my place I have a basic 4G router (NETGEAR AirCard 785) and I have another with advanced feature (TP-LINK Archr MR200). (The TP-Link is actully to a friend flat, for a couple of weeks) With the TP-Link 4G router, ...

Go to advanced search