Questions tagged [raspberry-pi]

1

votes
1

answer
231

Views

execute python script from cron don't send mail

I've script in python that takes photos from raspberry camera and send mail with this photos. From command line everything works OK, script start do the jobs and finishes without errors. I setup cron to execute script every 1 hour. Every hour I get mail but without attachments. Where or how can I...
kolo
1

votes
0

answer
51

Views

Reserve specific core for python script PYTHON RPi3 RASPBIAN

Hello I'm running some python script on Raspberry Pi3. I noticed strange behaviour. Let's assume that I run this python script and it use specific core for example 3. (RPi3 have 4 processing cores). I noticed that from time to time this code is running on other core. There is an option to set up it...
KyluAce
1

votes
0

answer
399

Views

Test Actions on Google app on Raspberry Pi running Google Assistant SDK

I created an Actions on Google app which I am currently testing. I was able to test it on my Pixel, but when I tried to launch the app on my Raspberry Pi running the Google Assistant SDK it responded by saying '(name of app) isn't supported on this device'. Is there any way I can run the app on my P...
Shawn Patel
1

votes
2

answer
722

Views

Code for joystick on sense hat

I just got a sense hat for Christmas, and I am working through the following website: https://projects.raspberrypi.org/en/projects/getting-started-with-the-sense-hat. When doing the joystick part of the website, i typed in this code: from sense_hat import SenseHat sense = SenseHat() while True: for...
Andrew Bell
1

votes
0

answer
681

Views

Remote Connection to “Raspberry Pi” via “Windows IoT Remote Client” leads to a white blank screen

I have Windows 10 IoT installed on a Raspberry PI 3 B, and I am trying to connect to it via the Windows IoT Remote Client running on my laptop. (+) As it mentioned here and here, there is a related known issue in Windows 10 IoT on build number 16299. Consequently, when I try to connect my Raspberry...
Milad H.
1

votes
0

answer
2k

Views

Critical dependency: the request of a dependency is an expression

Im trying to add gpio support to a project on my raspberry pi 3 model B but i keep encountering an error with bindings when i try to ng serve my app. This problem persists when I try to use any other gpio package. WARNING in ./node_modules/rpi-gpio/node_modules/bindings/bindings.js 76:22-40 Critical...
Dennis Van Bets
1

votes
1

answer
60

Views

Polyphony with Pygame channels

I am trying to trigger audio samples in Python on a Raspberry Pi 3, with physical buttons. The idea is that when I press a button a sound plays. I have been using the Pygame library's channels to achieve (or at least mimic) polyphony. The code that I have been trying to implement is as follows: (sou...
calslate
1

votes
0

answer
146

Views

Counter using Python and RPi does not count consistently

I wrote a counter code using Python to be used in RPi. I have 2 sensor to do the counting, and the signal is feed into RPi GPIO. The counter will count how many times the sensors are triggered. The code I write for the RPi to count the signal are : def counteryPlus(channel): if GPIO.input(channel):...
Brandon Lok
1

votes
2

answer
388

Views

Restarting Raspberry Pi Wifi with Python

I have a Python Script which automatically checks the internet connection and is supposed to restart the wifi connection, if the internet fails. This is the function that does this: def RestartWifi(): print 'Restarting Wifi.' os.system('sudo ifdown --force wlan0') time.sleep(6) os.system('sudo ifup...
Stefan S.
1

votes
0

answer
53

Views

Jenkins not applying credentials for git

I'm running Jenkins 2.89.2 in Java on Raspberry Pi 3. I have a git repository located at /srv/git/repo.git, and a user 'git' with full access to this directory. I'm creating a pipeline that should check out the repository, configured like this with correct git credentials. Whenever I try to run a jo...
Mats
1

votes
1

answer
531

Views

cannot open shared object file: No such file or directory in raspberry pi with python

Here I am trying to import 'libEpsonFiscalDriver.so' file in raspberry pi using python 2.7. Here are my steps in python >>>import ctypes >>>ctypes.cdll.LoadLibrary('/home/pi/odoo/my_module/escpos/lib/libEpsonFiscalDriver.so') Traceback (most recent call last): File '', line 1, in File '/usr/lib/pyt...
Parth N Patel
1

votes
0

answer
36

Views

Changing the colour of a pushbutton using python/raspberry pi

I'm working on a project for work which is essentially a remote monitor that looks at the status of drawbridges. I have a GUI set up that i designed with PyQtDesigner with 8 buttons that are currently coloured red and want them to go green when drawbridges come down. I'm using the GPIO on a raspberr...
Chris
1

votes
0

answer
120

Views

No route to host error when using requests.post in python on raspberry pi

I am trying to send post request to URL from raspberry pi but I am getting Errno 113: No route to host error. My code is: import requests >>> r = requests.post('http://alnnovative.com/security.php', data='marium') I created a stack trace log file which I have uploaded here: https://www.dropbox.com/s...
Marium Malik
1

votes
0

answer
203

Views

How I can install phpseclib in raspberry pi 2?

I want to install phpseclib in my raspberry pi 2 (which OS is Raspbian). I tried these commands: sudo apt-get install php5-pgsql php-pear sudo pear channel-discover phpseclib.sourceforge.net sudo pear remote-list -c phpseclib sudo pear install phpseclib/Net_SSH2 sudo service apache2 restar here When...
froz
1

votes
1

answer
544

Views

Updating pyaudio does not work

I want to update pyaudio on my Raspberry Pi 3 to the newest Version (actually 0.2.11). To do that i tried: sudo pip install pyaudio --upgrade This is the result: Downloading/unpacking pyaudio from https://pypi.python.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyA...
Elias
1

votes
1

answer
1.7k

Views

How to activate bcm2835_wdt watchdog kernel module for raspberry pi 3?

I have been trying to activate bcm2835_wdt watchdog module of raspberry pi 3 for 6 hours but I couldn't. modprobe bcm2835_wdt returns no error but lsmod command doesn't return bcm2835_wdt module in the list. I have loaded watchdog and chkconfig then; sudo chkconfig watchdog on when I try to start...
user1712451
1

votes
0

answer
109

Views

How to edit /etc/rc.local when raspbian shuts down immediately

I dun screwed up. I have a raspberry pi zero W and I have a project that needs to be as low power as possible. For my use case it's ok for the raspi to be powered down for long periods as it just needs to send a wifi message in response to a button being triggered. So I edited /etc/rc.local to run m...
nickvans
1

votes
1

answer
140

Views

/dev/rfcommo not giving any data when reading OBD data in raspberry pi via bluetooth

I am trying to connect my raspberry pi to a Bluetooth OBD adapter. I have verified that the OBD device is working by connecting to it from the android phone using Torque lite app. I am following this tutorial to connect the raspberry pi to the OBD adapter. I am able to pair with the OBD adapter and...
Kiran
1

votes
1

answer
1.3k

Views

internal compiler error: Segmentation fault On Raspberry Pi

While trying to build OpenCV 3.3.0 on a Raspberry Pi I keep getting compiler level segmentation faults. I am following the guide here on building the optimized OpenCV Library. https://www.pyimagesearch.com/2017/10/09/optimizing-opencv-on-the-raspberry-pi/ The cmake step works perfectly fine howeve...
rreichel
1

votes
0

answer
97

Views

Use RaspberryPi model B 1 (Broadcom BCM2835) with USB OTG as an slave ethernet

I'm trying to use the Broadcom BCM2835 OTG functionality to use the RPi as a Ethernet gadget in order to establish a network connection with a host (I found this is used with RPi Zero). The OTG is supported in RPi B1 as you can see in the Broadcom BCM2835 specification. I tried to recompiled the ker...
rjc
1

votes
1

answer
725

Views

Connection Issue for Raspberry Pi with 3G/4G Dongle

I come to you humbly at the end of my tether, teetering on the brink of insanity. Here is the situation: A small service my business provides runs off a Raspberry Pi Zero W. It is set up with usb_modeswitch using a Huawei k4203 and the following configuration: /etc/udev/rules.d/40-usb_modeswitch.rul...
musicalmadness
1

votes
0

answer
83

Views

How to add a class to Inception Model (Tensorflow)

I'm building an object recognition application in real time on a raspberry Pi, so I decided to use tensorflow to doing so. Google’s Inception v3 model is a great with object recognition but it's terrible with detecting persons, so I am thinking of adding a class 'Persons' to the other 1000 existi...
AOahmed
1

votes
0

answer
105

Views

Error while Working with US-100 on Raspberry pi 3

I wrote the following code for my US-100 ultrasonic distance measurement sensor. But I am getting junk results everytime. when ever I am moving my sensor, I dont get any change in reading. Also, when I am connecting GND and VCC to sensor, input stops generating. Need help with Circuit diagram for co...
Adwait
1

votes
0

answer
96

Views

how to control a console oppened in terminal using python

so, i've been trying to make an automated program that do everything i need to open yowsup(a whatapp robot). i need a programe that will open terminal and start yowsup(it is a code that when its open in terminal it start a consle(PHOTO1). what i've done so far is a very very basci code in python to...
Ferbs nando
1

votes
1

answer
526

Views

Raspberry Pi Python - Multicasting UDP using Socket not working on local network

My current setup is this: 1 x computer 1 x GS308v2 ethernet HUB 7 x raspberry pi's The pi's are given static ip's ranging from 192.168.1.2 to 192.168.1.9. The dhcpcd.conf file is as follows: The python script for sender: #!/usr/bin/python import socket import struct import sys import IN import subpr...
Mohsin Anees
1

votes
0

answer
113

Views

ISP conflict on Raspberry Pi/Arduino SPI communication

I'm working on a communication between a Raspberry Pi 3+ and an Arduino Nano. The Raspberry uses ISP pins to program the Arduino. After, both should communicate in full-duplex via SPI protocol, using the WiringPi library under Qt environment. The problem is that SPI only returns 0 on both slave and...
Adri Girod
1

votes
0

answer
166

Views

How to get rid of vignetting in Raspberry-Pi camera pictures?

I am working on a project which requires taking a number of pictures from a raspberry-pi camera from a drone. There seems to cyan vignetting in most of the output pictures from pi camera. I searched different forums and help available online on cyan vignetting is quite limited. I tried enabling stil...
Umar Dastgir
1

votes
2

answer
323

Views

Coin Acceptor With Python Timer

I'm having trouble figuring out this code. I am currently making a script in python where a it's kind of how an arcade machine works when you have 30 seconds to continue and you can insert more coins to go again. The trouble I'm having is I cant get the coins to count up while the timer counts down....
kdl
1

votes
1

answer
462

Views

arm-linux-gnueabihf-ld: unrecognized option '-Wl,--gc-sections'

I am cross-compiling Qt for raspberry Pi using this link and I am facing some issues. When doing sudo make I get the following: ~/rpi-xtools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-ld -Wl,--gc-sections -Wl,-O1 -fuse-ld=gold -o ../../../bin/moc .obj/moc.o...
bot1131357
1

votes
0

answer
48

Views

Cross compiling opencv for rpi on fedora using eclipse

im still new to the Raspberry pi/linux platform and im seeking help for my project. Im trying to make a c++ program on fedora using eclipse with opencv for my raspberry pi 2 model B. I dont need help cross compiling as i can already do it with a program without opencv. What do I need to do to make t...
mat cape
1

votes
0

answer
82

Views

Xargo config for Raspberry Pi

I'm learning to build a simple bare metal program (without Linux OS) for Raspberry Pi (gen 1). However, I don't know how to setup the cross-compiler under the hood of xargo. There are docs on rust-cross about RPI 2 but not about RPI 1. Is there some example how to do it? I've tried several existing...
phodina
1

votes
2

answer
440

Views

How to capture RAW JPG with picamera in a python script

I have a raspberry pi camera which I am using to take some pictures. I want to take some raw jpg pictures. Upon searching online, I found out that I can accomplish it using the following command: raspistill --raw -o image.jpg However, I want to accomplish the same thing in my script. I do realize th...
Umar Dastgir
1

votes
0

answer
42

Views

What is the most appropriate clock/time source for software-based signal processing?

Let's say I want to sample a pair of GPIO pins of my Raspberry Pi* with a frequency around 10kHz to feed a software-based signal analyzer (written in C for instance). What is the most appropriate method to obtain an accurate timestamp for each sample? Accurate means, the delay between acqiring the s...
code_onkel
1

votes
0

answer
92

Views

Raspberry Pi & Waveshare

I'm trying to hook up a Raspberry Pi model B to a waveshare e-Paper Hat (2.9 inch). Is this the correct pin connection: E-paper --> Raspberry Pi 3V3 --> Pin 1 GND --> Pin 9 DIN --> Pin 38 (SPI1 MOSI) CLK --> Pin 40 (SPI1 SCLK) CS --> Pin 24 (CE0) DC --> Pin 25 (GPIO 25) RST --> Pin 11 (GPIO 17) BUS...
Radler
1

votes
0

answer
211

Views

Calling Python from C++ popen() function

I'm writing a small program in C++ that runs a Python script which relies on the popular requests Python module. I use C++'s popen() function to run a Python script and read the input like so: std::string command = './fetch.py'; and pass it in to popen() like so: FILE *in = popen(command.c_str(), 'r...
Christian K
1

votes
1

answer
204

Views

How to configure libnfc to use a specific device?

I have a Raspberry PI with two NFC readers attached. Problem is that the readers get different device numbers each time the system reboots or a reader is detached and attached again. I therefore created udev rules that create a fixed device name depending on the physical port a device is attached to...
Rene Auberger
1

votes
2

answer
86

Views

Is there a way to save the variable value in python In case of power failure on the raspberry pi?

Is there a way to save the variable value in python In case of power failure so when i run the program again it does not start from initial value but the value which was saved last.In the below code i am counting the number of times a button is pressed so can i save the value of age and start counti...
M. Suarez
1

votes
0

answer
405

Views

How to capture images continuously and control a time based bot at the same time?

This post is not exactly a coding problem , but it is more of a code structuring and synchronizing problem . So I have created a bot using Raspberry Pi, which moves in a predefined path as shown in the attached picture . It moves from start->A for 10 seconds , then takes a left and moves for 5 seco...
Boudhayan Dev
1

votes
0

answer
61

Views

How to specifiy MonoRemoteDebugger application folder?

I'm using MonoRemoteDebugger to develop an app remotely in C#/Mono from Visual Studio 2017 on a Raspberry Pi/Raspbian. I've noticed that the app is placed inside a Temp folder, in MonoRemoteDebuggerServer folder. I was wondering if it's possible to configure MonoRemoteDebugger to place the app in a...
Cristian M
1

votes
1

answer
58

Views

Can I install the Secure Gateway client on a Raspberry PI

I'm running Raspbian GNU/Linux 7 (wheezy) on my Raspberry Pi. Can I install the Ubuntu IBM Secure Gateway client? [email protected] ~ $ sudo dpkg -i ibm-securegateway-client-1.4.1+client_amd64.deb dpkg: error processing ibm-securegateway-client-1.4.1+client_amd64.deb (--install): cannot access arch...
jpsstack

View additional questions