Questions tagged [raspberry-pi]

The Raspberry Pi is a small, inexpensive ARM-based PC device. PROGRAMMING QUESTIONS ONLY. Questions about using it should be asked on https://raspberrypi.stackexchange.com/

Raspberry Pi.SE

There is a Stack Exchange site dedicated to the Raspberry Pi. If your question is about using the Raspberry Pi, it should be asked there. However, general programming questions, which you happen to encounter on the Raspberry Pi are appropriate on Stack Overflow.


The Raspberry Pi is a low cost, credit card sized, ARMv6 instruction set based PC device developed by the Raspberry Pi foundation.

The Raspberry Pi currently has twelve models, Model A , Model B , Model A+, Model B+, Model 2 B, Zero, Zero W, Model 3 A+, Model 3 B, Model 3B+ and Model 4B with 1, 2, 4 or 8 GB RAM. Model A was the first model of the Pi to be released (in February 2012), at an average price of $25. Model B was a higher spec variant (first released in June 2012) at an average price of $35. Currently, among the twelve models, Model 4B 8GB has the highest spec (released in June 2019) at an average price of $75.

Only most notable specs listed

Model A consists of:

  • ARM11 CPU
  • OpenGL ES 2.0 capable GPU
  • 256 MB RAM (shared with GPU)
  • HDMI and RCA video
  • 1x USB 2.0 port
  • 3.5 mm audio jack
  • SD card slot

Model B consists of:

  • ARM11 CPU
  • OpenGL ES 2.0 capable GPU
  • 512 MB RAM (shared with GPU)
  • HDMI and RCA video
  • 2x USB 2.0 port
  • 3.5 mm audio jack
  • Ethernet port
  • SD card slot

Model A+ consists of:

  • ARM11 CPU
  • OpenGL ES 2.0 capable GPU
  • 256 MB RAM (shared with GPU)
  • HDMI and composite video via 3.5mm TRRS jack (shared with audio)
  • 1x USB 2.0 port
  • 3.5 mm audio jack
  • MicroSD card slot

Model B+ consists of:

  • ARM11 CPU
  • OpenGL ES 2.0 capable GPU
  • 512 MB RAM (shared with GPU)
  • HDMI and composite video via 3.5mm TRRS jack (shared with audio)
  • 4x USB 2.0 port
  • 3.5 mm audio jack
  • Ethernet port
  • MicroSD card slot

Model 2 B consists of:

  • 4 USB ports
  • 40 GPIO pins
  • Full HDMI port
  • Ethernet port
  • Combined 3.5mm audio jack and composite video
  • Camera interface (CSI)
  • Display interface (DSI)
  • Micro SD card slot
  • VideoCore IV 3D graphics core
  • A 900MHz quad-core ARM Cortex-A7 CPU
  • 1GB RAM

Model Zero consists of:

  • 1GHz single-core CPU
  • 512MB RAM
  • Mini HDMI and USB

Model Zero W additionally consists of:

  • 802.11b/g/n wireless LAN
  • Bluetooth 4.1 (BLE)

Model 3 A+ consists of:

  • 1.4GHz 64-bit Cortex-A53 (ARMv8) CPU
  • 512MB LPDDR2 SDRAM
  • 2.4GHz / 5GHz 802.11.b/g/n/ac wireless LAN
  • Bluetooth 4.2 (BLE)
  • 1x USB 2.0

Model 3 B consists of:

  • 1.2GHz 64-bit quad-core (ARMv8) CPU
  • 1GB RAM
  • 802.11n Wireless LAN
  • Bluetooth 4.1 (BLE)
  • 4x USB 2.0

Model 3 B+ consists of:

  • 1.4GHz 64-bit Cortex-A53 (ARMv8) CPU
  • 1GB LPDDR2 SDRAM
  • Gigabit Ethernet over USB 2.0 (maximum throughput 300 Mbps)
  • 2.4GHz / 5GHz 802.11.b/g/n/ac Wireless LAN
  • Bluetooth 4.2 (BLE)
  • 4x USB 2.0

Model 4 B consists of:

  • 1.5GHz 64-bit quad-core Cortex-A72 ARM v8 CPU
  • 1GB, 2GB, 4GB or 8GB LPDDR4-3200 SDRAM (depending on model)
  • Gigabit Ethernet
  • 2.4 / 5GHz 802.11ac Wireless LAN
  • Bluetooth 5.0 BLE
  • 2x USB 2.0, 2x USB 3.0
  • 2x micro HDMI ports (both support up to 4kp60)

The most recently released and presently leading the features and power columns is the Model 400. This model varies a bit from previous ones in that it comes packed within a keyboard containing the ports, etc. You may check out the official page and find more information.

Model 400

  • Broadcom BCM2711 quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8GHz
  • 4GB LPDDR4-3200
  • Dual-band (2.4GHz and 5.0GHz) IEEE 802.11b/g/n/ac wireless LAN
  • Bluetooth 5.0, BLE
  • Gigabit Ethernet
  • 2 × USB 3.0 and 1 × USB 2.0 ports
  • Horizontal 40-pin GPIO header
  • 2 × micro HDMI ports (supports up to 4Kp60)
  • H.265 (4Kp60 decode); H.264 (1080p60 decode, 1080p30 encode); OpenGL ES 3.0 graphics
  • MicroSD card slot for operating system and data storage
  • 78- or 79-key compact keyboard (depending on regional variant)
  • 5V DC via USB connector
  • Operating temperature: 0°C to +50°C ambient
  • Maximum dimensions 286 mm × 122 mm × 23 mm

The Raspberry Pi has no on-board operating system and requires an OS to be loaded onto an SD card, which it then boots from.

Common OS images (Official download page)

  • NOOBS (New Out Of Box Software - ideal for first time users)
  • Raspberry Pi OS, previously called Raspbian (Buster - suitable for beginners)
  • Ubuntu (Core or classic)
  • Soft-Float Debian
  • Pidora
  • Kali Linux - IT security and penetration testing

Related tags:

  • The tag with tag wiki, especially for assembly programming on the Raspberry Pi
  • Especially with tag wiki for programming on 64-bit systems

Further links:

Further information on the processors and their instruction set can be found in the arm and arm64 tag wikis.

17501 questions
42
votes
7 answers

How to disable sleeping on Raspberry pi

I am working on a project similar to the one at http://www.instructables.com/id/Raspberry-Pi-Wall-Mounted-Google-Calendar/?ALLSTEPS Similarly, I need my pi to stay on constantly. I have the regular Raspbian OS installed and I am using Iceweasel…
Javed Ali
  • 1,510
  • 2
  • 12
  • 18
42
votes
4 answers

How to run a C program with no OS on the Raspberry Pi?

I'd like to experiment using the Raspberry Pi for some different low level embedded applications. The only problem is that, unlike the AVR and PIC microcontroller boards available, Raspberry Pi typically runs an OS (like Raspbian) that distributes…
watswat5
  • 671
  • 1
  • 7
  • 19
41
votes
4 answers

MonoDevelop ARMv6 on Raspberry Pi

Will MonoDevelop compile to the ARMv6, mainly so I can get it running on my Raspberry Pi? I've noted that Debian can run on the Raspberry Pi and Debian has a set of drivers for Mono. So does this mean we'll be able to develop in Mono?
Coppermill
  • 6,676
  • 14
  • 67
  • 92
41
votes
8 answers

How to run Flask Server in the background

I have set up Flask on my Rapsberry Pi and I am using it for the sole purpose of acting as a server for an xml file which I created with a Python script to pass data to an iPad app (iRule). My RPI is set up as headless and my access is with Windows…
Gary
  • 571
  • 1
  • 4
  • 9
41
votes
6 answers

Is it possible to run .NET Core on Raspberry PI?

I've heard that .NET Core could run on Linux and Mac as well. I am currently using Mono on Raspberry PI. Is it possible or will it be possible to run .NET Core on Raspberry PI?
TN.
  • 18,874
  • 30
  • 99
  • 157
41
votes
5 answers

Raspberry Pi with Kinect

Could anyone get the camera data from the Kinect using a Raspberry Pi ? We would like to make a wireless Kinect connecting it using Ethernet or WiFi. Otherwise, let me know if you have a working alternative.
Cyril
  • 415
  • 1
  • 4
  • 8
39
votes
5 answers

Raspberry Pi SSH Access Denied

I am trying to log into my Raspberry Pi using PuTTY from Windows. However, whenever I try to log into my Raspberry Pi using the default username and password (pi* and raspberry) it says Access Denied. I have the wpa_supplicant.conf file and ssh file…
Alan Shiah
  • 907
  • 1
  • 6
  • 19
39
votes
3 answers

Can RaspberryPi with BLE Dongle detect iBeacons?

I bought a developer kit from Radius Networks that includes a ioGear GBU521 BLE 4.0 dongle and a Raspberry Pi. I also bought one of their RadBeacon iBeacons. They both work as advertised, but I was kind of surprised by what I got. I had assumed…
user1153660
  • 413
  • 1
  • 5
  • 8
37
votes
1 answer

Calling app from subprocess.call with arguments

I'm a beginner in Python, and I've been trying to call a command line app, but it fails: >>> import subprocess as s >>> s.call("gpio -g read 17") Traceback (most recent call last): File "", line 1, in File…
Mark Ingram
  • 71,849
  • 51
  • 176
  • 230
35
votes
2 answers

Run shell script with node.js (childProcess)

I want to run a shell script on my node.js server, but nothing happened... childProcess.exec('~/./play.sh /media/external/' + req.params.movie, function() {}); //not working Another childProcess works perfect, but the process above won't.…
Ralf
  • 836
  • 1
  • 9
  • 32
34
votes
2 answers

Docker-compose: /usr/local/bin/docker-compose : line 1: Not: command not found

i'm trying to install Docker-compose on my Raspberry Pi 3+ which installed Raspbian buster. I followed instruction on docker.com. After I entered command : sudo curl -L…
simpsons3
  • 880
  • 1
  • 11
  • 29
33
votes
2 answers

Why does GCC not seem to have the filesystem standard library?

i'm facing a problem with filesystem library, it should be included in c++17 compiler, after 2 days i tried to install gcc-7.0.2 in raspberry pi but it didn't work, it couldn't recognize the command gcc-7 or g++-7 or even -std=c++17 so i had to…
shadow
  • 767
  • 3
  • 8
  • 20
33
votes
6 answers

Linux .NET remote debugging from Visual Studio

I would like to remote debug a C# console application running on Linux from Visual Studio. Here's what I found so far: http://www.mono-project.com/Debugger The Mono runtime implements a debugging interface that allows debuggers and IDEs to debug…
Anlo
  • 3,228
  • 4
  • 26
  • 33
32
votes
4 answers

python text to speech using pyttsx

I want to use my raspberry pi to announce some text. i have installed pyttsx but not able to use it.i am using python2.7 my program: import pyttsx engine= pyttsx.init() engine.setProperty('rate',70) voices=engine.getProperty('voices') for voice in…
user007
  • 451
  • 2
  • 5
  • 10
32
votes
5 answers

getting error on Supervison on supervisorctl ERROR (no such process)

I've seen this question asked before, but none of the solutions have worked for me. I'm having problems using the supervisor on my rpi b+. Every time I try to run my start my process, I get an error saying: pi@raspberrypi ~ $ sudo supervisorctl…
Kmat
  • 401
  • 1
  • 6
  • 14