We help IT Professionals succeed at work.

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.

I just installed linux 2019-09-26-raspbian-buster-lite for Raspberry Pi (headless)

 I need to to run chromium browser on startup. I have installed:

xserver-xorg xinit
unclutter //to hide the cursor/pointer

I have created a file on my home directory called: ~/.xinitrc
xset -dpms
xset s off
xset s noblank

unclutter &
chromium-browser /path/to/your/file.html --window-size=1920,1080 --start-fullscreen --kiosk --incognito --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI --disk-cache-dir=/dev/null  --password-store=basic

Open in new window

I have added startx & to my rc.local

I cant get chromium to start on boot.
Dear Experts,
I am planning to buy Raspberry Pi and turn it into a home firewall. Do you think this is a good idea esp that I would like to also create a captive portal for wifi access and monitor network traffic .etc

If this works what kind do you recommend ? and what are the exact specs that I need?
Thank you
Dear Experts,

I'm currently using ffmpeg on RaspberryPi 4 (4 CPU, 4GB RAM, 16GB SD Card) for encoding bitrate from Camera (experimental environment).

As my first though when running encode process, from 1024Kbps input (Camera) to 512Kbps output (RaspPi4), the CPU consumption/ usage is quite a lot: 220->260% in the total 400% CPU Power (4 CPU).

This is my encode command:
/usr/bin/ffmpeg -re -rtsp_transport tcp -i rtsp://testing:testing123@ -an -c:v libx264 -b:v 512k -strict experimental -flags +global_header -f flv rtmp://

Open in new window

I just wondering if there is anything I could do to reduce this CPU consumption.
And if i keep using that RaspPi with that much CPU, how long till it go down? What I mean is, can we calculate the attenuation, and the time the device can be used with such a load?

Many thanks for reading this Experts.
I am trying to connect my Google AIY Voice Kit V1 to my Raspberry Pi 3B+.  I am at the point of running the assistant_grpc_demo.py but I keep receiving a Type Error: Register() takes from 2 to 3 positional arguments but 4 were given.  I am not sure what I should do to fix this because I am not sure where these arguments are coming from.  Here is what exactly the Error is showing
I am trying to copy a file from a remote host to a raspberry pi I am logging into with Putty and I am having problems getting the correct syntax. Can someone please help?
I want to copy a file from (IP address)/video/Monday.mp4 to the local directory on the Pi I am puttied into which is /usr/lib/rs/imgs/

I am using the following command:>
scp /10.84.X.X/video/Monday.mp4 /usr/lib/rs/imgs/
I have a Raspberry Pi that functions as a print server. It runs CUPS and it has a static IP Address. With Bind I am mapping the server to the domain 'printer.home'. I also have reverse DNS configured for 'printer.home'.

I would like to use this Raspberry Pi to host a local website - a dynamic website that lets users browse records that I have. I would like to give it the domain 'records.home'. I guess it will be no problem creating another A record for the same IP Address and 'records.home'. But what about the reverse record? Do I just omit it for this domain?
rpi3b,  Stretch, used this tutorial for setup:


Except that I added an entry in /etc/dhcpcd.conf to make br0 ip address static (found that in another post):

interface br0
static ip_address=

Open in new window

ifconfig output on rpi:
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::a8b1:dbf2:1ff6:c1d9  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:8b:27:c0  txqueuelen 1000  (Ethernet)
        RX packets 684  bytes 112300 (109.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 302  bytes 33198 (32.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        ether b8:27:eb:8b:27:c0  txqueuelen 1000  (Ethernet)
        RX packets 384  bytes 62532 (61.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 631  bytes 97466 (95.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 260  bytes 22236 (21.7 KiB)
I am a college student without a lot of money so I am turning one of my Raspberry Pis into a router.

I followed these instructions in general to create a Raspberry Pi that plugs directly into my modem and creates a WiFi network.


Some other things I did were to install Fail2Ban and other basic security things when I first launched the Pi.

I have some devices that will need to connect by Ethernet. I have a USB to Ethernet adapter and a Ethernet Switch. I was hoping to have the internet sent through the USB to Ethernet adapter (ETH 0) to my Switch, that can plug into devices that need a wired connection.

I need the internet that goes out of the eth1 device and out of the wlan0 device to be on the same subnet. How do I set this up where they are both on the same subnet?
I have just started setting up my first Raspberry Pi (3).  It was easy to set up initially, but after setting up remote access with VNC, I disconnected the HDMI monitor (actually my TV).  Now when I remote into my home laptop using teamviewer and then remote from there into my pi - this also happens if I just remote directly from my home laptop to the pi - (Still having trouble remoting from anywhere but on the same wifi network) the display is wrong.  Everything is fuzzy, but the worst part is that I not only cannot see the entire screen at once but in new windows I can't see the top of them, so many times I have to guess what they say.  Is there some setting I need to change?

VNC information window occludedRemote into Home machine via teamviewer which then remotes into Pi
Hi Experts,

i do have two raspberry pi, One as publisher and another one as a subscriber. It works on the local area network without internet. Data transmission and receiving, works fine and data storing into MariaDB also works fine. The issue is time. The router run locally without internet connection. If someone switch off or restart router, the system depend on router time which not synchronise online time.

To over this issue, i did add in RTC DC3231 in both raspberry with the following setup.

# Reset the System Clock to UTC if the hardware clock from which it
# was copied by the kernel was in localtime.


#if [ -e /run/systemd/system ] ; then
# exit 0

if [ -e /run/udev/hwclock-set ]; then
    exit 0

if [ -f /etc/default/rcS ] ; then
    . /etc/default/rcS

# These defaults are user-overridable in /etc/default/hwclock
if [ -f /etc/default/hwclock ] ; then
    . /etc/default/hwclock

if [ yes = "$BADYEAR" ] ; then
    /sbin/hwclock --rtc=$dev --systz --badyear
    /sbin/hwclock --rtc=$dev --hctosys --badyear
    /sbin/hwclock --rtc=$dev --systz
    /sbin/hwclock --rtc=$dev --hctosys

# Note 'touch' may not be available in initramfs
> /run/udev/hwclock-set

Open in new window

After i did this , its work on RTC time till someone reset or switch off the router. Upon router up, the raspberry pi picked up router time instead of RTC time. i have to do manually to switch to RTC time.

How i can over this, by saying just depend on RTC time only.
Brand new Raspberry Pi3 does not boot with Raspbian Jessie but will boot with Raspbian Stretch.  
All I get is the red light on the Pi -- not reading the microSD.
Reformatting and burning Stretch on the the same microSD card boots.
Is the Pi3 bad -- what is going on?
I have ExaGear Desktop for Raspberry Pi 3 B+ and use WINE to successfully launch an x86 program.  The x86 program needs to communicate with a device using a USB-serial adapter.  So far I have not figured out how to get the x86 program to recognize the USB-serial adapter.

On a Windows laptop, we install USB Driver: CH341SER.exe and it just works without any troubleshooting or further configuration.  I tried but it wasn't as simple as installing the CH341SER driver software using WINE on the Pi.

The endgame is to create a portable "black box programmer" to change motor control settings on my Bafang powered eBike.

I am trying to put this function in node-red. While testing on python its work on raspberry pi - serial port perfectly. Currently i wanted to try on node-red via raspberry pi too.

#rpi serial connections
#Python app to run a K-30 Sensor
import serial
import time
ser = serial.Serial("/dev/ttyS0",baudrate =9600,timeout = .5)
print " AN-137: Raspberry Pi3 to K-30 Via UART\n"
for i in range(1,21):

 resp = ser.read(7)
 high = ord(resp[3])
 low = ord(resp[4])
 co2 = (high*256) + low
 print "i = ",i, " CO2 = " +str(co2)

Open in new window

I installed dietpi today on a Zero w. (did it on a 3B+ and setup as Hotspot no problem). I wanted to setup the zero as a webcam.
I did this 4 times before I started to install or change the configuration and reboot at least 2 times to make sure all was good.
I changed the setup to US. connected to the Wi-Fi.
Updated to the latest version of dietpi. Update the firmware.
Changed drop bear to ssh.
installed REALVNC.
But when I Install RPI WEB CAM it keeps rebooting and I can't stop it.
As I said after the 3rd time I flashed a fresh image again and rebooted at least 2 times after each change or install until I got to the RPI Web CAM issue.
I get "You're in emergency mode. Enter root password for maintenance or CTRL D.
I tried dietpi for the password and root. CTRL D does nothing but reboot back to the same area.
I'm assuming there is am issue with RPI Web Cam.
And Yes I made sure the power supply is good. I replaced the power supply with one used on my Pi3B+. It's 5.2V, 3amps.
I even tested it with my voltmeter. The issue is this pi Zero W setup works fine with a full version of Raspian and the RPI WEB CAM version I had to manually configure. I switched back to that card and all is fine. I just like the small footprint and ease of setup with DietPi. And it only starts to reboot when I add in the Web Cam distro on DietPi. I even tried some other packages after my 4th attempt, on the card, flashed a new image. In fact I added a few distros to the DietPi setup …
Dear Experts,

I need to FTP from a Raspberry PI installation every 10 minutes a newly generated text file.

How do I do this automatically?
I posted this on raspberrypi.org on July 8,2018 and got 62 views but no replies. I was hoping someone would have some ideas why the pi is dead and maybe how to remove the heatsink/fan module.
I set up a Pi 3B+ as a router back in March 2018. I had same setup on a Pi3B that was running fine for 2 plus years with no issues and only heatsinks. Well I decided to switch the micro card to the 3B+ but of course it did not boot since the OS was not compatible.
So I flashed the newest of Raspbian , installed the code and changes for the router config and the new 3B+ was working fine. I didn't have any overheating issues but decided to put on the new dual fan system from Iuniker made for the 3B+.
This worked for I guess about 2 weeks and I went to upgrade my Pi's last week. (I have many small projects on Pi Zero, pi Zero W, Pi3B and this new Pi3B+) and could not SSH or VNC into the 3B+. So I checked on it and the only light that was on was the Red led and the fan was still running. No green activity light and the ethernet lights were not flashing.
 I found it strange the Pi was not running but the fan was. I unplugged the pi. Waited a minute and plugged the power back in. Only the Red led came on and the fan.
The green light didn't even flash once. So I tried everything. Unplugged the fan. A power supply (I uses 5V with 2.5 or 3 amps) I know is working from another Pi3B. I replaced the card with a fresh image of the OS. Still nothing. I have another Pi3B+. I took the card and …
OK so I want to build a cell phone using a Raspberry Pi.
I'm not sure what module to get. Does anyone know. Some are advertised as GSM/GPRS and some as 4G/LTE.
I know GSM is the way to go but still confused when the description doesn't say they handle 4G/LTE.
And any suggestions on the best module to buy. Don't need blue tooth since the Pi already has that and has Wifi.
P.S. I usually buy my componets from Aliexpress.com. Slow delivery but cheaper price, good quality and selection.
Hello Internet!

I have a few usb miners running on a raspberry pi.

this is what i'd like to achieve.

  1. automatically reboot pi every... say... 4 hours
[list=2]when pi starts up - start screen session and run cmd: sudo /home/pi/git/vthoang/cgminer/cgminer -o stratum+tcp://eu.stratum.slushpool.com:3333 -u zbw123.worker1 -p x --gekko-2pac-freq 150 [/list]

there are a few examples of this being done that i can find online but they all seem to assume a certain level of linux understanding and the truth is i know absolutely nothing about linux. i can follow instructions to the letter but thats about it! :-)

i have bought a book "for dummies" but i'm not finding the answers i need. If it were windows i'd wright a start.bat file i guess.

I downloaded a GUI for crontab which helps you manage scheduled tasks but of course it requires the appropriate files to exist already so that i may run....
Is it possible to install HAProxy on a Raspberry Pi?

I would like to configure HAProxy as Reverse Proxy but would like to do this on a Raspberry Pi if possible.

I am running nginx on a raspberry pi.

I want to run it as a reverse proxy.

I have multiple servers running ssl and one needing forwarding on multiple ports (2195,2196,5228,5229,5230,38880,38881,80,443)

My question is two fold.

Is this even possible? in other words can you forward ports that are non http based ports. For example ports other than 80 8080 443 stuff like that.

I own a domain linked to a dynamic DNS service so I have *.mydomain.com available (* being anything I want it to be)
I need to determine if a Raspberry Pi would be appropriate for a project I am developing. I am trying to create a game (non-commercial) that includes a soft, pillow-like object that will be thrown. I would like to insert a sensor that would detect changes in acceleration, and respond by playing a sound from an internal speaker. The internal apparatus must be self contained and battery operated. I have considered using a Raspberry Pi with a lithium ion battery pack, and an attached speaker and sensor (piezo disk?). When the "pillow" is thrown, the acceleration is detected and a sound is played. When that "pillow" lands, the deceleration is detected and a different sound is played.

Question: Do you think this can be done with a Raspberry Pi, and if so, do you think the Raspberry Pi and components could withstand the acceleration and deceleration associated with being thrown about?

Where do I set the pi to point to a network time server?
So I'm embarking on a new adventure, that of learning Python, and I'm trying to get some insights on...well, the questions I don't know enough to ask. So here's a list of what I'm trying to accomplish and perspectives/suggestions I'm hoping to gather from the EE community:

Your thoughts on:
  1. Embracing an incredibly loose language (I'm not used to that).
  2. Picking up learning techniques and perspectives which:
        a. Lend themselves to writing code for a broad variety of settings (ie. AI development, microcontroller coding (RPi, Arduino), robotics, IOT). I don't want find out later that I've wasted my time (eg. find out that I should have stuck with Python inside Visual Studio instead of going to the trouble of learning Pycharm -- or a similar kind of misstep).
  3. Biggest surprises and gotcha's coming from the .NET world to Python.  
  4. Anything else you can think of that I really need to know to make Python easier to pick up and make me the most versatile Python coder I can be.

By the way, I've not done any Raspberry Pi or Arduino coding yet (or AI stuff) yet. I'm a programmer by trade, just not in those areas.
good day, I am testing serial port communciation on raspberry pi 3 interface with SIM 900 module. The code are attached with error message. Thanks

import serial
import os, time
# Enable Serial Communication
port = serial.Serial("/dev/ttyS0", baudrate=38400, timeout=1)
# Transmitting AT Commands to the Modem
# '\r\n' indicates the Enter key
rcv = port.read(10)
print (rcv)

======================== RESTART: /home/pi/SIM900.py ========================
Traceback (most recent call last):
  File "/home/pi/SIM900.py", line 1, in <module>
    import serial
  File "/home/pi/serial.py", line 5, in <module>
    port = serial.Serial("/dev/ttyS0", baudrate=38400, timeout=1)
AttributeError: module 'serial' has no attribute 'Serial'
Hi, I am monitoring weather status remotely. I am intend to use Huawei E303F -usb dongle to push data. I did try sakis3g, doesn't help auto-connection after restart. please do assist me how to set internet connection automatically after restart and network down.

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.