raspberry-pi

How to send real-time sensor data to PC from Raspberry Pi Zero?

笑着哭i 提交于 2021-01-28 01:51:39
问题 I've written a Python3 script which runs on Raspberry Pi Zero W that collects data from an IMU sensor (MPU9250) and creates 3 different angle values; roll, pitch, yaw. Which looks like this: def main(): while True: dataAcc = mpu.readAccelerometerMaster() dataGyro = mpu.readGyroscopeMaster() dataMag = mpu.readMagnetometerMaster() [ax, ay, az] = [round(dataAcc[0], 5), round(dataAcc[1], 5), round(dataAcc[2], 5)] [gx, gy, gz] = [round(dataGyro[0], 5), round(dataGyro[1], 5), round(dataGyro[2], 5)]

I cannot list up the BLE devices in the neighbourhood of my Raspberry Pi (python, btmgmt)

谁说我不能喝 提交于 2021-01-27 18:52:27
问题 I want to scan the ble devices in the environment of my Raspberry, by using a python script called from a cron script. But when I do this in cron (I mean I added to sudo crontab -e), I allways end up with an empty list. when I am logged in as pi user - btmgmt works (only) fine with su permissions: pi@Pluto:~ $ btmgmt find Unable to start discovery. status 0x14 (Permission Denied) pi@Pluto:~ $ sudo btmgmt find Discovery started hci0 type 7 discovering on hci0 dev_found: 77:F8:D7:8A:1E:E5 type

Subprocess.Popen stops ( or malfunctions) after a few seconds

China☆狼群 提交于 2021-01-27 18:51:14
问题 I am a complete beginner so apologies for any mistakes. This is my code in Python 3.5. It executes in Raspbian on a Raspberry Pi 3. import subprocess radio = subprocess.Popen(["mplayer", 'http://edge-bauerabsolute-02-gos1.sharp-stream.com/absolute90s.mp3?'], shell = False , stdout=subprocess.PIPE) print ("Other code - no waiting for the subprocess to finish") The radio plays for about 30 seconds and then stops. I want it to run in the background without the script waiting for the subprocess

How to use an own kernel configuration for a raspberry pi in yocto?

谁说我不能喝 提交于 2021-01-27 17:49:43
问题 I like to remove some unused drivers for my RPI2 + custom board. For that I am creating an own configuration via: bitbake linux-raspberrypi -c menuconfig and save the new kernel preset to the file defconfig . After this I created an append file for the linux-raspberryp recipe. So I created the file linux-raspberrypi%.bbappend and filled it with: FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" SRC_URI += "file://defconfig" PACKAGE_ARCH = "raspberrypi2" I put the defconfig file to:

GPIO command for raspberry not working via crontab

此生再无相见时 提交于 2021-01-27 17:35:38
问题 I've got a Raspberry Pi. I've installed on it WiringPi for pilot GPIO on the board via command line. I've done a script called aggiornaora.sh gpio -g write 18 1 #it set the GPIO port to 1 #log with reverse append (echo 'accensione';date;echo ' ') | cat - logstufa.txt > temp && mv temp logstufa.txt This script work fine if I try to exec it directly via sh aggiornaora.sh . But when cron run the script, it do only the second action. All with root permission. I've checked this problem through

Connecting CAD model (Solidworks, AutoCAD or CATIA) with realtime measurements from Raspbery Pi or Arduino Sensor

依然范特西╮ 提交于 2021-01-27 11:44:24
问题 To present my question I will simplify my example. I will connect a sprocket on a step motor and measure acceleration with an accelerometer. The data will be captured by using either an Arduino or Raspberry pi sensor setup. The measurements will then be stored in a cloud-based environment or somehow similar and be send to the CAD model (that's the idea). Basically what I would like to achieve is to: connect the movement of the step motor with the SW/CATIA/AutoCAD model (if the physical

Connecting CAD model (Solidworks, AutoCAD or CATIA) with realtime measurements from Raspbery Pi or Arduino Sensor

荒凉一梦 提交于 2021-01-27 11:42:59
问题 To present my question I will simplify my example. I will connect a sprocket on a step motor and measure acceleration with an accelerometer. The data will be captured by using either an Arduino or Raspberry pi sensor setup. The measurements will then be stored in a cloud-based environment or somehow similar and be send to the CAD model (that's the idea). Basically what I would like to achieve is to: connect the movement of the step motor with the SW/CATIA/AutoCAD model (if the physical

Connecting CAD model (Solidworks, AutoCAD or CATIA) with realtime measurements from Raspbery Pi or Arduino Sensor

╄→尐↘猪︶ㄣ 提交于 2021-01-27 11:42:45
问题 To present my question I will simplify my example. I will connect a sprocket on a step motor and measure acceleration with an accelerometer. The data will be captured by using either an Arduino or Raspberry pi sensor setup. The measurements will then be stored in a cloud-based environment or somehow similar and be send to the CAD model (that's the idea). Basically what I would like to achieve is to: connect the movement of the step motor with the SW/CATIA/AutoCAD model (if the physical

Cross Compiling for Raspi - Executing the programm ends in “Segmentation fault”

流过昼夜 提交于 2021-01-27 09:37:59
问题 I have a self-written programm which I want to build also for Raspberry Pi from my x86 machine. I'm using eclipse generated makefiles and cannot change this thing. I've read this tutorial for CC for raspi : Hackaday-Link. Because raspi also have installed gcc version 4.9, I also try it with this version of the cross compiler. The problem also exisits with this hello world programm: #include <iostream> using namespace std; int main(int argc, char *argv[]) { cout << "hello world!" << endl; }

Cross Compiling for Raspi - Executing the programm ends in “Segmentation fault”

﹥>﹥吖頭↗ 提交于 2021-01-27 09:35:54
问题 I have a self-written programm which I want to build also for Raspberry Pi from my x86 machine. I'm using eclipse generated makefiles and cannot change this thing. I've read this tutorial for CC for raspi : Hackaday-Link. Because raspi also have installed gcc version 4.9, I also try it with this version of the cross compiler. The problem also exisits with this hello world programm: #include <iostream> using namespace std; int main(int argc, char *argv[]) { cout << "hello world!" << endl; }