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
3
votes
0 answers

How Can I Increase Maximum Nesting Level?

I want to make an operating system for the Raspberry Pi, and I need a cross-compiler. I decided to build it on Mac OS X and I'm using the GNU compiler toolchain and the 'arm-none-eabi' target. After building binutils and installing some other…
Jerome Carter
  • 237
  • 1
  • 4
  • 18
3
votes
1 answer

Can't get newline to print with ARM Linux assembly

I started with code from a Raspberry Pi assembly language book. It prints out 15 in binary as so: 00000000000000000000000000001111pi@raspberrypi:$ I wanted to add a newline at the end, so I implemented the _newline: and new: .ascii "\n" portion of…
Marco Lugo
  • 169
  • 2
  • 10
3
votes
2 answers

Displaying Raspberry Pi clock on LCD display

I have a Raspberry Pi running an LCD display. I found the Python script below which displays the time on the display, but I notice there's a delay of almost a second between the Pi's time and the LCD. I tried removing the last line of the code…
David
  • 107
  • 1
  • 7
3
votes
1 answer

GStreamer pipeline wont preroll

Hi guys im trying to setup Gstreamer between my Pi and a windows computer. My comands are: Pi: ~ raspivid -n -w 1280 -h 720 -b 1000000 -fps 15 -t 0 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=[IP]…
ferret249
  • 53
  • 1
  • 10
3
votes
1 answer

Using imshow in opencv without running X

I've got an application with a Raspberry Pi running Debian that is pretty performance demanding and I am trying to avoid starting X when booting and jumping directly into the program. This works fine, but if I would like to use the 'imshow'…
DrTarr
  • 922
  • 2
  • 15
  • 34
3
votes
1 answer

Python 3 non-blocking read with pySerial (Cannot get pySerial's "in_waiting" property to work)

For the life of me, I cannot figure out how to do a non-blocking serial read in Python 3 using my Raspberry Pi. Here's my code: import serial #for pySerial ser = serial.Serial('/dev/ttyUSB0', 9600) #open serial port print ('serial port = ' +…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
3
votes
1 answer

How to run raspbian jessie on emulator?

i have been working on raspberry pi and i have been able to install and configure raspbian jessie on my raspbian pi zero but i am not able to find any raspbian jessie emulator to run on my pc. Can anybody help me out?
Azher Aleem
  • 738
  • 6
  • 15
3
votes
1 answer

Pillow Attribute Error

I want to set up an imagestream from my rbpi to my server. So I would like to setup a network stream discripted in the http://picamera.readthedocs.io/en/release-1.12/recipes1.html#streaming-capture. This worked well, but now I want to save the…
Meitoasty
  • 77
  • 1
  • 7
3
votes
0 answers

Making Raspberry Pi Windows IoT into a router?

There are a number of resources explaining how to turn a Raspberry Pi into a router, for…
Afshin
  • 487
  • 6
  • 22
3
votes
0 answers

Representing a number with one byte in python?

A byte of data can represent values from o to 255. However, when I declare a byte objct in python and give it an integer less than 255, the size is still…
Adi
  • 75
  • 1
  • 9
3
votes
1 answer

Configuring QT Creator on Windows 7 (Raspberry pi is target)

So I will start off by saying that I do NOT want know how to setup or run QT on the pi. I am specifically trying to setup Qt Creator 4.0.3 (Based on Qt 5.7.0 (MSVC 2013, 32 bit)) to write and compile C++ and the run it on the Raspberry pi 2. I…
joecoder
  • 31
  • 4
3
votes
2 answers

Can't connect to MySQL database using Coda 2

I am hosting a website on a Raspberry Pi that has a MySQL server running. Using Terminal on Mac, I can remotely ssh into the RPi and then connect to the server. I am trying to remotely connect to the server using Coda 2, but it doesn't seem to be…
user2397282
  • 3,798
  • 15
  • 48
  • 94
3
votes
2 answers

How to change a space when a button is pressed with kivy?

I am trying create a GUI by implementing the template of the ComicCreator GUI sample as a template for my own project. The code is easy to follow, but I would like to be able to reconfigure the drawingspace.kv, each time a button is pushed, say for…
3kstc
  • 1,871
  • 3
  • 29
  • 53
3
votes
1 answer

Raspberry Pi 2, how to disable device_tree to enable SPI?

I have a Raspberry Pi 2, Model B, and I'd like to use the SPI to talk to another Pi (for later using it for more SPI-devices). I'd also like to use WiringPi for C-coding my program. I thought I would ensure I had everything I needed, so i ran a full…
Rasmus Bækgaard
  • 737
  • 2
  • 11
  • 27
3
votes
0 answers

RETROPIE – Nintendo 64 + Keyboard troubles

I set keyboard inputs for Retropie at its Configuring window.(the keyboard will be the controller). It worked for SNES. However, when I tried the N64 emulator, no key works (except the 'Esc' key). I would like the keyboard inputs that I set at…
1 2 3
99
100