Go to advanced search

by napajedlaci.cz
Fri Jun 14, 2019 7:47 am
Forum: Beginners
Topic: AVG temperature in bash script, how?
Replies: 1
Views: 78

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: 159

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: 159

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: 159

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: 144

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: 144

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: 237

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: 237

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: 282

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: 2
Views: 635

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: 825

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...
by napajedlaci.cz
Mon Oct 29, 2018 9:27 am
Forum: Troubleshooting
Topic: RPI Zero H and ENC28J60 Ethernet Module on 3V3 (Zero it broke)
Replies: 3
Views: 363

RPI Zero H and ENC28J60 Ethernet Module on 3V3 (Zero it broke)

Hello, I have RPI Zero H and ENC28J60 Ethernet Module. I used 3V3 and PI Zero worked for about 15 minutes (I downloaded python-pip and speedtest-cli) and then it stopped working. Either do I have a faulty RPI piece or I would have RPI fried by the ethernet module? Is 3V3 max 60mA? Are you using PI Z...
by napajedlaci.cz
Fri Oct 19, 2018 8:09 am
Forum: C/C++
Topic: Download data from URL and save to /dev/stdout
Replies: 4
Views: 1454

Re: Download data from URL and save to /dev/stdout

Code: Select all

data="`wget -q O- http://www.example.com/linux_data.php'`"
This code is safe, ok?

Now I need to send data, save to /dev/stdout
Unfortunately, I do not know.
by napajedlaci.cz
Fri Oct 19, 2018 7:42 am
Forum: C/C++
Topic: Download data from URL and save to /dev/stdout
Replies: 4
Views: 1454

Download data from URL and save to /dev/stdout

Hello,
I need to create script for Raspberry PI, which will be able to retrieve the data from the URL and secure this load against potential outages.

I need to print the loaded data and send it to /dev/stdout

Will someone please help me? :oops:
by napajedlaci.cz
Wed Oct 03, 2018 8:15 pm
Forum: Beginners
Topic: Install OS on RPI2 with use at PI zero
Replies: 7
Views: 550

Re: Install OS on RPI2 with use at PI zero

Can I install on RPI 2 and then transfer the SD card and use it on Pi ZERO? Will raspbian work when I install on RPI 2 and Raspbian will work on Pi Zero? :?
by napajedlaci.cz
Wed Oct 03, 2018 3:09 pm
Forum: Beginners
Topic: Install OS on RPI2 with use at PI zero
Replies: 7
Views: 550

Re: Install OS on RPI2 with use at PI zero

Yes, work on any model RPi.
drgeoff wrote:
Wed Oct 03, 2018 12:27 pm
Perhaps what you need to know is that a card on which you install the latest NOOBS or Raspbian will work on any model RPi.
by napajedlaci.cz
Wed Oct 03, 2018 12:15 pm
Forum: Beginners
Topic: Install OS on RPI2 with use at PI zero
Replies: 7
Views: 550

Install OS on RPI2 with use at PI zero

Is it possible to install Raspbian on RPI 2 then use PI ZERO? :?
by napajedlaci.cz
Fri Aug 31, 2018 7:32 pm
Forum: Beginners
Topic: How to write data to /dev/stdout ?
Replies: 5
Views: 462

Re: How to write data to /dev/stdout ?

Code: Select all

wget -q -O /dev/stdout "http://192.168.0.102/data.txt" 2>/dev/null | grep   -e "sensor1" -e "sensor2" -e "sensor3" , etc.
But what should the data.txt file look like to load this script?
by napajedlaci.cz
Fri Aug 31, 2018 4:48 pm
Forum: Beginners
Topic: How to write data to /dev/stdout ?
Replies: 5
Views: 462

How to write data to /dev/stdout ?

Hello, I have a meteorological station with linux program Meteohub.de and I need to get data to /dev/stdout How can I write data into this file? This is written in the manual MeteoHub.de: Starting with Version 4.2b Meteohub supports a generic weather station interface by means of a plug-in mechanism...
by napajedlaci.cz
Sun May 06, 2018 6:47 pm
Forum: Beginners
Topic: Restart RPI after 6 hours
Replies: 6
Views: 585

Restart RPI after 6 hours

How do I set up in crontab restart RPI every 6 hours?

Thank you very much.
by napajedlaci.cz
Tue Apr 17, 2018 2:28 pm
Forum: Troubleshooting
Topic: Serial not work (/dev/ttyAMA0) and serial is enable
Replies: 8
Views: 3999

Re: Serial not work (/dev/ttyAMA0) and serial is enable

OK, P5 and P6 (I2C and serial) are enabled. Then I rebooted

/boot/config.txt

Code: Select all

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
start_x=1
gpu_mem=128
enable_uart=0
disable_camera_led=1
uart_enable=yes

[email protected]:~ $ cat /dev/ttyAMA0
cat: /dev/ttyAMA0: No such file or directory
by napajedlaci.cz
Tue Apr 17, 2018 2:18 pm
Forum: Troubleshooting
Topic: Serial not work (/dev/ttyAMA0) and serial is enable
Replies: 8
Views: 3999

Re: Serial not work (/dev/ttyAMA0) and serial is enable

What is select 5 and then 6?

And my cmdline.txt:

Code: Select all

[email protected]:~ $ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=fb2a7412-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
by napajedlaci.cz
Tue Apr 17, 2018 2:06 pm
Forum: Troubleshooting
Topic: Serial not work (/dev/ttyAMA0) and serial is enable
Replies: 8
Views: 3999

Serial not work (/dev/ttyAMA0) and serial is enable

I changed the SDHC card and now I have Raspbian STRETCH. Unfortunately, I do not want to run serial / dev / ttyAMA0 and I do not know what to do about it. Through raspi-config I have enabled SERIAL. Still does not want it to work over the Python. Do you advise? [email protected]:~ $ cat /dev/ttyAMA0 ca...
by napajedlaci.cz
Tue Apr 17, 2018 8:53 am
Forum: Python
Topic: Watchdog or python SMbus has no installation candidate
Replies: 1
Views: 505

Watchdog or python SMbus has no installation candidate

Hello, I have problem with install smbus in the Python version 2.7. I have Raspbian STRETCH LITE (last version). Package smbus but is not accessible. So how can I install SMBUS to support I2C? I have script wind.py: #!/usr/bin/env python import time import serial # wing avg s1 = serial.Serial("/dev/...

Go to advanced search