Questions tagged [raspberry-pi]

1

votes
3

answer
35k

Views

Publish and Subscribe with Paho Mqtt Client

After installing paho mqtt client on my raspberry pi and connecting my android application and arduino with my broker. I want after receiving message from the application or the arduino client republish this message to this clients for example if i recieve "ON" after i recieve "OFF", the next publis...
Mohamed
0

votes
0

answer
5

Views

Raspberry Pi Install Dlib, “Cannot Currently show the desktop” message

I want to install Dlib to Raspberry Pi 3B+ I proceed Change my boot options Console Autologin Text console, automatically logged in as 'pi' user and Advanced Options => Memory Split (128MB -> 16MB) However I rebooted my Raspberry Pi, I see the "Cannot Currently show the Desktop" Message How i can f...
널널이
1

votes
1

answer
3.5k

Views

How can I change the site file directory for an apache server? (Raspberry Pi)

Right now it's '/var/www/html' but I want it to be '/home/pi/FTP' I can probably just change it in the config file, but i can't manage to find it, thank you in advance.
Jojo
0

votes
0

answer
4

Views

Raspberry redirect service output to console

I've been trying to monitor the output of a service and I managed to do so by using this service configuration file (reset_trigger.service): [Unit] Description=Reset Button Trigger After=multi-user.target [Service] StandardOutput=journal+console StandardError=inherit ExecStart=/usr/bin/python -u /us...
Alex
1

votes
1

answer
32

Views

Set Node-red password in root mode

I have a node-red flow in my raspberry pi 3 for which I'd like to set a user and password in root mode, but haven't succeeded yet. So far I've managed to set it as a regular user as stated in their own security website (https://nodered.org/docs/security), but I need to run it as admin in order to s...
Arduino
2

votes
0

answer
22

Views

Selenium Chrome Driver not working on Pi Zero with error code -4

I am trying to set up a script on a new Pi Zero W that was previously working on my Pi 3 B. It seems the hardware may be causing the issue as simply moving the whole operating system etc over to the new pi causes this issue. There is no other changes. I have tried looking at my Chrome and chrome dri...
Joss Sparkes
1

votes
1

answer
17

Views

How to add Different Suffix at two Different google gauges

I have a Raspberry Pi 3 running a lamp server and reading data from a AM2302 sensor the data is store at mysql database and then displaying in a webpage trough php file. the main questions is that wanna to assign different suffix at two google gauges ( one for the temperature and one for the humidit...
Elvy Collado
0

votes
0

answer
2

Views

Raspberry Pi webserver shared folder permission

I have my websites folder on Mac where I have created a file sharing with user pi. I have then created a mount to this folder on Raspberry Pi like this //my-mac.local/Projects /home/pi/projects cifs username=pi,password=raspberry This creates a mounted folder projects showing all the directories and...
codelearner
1

votes
1

answer
42

Views

How to IOCTL properly from golang

I am trying to port bit of raspberrypi's userspace code from C to golang and I've run into a program involving ioctl(). I am having trouble specifically with following C code #define MAJOR_NUM 100 #define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *) static int mbox_property(int file_desc, void *...
Sigma
0

votes
0

answer
14

Views

How can I know the if a video is playing in python?

I am trying to make a video player that runs a set of standby videos until a distance sensor sees something below a certain distance, at which point, a video is played in it's entirety . so far this is what I got: def videowakeup(): #video for when the sensor detects screen=pygame.display.set_mode(...
R.Matinha
0

votes
0

answer
4

Views

Raspberry Pi/Raspian: Recording sound on from Bluetooth Headset via arecord not working, but also no error messages

I have a Pi 3b+ with the latest headless Stretch release. The Pis internal bluetooth is deactivated, as I need its Pins for another device that is plugged to them. Instead I am using an Edimax Wifi/Bluetooth-USB-Dongle. On the system I manually compiled and updated bluez/bluetoothd to v5.50 and blue...
Stefan Wegener
1

votes
0

answer
8

Views

Need help in using Signals with Python Flask

I am new to Python Flask and need some information/basic knowledge on how to use Signals with Flask. My understandig so far: I can create and send own signals. I can use this signal, to make a function call. My Flask Application looks something like this: @app.route("/") def start(): return render_t...
Rasid Music
1

votes
3

answer
2.2k

Views

Obexpushd Can't Initialize Via Bluetooth

I'm relatively new to the Raspberry Pi and am trying to receive data via Bluetooth on my Raspberry Pi. I've opted to use obexpushd and have installed all the bluetooth packages needed. However, when I run the command obexpushd -B -n to initialize obexpushd and have it listen to any incoming Blueto...
Jam
1

votes
2

answer
1.5k

Views

Python: Opening a program in a new terminal [Linux]

I am writing a bootstrap program that runs several individual programs simultaneously. Thus, I require each sub-program to have its own terminal window, in a manner that gives me the ability to start/stop each sub-program individually within the bootstrap. I was able to do this on Windows using Pope...
Jack
0

votes
0

answer
14

Views

Can OpenGL ES render to user space memory, such as mmap'd /dev/fb1?

I'm trying to figure out if I can make make OpenGL ES 2.0 render the buffer contents into a mmap'd memory in user space instead of the memory allocated by the GPU. Unfortunately, glReadPixels() function is incredibly slow as it stalls the whole pipeline, so even reading 10x10 pixels drops the framer...
Mich
1

votes
1

answer
1.8k

Views

skfuzzy can not be recognized

I made a traffic light prototype from raspi. My source code has given an error. The erorr said Traceback (most recent call last): File "/home/pi/testing.py", line 2, in import skfuzzy as fuzz ImportError: No module named 'skfuzzy' I already checked that scikit-fuzzy has been installed on my raspi,...
Himawan Sandhi
1

votes
3

answer
207

Views

How to enable wiringpi GPIO control inside a Docker container

I've used the answer to this question to enable control of my Raspberry Pi GPIO pins from within a Docker container, which runs Alpine. $ docker run --device /dev/gpiomem whatever This works with the Python RPi.GPIO module, but not with wiringPi. Python and its dependencies takes up about the same s...
Jonathan Holvey
0

votes
0

answer
7

Views

Polling USB mouse Events

I need to poll USB mouse movement and have the code run only when the mouse is moving. Firstly I've taught myself Python in about 5 days so apologies if the coding is bad. Secondly I'm using PyUSB on a Raspberry Pi running Stretch. I've written some Python code that allows me to interface a USB mous...
Caleb.Jones.512
1

votes
2

answer
206

Views

Segfault occuring after a week of running?

I've got a C program which runs fine, but after around a week of running it always seems to segfault. I've compiled it with -g and run it through gdb and it looks like it pointing to the following code. In my main loop I call a function (actually to try and debug why its crashing) char config_debug[...
Greg
0

votes
0

answer
24

Views

Why I can't change the name of my files in my Python program using os.listdir

I'm starting to create a new 3D scanner with a Raspberry Pi 3B + and a Canon 6D. I have a part of the Python code to recover the images thanks to the gphoto2 library but I can not change the name of the recovered images, currently, I have two files: capt0000.cr2 and capt0000.jpg I must renames them...
1

votes
2

answer
691

Views

Creating loop for BMP085 Code?

I'm sending up a weather balloon controlled by a Raspberry Pi and BMP085 Sensor, and I'm using some Python Code via I2C to run it. I want to modify the Adafruit BMP085 Example Code that is runs it every half an hour: #!/usr/bin/python from Adafruit_BMP085 import BMP085 # ============================...
sharksfan98
1

votes
1

answer
3.4k

Views

How to Register a Gstreamer Plugin?

I was trying to install a gstreamer plugin in my Raspberry Pi. I have downloaded the Gstreamer plugin from a repository, then I build the binaries. After building I did a sudo make install to install the gstreamer openmax plugin. But the plugin (gst-openmax) that have hardware decoder elements(omxh...
jithin
1

votes
1

answer
2.2k

Views

Raspberry Pi: Embedded Programming Exercise, Getting Started

First, I am following this tutorial here (http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/). In the first exercise you learn about addressing the GPIO pin that is responsible for turning on the green okay LED. I have the rev C of the Raspberry pi which to my knowledge uses the Broadcom (BC...
Matthew Hoggan
1

votes
1

answer
127

Views

Script is not blocking

This is a timelapse script for moving a camera along a dolly. The problem is that when I run the code, sometimes (at iteration 7 exactly, for example) the dolly is moving and the camera snaps a photo at the same time. It's as if the commands aren't blocking before the next one gets executed. As you...
mh00h
1

votes
1

answer
1.9k

Views

Building Source Code on Raspberry Pi

This is probably a stupid question, but I have been pouring over forums and google for hours and I can't figure this out. I recently downloaded the mame4all source repository from here https://code.google.com/p/mame4all-pi/ and made a few edits to the list of games that are available. Now I am hav...
Bubo
1

votes
1

answer
753

Views

incron on Raspbian not working

I have virtually an identical situation as this question, except the accepted answer does not work for me at all. Making this simple Python script is my second attempt; echoing text and redirecting it to a file doesn't do anything either. I am using the Raspbian linux distro. [email protected] ~ $ incr...
kevlar1818
1

votes
2

answer
1.5k

Views

How Can I Get Started With Embedded Programming With the Raspberry Pi?

I have been given a Raspberry Pi Model A by my school. They want me to investigate it and I really want to get involved with some embedded programming with the raspberry pi. However, I have no idea how I can get started because there seems to be no good online tutorials that i have found so far and...
1

votes
2

answer
3.4k

Views

Two-way audio for software ip camera

I am trying to setup a raspberry pi box with a usb camera as a IP Camera that can be viewed from a a generic android IP Camera monitor app. I've found some examples on how to get the video stream, and that works, but what I also need is two-way audio. This seems to come out of the box in standalone...
naumcho
1

votes
1

answer
1.9k

Views

Linux - How to program for a touchscreen outside of X Windows

I have a small TFT with touch control connected to a Raspberry Pi. The touchscreen works well within X windows. I would like to be able to use the touchscreen outside of X windows. Something simple, like two buttons on the screen. I have experience with C and writing to the framebuffer using SDL. O...
Mwilliams03
1

votes
1

answer
20.6k

Views

Raspberry Pi UART program in C using termios receives garbage (Rx and Tx are connected directly)

I have a simple program written in C which uses termios to send a basic string to the Raspberry Pi UART and attempts to read and output the response. The Rx and Tx pins on the Raspberry Pi are connected with a jumper so whatever is sent should be immediately received. Despite the program outputting...
kourosh
1

votes
5

answer
831

Views

Reinstall Linux Package with File Backup

I installed apache2 on my Raspberry Pi, which runs Debian OS. apt-get intall apache2 Then I removed it using apt-get remove apache2 But its files were present there, and I could also find some other packages related to apache2 over dpkg. So, I manually deleted the apache2 file from /etc/. Now when I...
Veer Shrivastav
1

votes
1

answer
164

Views

Not Found Error (404) with Static files when running from prompt

I recently moved from windows to raspberry pi for my app. It loaded at least once but now for the life of me I can't get static files to load again. If I run the python script from shell as sudo (or without) I get 404 for all static files, dynamic links still work as expected. If I run it from IDLE...
DominicM
1

votes
2

answer
1.5k

Views

GStreamer 1.0 on raspberry pi

i'm trying to run gstreamer on rasp pi, but get this error: Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: GStreamer encountered a general resource error. Additional debug info: gstmultiudpsink.c(959): gst_multiud...
Alex Neskin
1

votes
2

answer
532

Views

broken pipe between cat and grep on Raspberry Pi

I am trying to read the wireless connection link quality in a C program. I do: for(;;){ rf_line = popen("cat /proc/net/wireless | grep wlan0", "r"); fgets(line, 80, rf_line); pclose(rf_line); ... //more code } On the Raspberry Pi with the Wheezy 08/12 image, it crashes with the errno 32, broken pipe...
Christoph Kuhr
1

votes
2

answer
15.7k

Views

How do I use mysql_connect() and mysql_select_db() correctly?

Yes, I know mysql_connect() is deprecated, but I'm using it for learning purposes. I have a little Raspberry Pi server set up, using Nginx and Raspbian, and I downloaded a PHP script to serve as a login handler, except that I can't seem to connect to my MySQL database. Here's what I have: define ("D...
SuperCheezGi
1

votes
1

answer
10.5k

Views

Check for successful connection using rfcomm

I am trying to connect my phone to my RaspberryPi using a blue tooth dongle (not trying to do anything earth shattering, just determine when my phone is in the area). If I turn my phone's blue tooth on and issue the following command, I get the following output (before anyone starts preaching to me...
puk
1

votes
2

answer
1.8k

Views

node.js on Raspberryp]Pi not showing any terminal output

I've installed node.js on my RaspberryPi running Raspbian using sudo apt-get install nodejs npm it looks as though it has installed, I got no errors on installation, but when I check the version, I don't get any terminal output from node -v or node --version. I wrote a simple js file just outputti...
pedalpete
1

votes
2

answer
4.9k

Views

Playing mpeg2ts with Gstreamer-1.0 on Raspberry Pi

Good day fellow programmers, I am trying to play a .ts file with gstreamer straight on a RPi. Gstreamer-1.0 as well as gst-omx have been successfully installed and this example pipeline runs like a charm: gst-launch-1.0 -v filesrc location=h264_720p_hp_5.1_6mbps_ac3_planet.mp4 ! qtdemux ! h264parse...
Plox
1

votes
1

answer
477

Views

Compiling geniePi.h 4D Systems

I am trying to compile this program #include #include #include int counter = 0; int main() { if (genieSetup ("/dev/ttyAMA0", 115200) < 0) { printf("Failed to connect"); } for (;;) { counter++; genieWriteObj (GENIE_OBJ_COOL_GAUGE, 0, counter) ; sleep(10); } return 0; } I have been running the c...
TheGreenToaster
1

votes
1

answer
208

Views

while conditions not meeting in python

Well, I'm trying to develop a home alarm which takes pictures according to the feedback received from a PIR module (using raspberry pi and its GPIOs). The problem is the following. When the PIr is triggered, takes 5 pics, then goes to a function that remains checking for another trigger during the n...
ederollora

View additional questions