Raspberry Pi





The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future.

We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.

Share tech news, updates, or what's on your mind.

Sign up to Post

USB GPS Detection on Raspberry PI

I have some python code that scans WIFI packets and in my receiver code I have an instance of a GPSPoller class.

The issue I am having is that withing the gps library gpscommon.read() blocks when there is no GPS dongle connected to the Pi.

I couldn't seem to find an elegant way to check to see if gpds has any devices added to its device pool so I could skip my code that starts polling gpsd for position data.

I don't want to write code to check for /dev/ttyUSB0 as that does not seem like a very elegant solution.

Can anyone provide advice?

Author Comment

lsusb would list my device but then I would have to write software that looks for the specific device. If I swapped out the receiver for a different kind I would have to change the code to take that into account.

I hope there is a better way to do it that lsusb.

Expert Comment

by:Mark Wieder
Yeah, if you want the code to be more generic (how often do you intend to swap out a different gps dongle?) then lsusb probably won't help here. You might try setting up a socket connection to port 2947 and trap the error, but you'll have to do this before instantiating the gps class because the class initializer does that as well.
pip install twilio
works perfectly on a Pi2.   Just bought a new Pi3 with the latest NOOB.  
same version of python (2.7.9), same version of pip (1.5.6).  I keep getting the error:

TypeError: __str__ returned non-string (type Error)

Googling around, I checked and verified that
- no network issue, Chromium connects to https://pypi.python.org/simple/twilio/
- my date/time on the computer is correct
- some talk about --trusted-host=http://pypi.python.org/simple/ but that parameter is not valid on pip
- some talk about creating an /etc/pip.conf file and adding trusted-host=pypi.python.org but that makes no difference (assuming pip every reads that file...)

My guess is that it has something to do with the SSL certificates... but I have no idea how to solve it.  
sudo apt-get install libssl-dev did not help

Hi all,

I am using Backuppc, installed on a Linux server, to backup one of my Raspberry Pi.

I've configured the host as you see here:
But, when I run my full backup, I can still see the /mnt folder and its files into it:
What am I doing wrong?
My son has set up a Raspberry Pi in the home to display images. He enabled FTP and told me to connect via WinSCP. I have done this, and I see all the folders on the Raspberry Pi. However, I cannot upload images or do anymodifications on the raspberry pi due to a permissions problem.

Any ideas what could be the cause of this?

I am logging in with his username and password, which has full rights to the Pi.

Thank you.
I have about 80 desktop users. Each has an APC SmartUPS.  We've never bothered connecting them via USB to the computers because we didn't want to contend with the PowerChute management software.  But this is no good. As it is, the way I usually find out that a battery is no good is when we have a power outage and someone's UPS fails. I need to get a better system than that :-)

Has anyone found a centralized UPS management solution? APC has a business edition of PowerChute, but it's limited to just 25 devices. What's up with that? I need a that could monitor and manage all of our UPS devices.

Someone should build a Raspberry Pi solution for this that connects to the UPS via USB and the network via WiFi.
How do I embed VideoLan VLC player in a HTML webpage on Raspbian on RPi3?
I would like a script to change audio output from HDMI to Bluetooth (and vice versa) for a Raspberry Pi 3. Not knowing scripting on linux (Raspbian). I have the bluetooth enabled.

Also would like to run this script from a remote computer.

Any assistance appreciated.
Hi everyone,

So I've spent the past week reading and trying to understand the python language and more importantly the CherryPy web framework.
To be honest Im getting no-where quickly...

What I'm trying to do is simply build a frontend to a Raspberry Pi project I've been developing.
The CherryPy web framework seems perfect for this as it is small and contains its own web server that would suite my needs perfectly.

An admin user attaches to the Raspberry PI AP and is immediately directed to a webpage (This I have solved quite easily).
The webpage is presented by the CherryPy web server.

I have an index.html which it returned from my CherryPy script.

import os, os.path, sys
import cherrypy

# Configuration file to access server over network and define ports

class menu(object):
    def index(self):
        return open('index.html')

(Fairly simply until now I know)

What I would like to do is have buttons on my index.html that can be pressed and return os.system('mkdir boom')  (obviously my system commands will be a little more than this.. They will start and stop services.

The buttons will eventually be toggle switches, so going to the page will need to return the current status of the running process. Red if the process is not running and Green if it is running. I think I need to be interacting with jquery on my index.html page to achieve this...

This whole area is new to me and …
Which is the best handheld device for learning programming and later also developing programs on the go anywhere?

So that I can write a few lines of code on the metro, bus, when waiting for a flight etc.

I was thinking of this Raspberry Pi, but some don't recommend it for learning programming.

Is there any other alternative, something with long battery life in the size of a big smartphone (or maybe 9 inches display)?

Recently I used the Retropie emulation software for Raspberry Pi. It is a really cool software and is very handy and attractive. So, I was wondering whether I could replicate these softwares on sd cards, install them on pis and start selling them for some small scale business. I would like to know, if doing such a thing would be legal. Actually, there are quite few ideas about using pis as portable media centers, portable game consoles, a simple portable desktops or just a cheap monitoring cameras. It can be customized to the very end for users and can be an attention grabber in certain circles. But what would be my legal position and what, if any, licensing would it require to start such a business?

Thanks in advance.
Is it possible to program the Raspberry PI camera to do OCR?
Need it to recognize a list of characters and when seen, write the info to a file.  
Need the following info with each entry;
Captured data
Date and time (down to the second)
Location (can be GPS or user entry)

And once a day (or at user request) upload data to a online database.
I need a code in Embedded C for making call andi sending SMS by using Raspberry pi 3 and GSM SIM 900. Please help me. I am new to Raspberry pi

Configuration Raspberry Pi 3 with camera
QNAP TS-453 Pro

I have a Raspberry Pi 3 up and running with the help of this image: http://ronnyvdbr.github.io/RaspberryIPCamera/
The guy who developed the image has a blog where he describes how to connect the Raspberry to Survellance Station:

I tried it and can connect to Surveillance Station, using these settings:

Camerabrand:       Generic Model
CameraModel:      Generic RSTP
Cameraname:        Camera 1
HTTP URL:              /
IP address:   
Port:                        80
RSTP Port:              8554
Username:             <empty>
Password:              <empty>

When I use the rstp url in VLC, it works great: rtsp://
On Surveillance Station, every now and then the connection works, the camera in connected and I can see what it's filming.
After less than a minute the camera is disconnected.

For now it looks like the only times I had a successful connection when I played the stream in VLC as well....
But I can not reproduce that, because it's not working this way every time....

What could be the cause of this ?
I have FreeRadius installed on a Raspberry Pi and would like to know how to enable Accounting.

I have FreeRadius installed on a Raspberry Pi and everything seems to be working fine.

I would like to implement a limit on the number of logins per identity and was hoping someone could share with me how to achieve this.

My only goal is to provide some control of people sharing access credentials among those that shouldn't have them.

I have an analog door opener system in my building, this is the phone which opens the door: http://pasteboard.co/4JgctXi4x.jpg
I have a raspberri pi 3 model b, and a Pcf8591 ADC/DAC converter: http://articulo.mercadolibre.com.ar/MLA-641278286-modulo-pcf8591-conversor-4-ad-da-i2c-arduino-raspberry-_JM

What I want to do, is to connect the wires that goes to the analog door opener phone system into Raspberri PI, so I can hear/speak from a sip softphone installed in the raspberry pi.

Is this possible? I measured the voltage in the mic phone/speaker, it's shown in the picture. Not sure how to proceed with this.

Anyone? Thank you!!
hi everyone,
i'm trying to start a project for a box storage facility, i know thing allready have been done but i would like to do mine :)

the code is not the problem but the electronics yes. The problem is not U = Ri :) but how can i mux the doors sensors ? If some one open the door very fast and then close what would happen ... is important not to miss the change of state ...

So any idea is really welcome

Thanks very much

I have been trying to set up I2C communication between my Raspberry Pi and two arduino pro minis using this tutorial:

I have done all the steps correctly, installed all the required dependencies and modified all the required files, yet "sudo i2cdetect -y 1" does not detect the arduinos. I have two PCF8591 AD/DA converter modules, and when I connect them to the RPi using the SCL and SDA ports, they are detected and shown by "sudo i2cdetect -y 1". But the arduinos do not show up. This is How I have connected the RPi and the Arduino Minis:
RPi                -> Arduino
3.3V               -> Vin
GND               -> GND
SDA(GPIO2)  -> SDA(A4)
SCL(GPIO3)   -> SCL(A5)

I would like to know what is going wrong here. Please suggest.

Have you worked with a Pinbook for surfing or other?

Expert Comment

by:Brandon Lyon
I thought about getting one back when they announced it. I decided to wait for reviews mainly because I was unsure how good (or bad) the screen and keyboard might be. That and other options are getting ridiculously cheap.
LVL 47

Expert Comment

by:Jackie Man
According to its spec, PINEBOOK is similar to a Raspberry Pi 3 and it may be the reason why it can be made so cheaply.
Hi experts.

I have been trying to automate some infrared command through my Raspberry Pi, using the IRDroid-Rpi infrared transceiver (http://www.irdroid.com/2016/10/discover-how-to-turn-raspberry-pi-into-a-infrared-remote-control-using-the-irdroid-rpi/). These commands must be first learned from my Set Top Box infrared remote control using irrecord, but it is a commercial remote.

I have followed the documentation and finally got the IRDroid-Rpi to work. However, it will only work if I learn commands from commercial remote controls like a Samsung TV remote control. My STB remote control is non commercial, and I have not been able to make the IRDroid-Rpi learn and send the commands correctly. Here is my procedure and files:

pi@raspberrypi:~ $ sudo irrecord -f -d /dev/lirc0 lircdtp2.conf

Press RETURN now to start recording.
Found const length: 108301
Please keep on pressing buttons like described above.
Creating config file in raw mode.
Now enter the names for the buttons.

Please enter the name for the next button (press <ENTER> to finish recording)

Now hold down button "KEY_CHANNELUP".
Sorry, something went wrong.
Try again.
Got it.
Signal length is 3

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Tue Apr 25 23:40:23 2017
# contributed by 

Open in new window

Hi EE,

I have attached multiple sensors with my Raspberry Pi. I want to power off couple of those sensors from my mobile. I can now only start / stop sensor data reading from my application, but it do not power off / on those sensors. However I can reboot my Pi which power off all of the attached sensors.

My question is, "is there any way to power on/off selected sensors which are attached with my Pi"?

Dear experts,

I am a novice in raspberry pi. I want to make a door lock which should be unlocked only when it detects presence of myself within a range not for others.

Is it possible? What type of sensors need to be used for that? Any tutorial or advice?

With regards,

Expert Comment

by:Daniella Barion
Outstanding how people can be creative especially when they bring past memories.

Author Comment

by:Brian Matis
"Everything old is new again!" ;-)
I am designing my first Raspberry Pi app .... It tracks a volley ball game ... I have found a lot of motion tracking ... I need a tutorial teaches me how to map the court ... the court has white lines ... when the ball goes beyond the white line an LED will light up ... how can I get raspberry to map the court ?
3D Printing Technology + Raspberry Pie + Arduino + Garden + San Luis Obispo = Farmbot.io


Expert Comment

by:Juana Villa
@JamesBilous I understand your point. However, I don't find very reliable FarmBot's information about sustainability because they state "we will never truly know". Anyway, I believe they should do a study where they compare the CO2 produced for production, transportation, and use of FarmBot vs a traditional household farming.

Expert Comment

by:Juana Villa
@ScottFell, EarhBox looks interesting. I am thinking about having my own garden and I was looking into vertical garden. I will definitely take a look at EarthBox, it might a good option for me.

Raspberry Pi





The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future.

We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.