Go to advanced search

by napajedlaci.cz
Mon Jun 29, 2020 7:53 pm
Forum: Beginners
Topic: UVM-30 UV senzor
Replies: 0
Views: 45

UVM-30 UV senzor

I have a UV sensor UVM-30 and I can't find the code and connection to the raspberry PI at all. Will you help me please
Thank you very much.
by napajedlaci.cz
Tue May 05, 2020 7:44 pm
Forum: Camera board
Topic: Raspberry Pi High Quality Camera
Replies: 172
Views: 15123

Re: Raspberry Pi High Quality Camera

Time exposure is only 10.2, but raspberrypi.org writes about up to 200 seconds. So how do I take a photo with a time of up to 200 seconds via raspistill? :?
by napajedlaci.cz
Sat Apr 25, 2020 8:07 am
Forum: Beginners
Topic: How process turn off over cron?
Replies: 4
Views: 188

How process turn off over cron?

I run a cron process that works all the time. I need to turn it off again in 4 hours via cron. How do I do that?
by napajedlaci.cz
Tue Apr 21, 2020 8:13 am
Forum: Beginners
Topic: Sunwait and crontab -e, how?
Replies: 11
Views: 366

Re: Sunwait and crontab -e, how?

I do not understand much, is it possible to give an example?
Now I use crontab executable from 15: 30h. Then when the electricity turns off, cron will not start up until the next day :(

Code: Select all

30 15 * * * /usr/local/bin/sunwait wait naut down offset -0:30 50.0292744N 15.9677392E; python /home/pi/open.py;
by napajedlaci.cz
Tue Apr 21, 2020 7:03 am
Forum: Beginners
Topic: Sunwait and crontab -e, how?
Replies: 11
Views: 366

Re: Sunwait and crontab -e, how?

Works, thank you very much! Unfortunately, I have another problem. If the cron runs from 3:30 pm and waits for the sunwait and the electricity is switched off at 4:00 pm, the CRON is off and the sunwait will not take place until the next day. Is there any way to recover a cron that is running to res...
by napajedlaci.cz
Mon Apr 20, 2020 1:21 pm
Forum: Raspberry Pi OS
Topic: List the last image name and delete it
Replies: 3
Views: 148

Re: List the last image name and delete it

Thank you very much. Works, but if there is no image in the folder, I get an error :(

Code: Select all

ls: cannot access '* .jpg': Directory or file does not exist
by napajedlaci.cz
Mon Apr 20, 2020 10:39 am
Forum: Raspberry Pi OS
Topic: List the last image name and delete it
Replies: 3
Views: 148

List the last image name and delete it

I need help with BASH script. In the folder / home / pi / tmp / I take pictures and create pictures that save in YYYYMMDD-HHMMSSUTC.jpg (20200420-101731UTC.jpg) format I need to use BASH script (sh file) to find out the latest latest image, write it out and then delete it. If there is no image in th...
by napajedlaci.cz
Sun Apr 19, 2020 1:43 pm
Forum: Beginners
Topic: Sunwait and crontab -e, how?
Replies: 11
Views: 366

Re: Sunwait and crontab -e, how?

So that the test.sh script runs at crontab when the test.sh script is finished at sunset?
Hmm but I need test.sh to run only once at sunset. Can't you?
by napajedlaci.cz
Sun Apr 19, 2020 1:27 pm
Forum: Beginners
Topic: Sunwait and crontab -e, how?
Replies: 11
Views: 366

Re: Sunwait and crontab -e, how?

I just need to run the script (test.sh) only once and only after sunset. This is how the script (test.sh) ran exactly at the time cron was started, not at sunset.
by napajedlaci.cz
Sun Apr 19, 2020 1:10 pm
Forum: Beginners
Topic: Sunwait and crontab -e, how?
Replies: 11
Views: 366

Re: Sunwait and crontab -e, how?

Unfortunately it does not work. The script will run at the time of cron start and not after sunset as it should work.

Code: Select all

56 14 * * * /usr/local/bin/sunwait -v sun rise offset 0:30 50.0292744N 15.9677392E; sh /home/pi/test.sh >> /home/pi/tmp/test.log 2>&1
test.log:
19/04/2020 14:56:01
by napajedlaci.cz
Sun Apr 19, 2020 11:34 am
Forum: Beginners
Topic: Sunwait and crontab -e, how?
Replies: 11
Views: 366

Sunwait and crontab -e, how?

I need to run script every day through crontab, but always up to 30 minutes after sunset.
It serves sunwait, but I have no idea how to use it. I have Sunwait installed, but how do I enter a command in crontab?
Thank you very much for your help
by napajedlaci.cz
Fri Apr 17, 2020 10:10 am
Forum: Beginners
Topic: CRON does not run SH file, nothing is done
Replies: 4
Views: 168

Re: CRON nespustí SH soubor, nic se neděje

Cron only works when I set it as:

Code: Select all

*/1 * * * * sh /home/pi/clean.sh >> /home/pi/clean.log 2>&1
log is being created

But when I use the trigger at a certain time, 12 hours and 10 minutes. The log is not written.

Code: Select all

10 12 * * * sh /home/pi/clean.sh >> /home/pi/clean.log 2>&1
by napajedlaci.cz
Fri Apr 17, 2020 7:45 am
Forum: Beginners
Topic: CRON does not run SH file, nothing is done
Replies: 4
Views: 168

CRON does not run SH file, nothing is done

Hi, I need help with a trivial bash file that I want to run via crontab -e. Now it doesn't work. No cleanup or copying of the file in the folder will create it and I don't know why. I also used the chmod + x file and still nothing. crontab -e # m h dom mon dow command 14 22 * * * sh /home/pi/clean.s...
by napajedlaci.cz
Fri Mar 13, 2020 8:20 am
Forum: Troubleshooting
Topic: Installation of PHP-CLI does not work
Replies: 2
Views: 211

Installation of PHP-CLI does not work

Hi, will you help me to find out why installing PHP-CLI doesn't work? I have an update and upgrade. Thank you very much. sudo apt install -y php7.1 php7.1-cli Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean ...
by napajedlaci.cz
Fri Jun 14, 2019 7:47 am
Forum: Beginners
Topic: AVG temperature in bash script, how?
Replies: 1
Views: 214

AVG temperature in bash script, how?

I need to do several consecutive measurements over the cycle and then average the temperature. Unfortunately, I'm not doing it somehow. Can someone clever, please help me? #!/bin/bash total_temp=0 avg_temp=0 for i in {1..5} do teplota="`cat /sys/bus/w1/devices/28-0301977927ab/w1_slave | sed -n 's/^....
by napajedlaci.cz
Fri May 24, 2019 11:48 am
Forum: Troubleshooting
Topic: ttyAMA0 doesn't want me to work on Raspberry 2
Replies: 6
Views: 487

Re: ttyAMA0 doesn't want me to work on Raspberry 2

I have change ttyAMA0 for serial0 and serial started to work :)
by napajedlaci.cz
Fri May 24, 2019 11:23 am
Forum: Troubleshooting
Topic: ttyAMA0 doesn't want me to work on Raspberry 2
Replies: 6
Views: 487

Re: ttyAMA0 doesn't want me to work on Raspberry 2

There is two ttyAMA0 :o ls -l /dev lrwxrwxrwx 1 root root 7 kvě 24 11:06 serial0 -> ttyAMA0 drwxrwxrwt 2 root root 40 lis 3 2016 shm drwxr-xr-x 3 root root 160 kvě 24 11:06 snd lrwxrwxrwx 1 root root 15 lis 3 2016 stderr -> /proc/self/fd/2 lrwxrwxrwx 1 root root 15 lis 3 2016 stdin -> /proc/self/fd/...
by napajedlaci.cz
Fri May 24, 2019 9:08 am
Forum: Troubleshooting
Topic: ttyAMA0 doesn't want me to work on Raspberry 2
Replies: 6
Views: 487

ttyAMA0 doesn't want me to work on Raspberry 2

ttyAMA0 doesn't want me to work on Raspberry. I have it to communicate with Arduino via TX and RX pin. The wiring is OK, it worked. But I changed the SD card to RPI and now I can't turn on the serial link. I have serial link disabled in raspi-config. I only have console = tty1 in /boot/cmdline.txt a...
by napajedlaci.cz
Wed Mar 13, 2019 6:42 pm
Forum: Beginners
Topic: CURL send file txt data, how?
Replies: 3
Views: 535

Re: CURL send file txt data, how?

These are not weewx data. Just so I have a folder.
So how can I upload data through CURL?
by napajedlaci.cz
Wed Mar 13, 2019 6:11 pm
Forum: Beginners
Topic: CURL send file txt data, how?
Replies: 3
Views: 535

CURL send file txt data, how?

I need to send data from the realtime.txt file and still write it to me: curl: option ---: is unknown curl: try 'curl --help' or 'curl --manual' for more information Don't know where the error is? :roll: #!/bin/bash realtime=`cat /home/pi/tmp/realtime.txt` data="$realtime" curl -F "data="$data http:...
by napajedlaci.cz
Fri Mar 08, 2019 8:21 pm
Forum: Beginners
Topic: How install hidapi?
Replies: 2
Views: 1180

Re: How install hidapi?

#include "hidraw.h"
does not work. How to get the library to c ++ (* .cpp)?
by napajedlaci.cz
Fri Mar 08, 2019 7:54 pm
Forum: Beginners
Topic: How install hidapi?
Replies: 2
Views: 1180

How install hidapi?

I would like to help you install the hidapi. Will anyone please help?
I used git clone git: //github.com/signal11/hidapi.git, which hidapi downloaded, but I still do not know the advice with the installation.
by napajedlaci.cz
Sun Nov 04, 2018 10:42 am
Forum: Camera board
Topic: Camera image (V2) is too white, why? (AWB is auto)
Replies: 1
Views: 481

Camera image (V2) is too white, why? (AWB is auto)

I needed to deal with camera color settings. The image is white enough. Apparently it causes the lower part, which is dark and the others are too white for that. Can I fix this by adjusting the color contrast? :? SETTING: raspistill -w 2592 -h 1944 -q 100 -t 1000 -rot 180 --nopreview -ex auto -awb a...
by napajedlaci.cz
Tue Oct 30, 2018 10:05 pm
Forum: Troubleshooting
Topic: SPI transfer timed out with ENC28j60
Replies: 6
Views: 1122

Re: SPI transfer timed out with ENC28j60

I have a similar problem. Has anyone already solved this problem?
by napajedlaci.cz
Tue Oct 30, 2018 9:40 pm
Forum: Beginners
Topic: Temperature Sensor DS18B20 (module)
Replies: 7
Views: 1680

Temperature Sensor DS18B20 (module)

I have a DS18B20 temperature sensor module and I have no idea if this module can be used on Raspberry. The resistance I have read so is 10k, which is wrong. There should be 4k7. I do not know if the module is connected to 3.3V or 5V. https://laskarduino.cz/4323-thickbox_default/digitalni-cidlo-teplo...

Go to advanced search