C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. This tag is for questions about the use of C++ on the Raspberry Pi.

learn more… | top users | synonyms

1
vote
0answers
26 views

How can one have smartphone/tablet -like GUI on a Raspberry Pi? [closed]

I'm planning of developing an application which will run on a Raspberry Pi 2 equipped with a touch-screen, and it should have the look and feel of a smartphone/tablet application. This means ...
3
votes
1answer
52 views

How do I set the input focus to my SDL2 app?

I have a pretty simple program. I'm just trying to acknowledge keyboard/mouse events, but I'm getting no log output (inside my SDL_PollEvent loop). I'm running just basic Raspian (no X). #include ...
1
vote
0answers
42 views

Can't open pwm pin

I know there are many questions about using pwm pins in RPi, but nothing helpfull for me. Here is my code with described error: #include "pch.h" #include "MainPage.xaml.h" using namespace ...
3
votes
2answers
234 views

OpenCV display image: window system doesn't support opengl

I have a project which uses the raspberry pi camera and openCV (also: ROS) to do some movement analysis. However, when I want to display the image (with the openCV API or a ROS node), there's an error ...
1
vote
0answers
59 views

Corrupt JPEG data: extraneous bytes before marker, OpenCV C++, Raspberry Pi

I am trying to run OpenCV application on Raspberry PI. When video capture from an external camera starts (Logitech C270), the messages below are printed out: Corrupt JPEG data: 1 extemporaneous bytes ...
2
votes
1answer
44 views

Making a plug and play setup for devices connecting to the Pi

Hopefully I am asking in the right place, being electrical and code, not sure. In short, I want to create a plug and play setup for different devices(mostly sensors and relays) to be attached. ...
1
vote
0answers
71 views

Trying to render image from grayscale camera with OpenCV in C++. Hangs after a few frames

have a grayscale camera (NOT COLOR) and am trying to render the image. I am running on Raspbian, on a Raspberry Pi 2. I've grabbed some code and bared it to a minimum and made some progress: #include ...
1
vote
0answers
25 views

Why wont my LEDs display when Brightness is turned down using Hzellers library?

I have 4 16x32 Led matrixs chained to display output from my Raspberry pi using Hzellers led matrix library. Link: https://github.com/hzeller/rpi-rgb-led-matrix. I want it to display at 25 percent ...
2
votes
1answer
400 views

Can i run TensorFlow in the Raspberry Pi

I wan't to know if TensorFlow (http://tensorflow.org/) can be used in the Raspberry Pi both the Python API and the C++?
0
votes
1answer
63 views

Wiring Pi interrupt not working

I have a Pi hooked up to the output and reset nodes of an NOR gate S-R latch. For those of you who don't know what that is, basically I have an input in GPIO pin 11 that goes high (3.2V) whenever the ...
0
votes
0answers
526 views

NRF24L01 multiple transmitters, one receiver

Helo! I want to build a system, where multiple transmitters (in my case - Arduino Pro Mini) send data to one RPi 2 over NRF24L01. I'm using C++ library for NRF24 from here. On basis of ...
1
vote
1answer
85 views

I cannot run my cpp file to connect mysql in my raspberry pi card

i have a project in Netbeans to connect to Mysql which is in my Raspberry pi card. so the example code i found is: #include<iostream> #include<mysql/mysql.h> // <editor-fold ...
0
votes
3answers
97 views

Locking a C++ binary to the RPi serial number

I see that each RPi has a serial number that is accessible by reading /proc/cpuinfo. How secure is it for me to tie such serial number to my C++ binary when I want to lock that binary to a single RPi ...
0
votes
1answer
57 views

Importing a C++ code in Python [closed]

If i have a python code for the raspberry pi, will i be able to import C in it? because i have this cooking hacks shield. Link: ...
0
votes
1answer
173 views

./configure Permission denied - Compiling Qt

I'm new to Linux/Rasperry Pi and I was following this tutorial to create a native build of Qt. I got up to the ./configure step. But this gives me the error: bash: ./configure Permission denied ...
1
vote
0answers
108 views

How to include a folder to $PATH variable [closed]

i want to compile a program that use a lot of headers , i must include the /opt/mongo/include to the PATH variable because when trying to compile something like g++ tutorial.cpp -pthread ...
2
votes
2answers
483 views

Cannot install code blocks on raspian

I can't install code block: sources.list got like this: deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free r$ # Uncomment line below then 'apt-get update' to enable ...
0
votes
1answer
64 views

Cannot compile anything on raspberry or works code I compile in another linux

I got simple c++ code, hard part is that i use -std=c++11 flag. I've tried: -Compile on mint codeblocks and then move bin to run it, cannot execute binary file -Compile on gcc 4.6.3 with ...
3
votes
1answer
112 views

Using I2c port as standart GPIO

When I try to use I2c1 SDA pin (GPIO 2 BCM number) via GpioController::OpenPin() func, it compiles OK but it throws an exception HRESULT:0x80070490 Element not found. How should I use I2c pins as any ...
1
vote
1answer
207 views

lens for raspberry pi 2 to expand the field of view

Hi all i'm using raspberry pi 2 with raspbian , i'm working on face and eyes detection using opencv and c++ , i want to expand the field of view for the pi official camera module any suggestions will ...
0
votes
0answers
80 views

How to use floating point support in raspberry pi 2

I'm using raspberry pi 2 with raspbian and I'm working on face and eyes detection using opencv and c++. I want to improve the performance and the execution of my program and I was wondering if I can ...
2
votes
0answers
89 views

Removing a delay function while capturing image using c++ API for picamera gives me completely black jpeg images

I am working on reducing the image capturing time for pi camera module ..and I found out a way of capturing the image within 10 ms using a c++ API This the my main program from where I try to ...
1
vote
0answers
778 views

Raspicam C++ library — captured image requires several grab()s to be properly bright

Note that I am referring to the C++ library, raspicam (http://www.uco.es/investiga/grupos/ava/node/40), not the raspberry pi camera in general. Unfortunately, I don't have the reputation to make a ...
0
votes
0answers
249 views

../nptl/sysdeps/unix/sysv/linux/raise.c error

I have been trying to understand and resolve some error I have been facing in my Raspberry PI 2, running (up-to-date) Raspbian, for a couple of days so far. The problem is, I have a code which can ...
1
vote
1answer
284 views

How to set a fixed Frequency and change duty cycle from 0 to 100 in Raspberry Pi hardware PWM? [duplicate]

I am trying to control a fan using Raspberry Pi. For that I tried to use the PWM pin in raspbery Pi. I am using Qt C++ to control the fan. I installed the wiring Pi and run the Wiring pi using command ...
1
vote
0answers
150 views

Multiple webcams - cannot open in openCV & corrupted image

I've connected four USB webcams via well powered USB hub to RasPi2. I want to use them in openCV. So I setup a simple program, where I opened the cameras using cvCaptureFromCAM, captured a cv::Mat and ...
0
votes
2answers
368 views

Is this possible to read internal CPU temp sensor directly from cpp code?

I am working on the kind of RPi platform to collect some external sensors data or control relays (using the remote tools like web or sms). Next problem I am tring to solve now is to get the direct ...
1
vote
3answers
149 views

Run code on raspberry pi without gui

I am developing an application based project and I am almost done with it. Now I need to covert that to a commercial level product. As it is application specific I want my code to run as soon as I ...
0
votes
1answer
58 views

Infinity cascade IO expand module [closed]

Has anybody used Infinity cascade IO expand module for Raspberry PI? Like the one described here http://www.bananapi.com/index.php/purchase/2-uncategorised/36-banana-pi-io-extend-board, but only red. ...
1
vote
0answers
64 views

Is it safe to read/write register values without Data Memory Barriers?

I'm trying to utilize the BCM2835's BSC/SPI slave peripheral to use the Pi as an effective I2C slave, however I've been running across some segmentation faults when I try to write to the configuration ...
1
vote
2answers
107 views

Not able to fetch register values using Mike M's BCM2835 C code

I'm attempting to utilize the bcm2835_peri_read(uint32_t*) function from Mike M's BCM2835 code, however console-output-debugging indicates I'm continually getting back my address. I'm using g++ on ...
1
vote
1answer
788 views

Process terminate with SIGILL using valgrind

I tried to use valgrind in order to debug some memory corruption, but when I run the program to debug using valgrind it ends reporting Illegal instruction. So I tried with this very simple code : ...
6
votes
1answer
2k views

How to debug without “Program received signal SIGILL” using the 3.18 kernel (3.12 works)?

I tried to debug a program with gdb in Raspbian, but all I get is: Program received signal SIGILL, Illegal instruction. 0xb6fe8acc in ?? () from /lib/ld-linux-armhf.so.3 It doesn't help to set the ...
0
votes
0answers
668 views

SunFounder Raspberry Pi CPU/RAM Display Mini LCD 84*48 PCD8544 Shield For Model B+/B

this display is driving me nuts! i almost tried all available samples/libraries. the only one i got working was this one https://github.com/ronanguilloux/Raspberry-Pi-Utils all the other ones ...
2
votes
1answer
2k views

RPi camera module with opencv [duplicate]

I am trying to use the raspberry pi camera module as the live video feed in my opencv code(c++). However, the pi camera module does not work the same as the USB camera. eg: for USB webcam: ...
4
votes
1answer
301 views

Raspberry Pi Camera - When is it ready for next frame

When using apis like the C++ or raspicam api, you poll the camera with a grab(), or similar, method. When a frame is ready, the method returns. Is there a way of checking if the camera is ready ...
1
vote
0answers
2k views

H264 IP camera stream by Raspberry Pi 2 with OpenCV and GStreamer: Gstreamer unable to start pipeline

I'm trying to get working OpenCV with GStreamer to get IP camera rtsp stream. But it is giving error which is (with opencv-master branch, Gstreamer 1.2.4, Raspbian 3.18.7-v7+: GStreamer Plugin: ...
1
vote
1answer
493 views

Raspberry Pi 2 and its FPU

I've been looking into switching a floating point heavy application from my B+ to a B 2. However, there are some things I don't quite understand about the 2: Is there a FPU for each core or is there ...
0
votes
0answers
260 views

Raspberry Pi for real-time ARtoolkit & Opencv based recognition?

I im supposed to develop a real-time interactive display unit with marker recognition & other CV stuff. I m considering Raspberry Pi for this purpose & I have few questions, it would be great ...
2
votes
1answer
2k views

PiGPIO Library Example for Bit-Banging a UART

The PiGPIO library http://abyz.co.uk/rpi/pigpio/index.html mentions that one of it's features is "software serial links using any user gpio". I take this to mean that you can use it to generate a ...
2
votes
1answer
585 views

How to compile OpenCV software on Raspberry?

I want compile an OpenCV program on Raspberry, the problem is that I didn't figure out how to do so. I installed OpenCV following this guide. $ pkg-config --modversion opencv 2.4.1 OpenCV can be ...
1
vote
0answers
195 views

Raspberry Pi + Qt4 + Opencv cross compile from windows

Hi I want to know how to use opencv in raspberry pi. I have cross compiled qt raspberry from windows and succeed but I cannot add library opencv.
1
vote
1answer
577 views

programming raspberry pi with C/C++ simd instructions [closed]

Is it possible to use C/C++ SIMD instructions in a program and run it on a raspberry pi model b+ ? The raspberry pi has an arm processor, and there's a C/C++ SIMD instructions set for the ARM ...
2
votes
1answer
2k views

Cross Compiling Protobuf for Raspberry Pi

I'm trying to cross compile google Protocol buffers for the Raspberry Pi, so I can cross compile my own software. I've installed protobuf-2.6.0 to the directory ~/ExternalLibs/protobuf-2.6.0, where I ...
3
votes
1answer
2k views

Raspicam C++ API mmal linking

I have installed the raspicam API as instructed here: http://www.uco.es/investiga/grupos/ava/node/40 It appears to be installed correctly. When I compile any programs linking libmmal I get the ...
0
votes
0answers
127 views

Fake bcm2835 library

I'm developing something in C++ that needs to use SPI communication, The fastest way I've seen is using the bcm2835 library for RaspberryPi. I'm doing all the developing process on my pc and cross ...
0
votes
2answers
510 views

Use interrupts in i2C between Ardiono and Raspberry Pi

I'm really new to Raspberry Pi and Arduino programming (+ I2C). Recently I start working on a project where I have to connect an Arduino and a Raspberry Pi to send and receive data from each other. ...
1
vote
1answer
803 views

[C++]Trying to control GPIO pins but I get a Device or Resource busy error. How can I stop Raspbian from hogging the GPIO?

I'm using a class that I found on github to control the GPIO pins. That class can be found here: https://github.com/halherta/RaspberryPi-GPIOClass-v2 From what I understand this class works by ...
1
vote
2answers
5k views

Installing opencv (C++) on Raspberry pi and other misc packages

I've been doing a fair amount of research in regards to installing opencv on to a raspberrian distro, but the problem is that there is far too many different methods to installing it and truth be ...
1
vote
0answers
123 views

Raspberry Pi GPIO Virtualization,Possible?

So i have (planned) a project that utilize the GPIO.From what i know GPIO can be programmed and sending or receiving digital I/O. But since i don't have enough fund (yet) i need to know is there any ...