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

0
votes
0answers
29 views

Accessing Raspberry Pi 3's Bluetooth via Cpp [closed]

Which library can I use to access the bluetooth from a C++ code. I want to connect my raspberry from my computer and send,receive information from a cpp code once I run the executable.
0
votes
1answer
21 views

Raspberry PI Uart: pi to pi communication (B+, B2, CMIO)

Good day I am currently setting up UART communications for two Raspi's using wiring Pi's uart library. I have three Raspberry Pi's (B+, Compute Module IO board, B2). I have been able to make ...
1
vote
1answer
32 views

Raspberry PI multiple high frequency pinout

I'm controlling 4 stepper motors with my raspberry PI, and I need to step them in a control loop cycling at a specified rate as low as once every 40 microseconds. The motors won't always be stepped ...
0
votes
1answer
39 views

Is it possible to fix the “cannot find -lgcc” and “cannot find -lgcc_s” error messages when using arm-linux-gnueabihf-g++ as a linker?

I get the following error messages: ./Downloads/tmp/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux‌​-gnueabihf/bin/ld: cannot find -lgcc_s and ...
0
votes
1answer
40 views

Video presentation on RPi3 with SDL2

I had successfully followed the LazyFoo tutorials to basic shape/image rendering and am getting over 30 FPS on my RPi3. My next stage is to get video file rendering working. I had used the following ...
0
votes
2answers
156 views

Compile and run Qt5 webengine on rpi2/3

I have followed the tuto here : https://wiki.qt.io/RaspberryPi2EGLFS to cross-compile Qt 5.6 for my pi 2. But I did not used the git repo, I have downloaded the source tarball. I checked by running ...
0
votes
0answers
21 views

Most efficient way to play music with floppy drives

I've been wanting to use my RPi as a controller for a floppy drive symphony for a long time. However, progress is going very slowly because I keep running into issues. Whenever I try to use more than ...
0
votes
0answers
21 views

serial port ttyUSB0 doesn't connect seem to receive/transmit sometimes

I've got a few Pis that communicate with each other using Serial Communication and Xbees. The problem I'm having is sometimes the serial data does not get sent/received when I first start the ...
0
votes
0answers
30 views

Access point Raspberry acting as proxy

Following this tutorial I set up my Raspberry Pi 2 as a working access point. It is offering, yet, a best effort internet: it doesn't give priority to some traffic over another (streaming over SMTP, ...
0
votes
1answer
66 views

raspberry camera module feed is slow with Opencv using v4l2

i am trying to use Opencv to video capture from the raspi cam to do some operation on it, the problem is i am using v4l2 to capture the video and it is so slow (10 sec delay and 2 fps). what i have ...
0
votes
1answer
54 views

raspberry camera module cannot be opened with device ID

i am trying to run this face recognition code from here! i successfully installed OpenCV on the raspberry, and i used the code before on windows. but here i have the problem with the raspberry ...
0
votes
1answer
102 views

Qt 5.5 application using usb device as keyboard and hidraw

I have a specially designed board connected via USB to my Raspberry Pi 3. This board provides a keyboard interface. But it also provides additional USB "reports" that can be retrieved - for sensor ...
0
votes
1answer
59 views

execute cpp code written with visual studio on the Raspberry Pi 2

I am new to the Raspberry Pi and opencv lib, I have spent some time learning opencv up until I finished my first program written in c++ . Now I want to compile and execute the same c++ file on the Pi ...
0
votes
1answer
152 views

opencv raspicam configuration C++ Example

I need any help with this error pi@raspberrypi ~/opencam_test $ sudo g++ simpletest_raspicam_cv.cpp -o simpletest_raspicam_cv -I/usr/local/include/ -lraspicam -lraspicam_cv -lmmal -lmmal_core ...
0
votes
1answer
50 views

pigpio: PWM range for quadcopter ESC(electronic speed controller) command

Good day, I am currently working on a quadcopter project and am currently using the pigpio library for the PWM used to command the ESC's of the quadcopter motors. Will increasing the range of the ...
-1
votes
1answer
54 views

Geting errors with c++ using opencv on raspberry Pi

For Face Recognition using raspberry Pi with opencv. I have tried using C++ code which is failing to include the opencv files. Please comment any python code for face recognition using opencv.
0
votes
0answers
11 views

Error to compile libfacerec-0.04 using cmake [duplicate]

I'm trying to compile libfacerec-0.04 for Face Recognition from here and I am following this site for face recognition. When I unzip and try to compile the API libfacerec-0.04 using sudo cmake . ...
0
votes
2answers
43 views

SSH into a running instance of an application

I have developed a line-following vision application for the raspberry pi, and I want it to run always, as the Pi is connected to a robot. I know how to edit the rc.local file so that the application ...
0
votes
0answers
27 views

I2cDevice for unmanaged C++ projects

So far I was coding Universal apps with I2c/SPI support or native unmanaged projects which can run on IoT core, but I can't see a way to implement I2c with them. So my question is: Is this possible? ...
0
votes
2answers
45 views

How do you compile a c++ programs to use Hard Float in Raspberry using Debian OS?

How do you compile a c++ program to use Hard Float registers? It is said in the FAQ section of Raspbian that the following tags are the only ones required when compiling. -march=armv6 -mfpu=vfp ...
1
vote
1answer
131 views

Raspicam images are way too dark when raspistill is not used

I am trying to grab continuous images using Raspicam 1.3v on Raspberry Pi 2. I use c++ and the following library for interface: http://www.uco.es/investiga/grupos/ava/node/40 When I use raspistill, ...
2
votes
1answer
80 views

Does have Raspberry Pi enough performance for Computer vision process in c++

I will write a computer vision application in C++. I need to choose a hardware platform. I cannot use a PC (laptop, desktop, etc). I will process a video that I take a camera. Can I use a Raspberry ...
2
votes
1answer
19 views

Raspistill: use existing photo to define shutterspeed and iso of new photo

I have found that using raspistill with the --timeout option to significantly reduce the time before the camera takes a photo doesn't give the camera enough time to choose good exposure parameters ...
2
votes
1answer
64 views

Which Pi can emulate a custom USB Client?

Ok here is my problem: I'm making a product where I need to plug as a receipt printer and then I need to compute some data, read an NFC tag and send the data to a web server each time a receipt is ...
1
vote
1answer
105 views

Remote develeopment with Netbeans: debugger goes to disasembly

I managed to set up remote development on RPi with Netbeans 8.0.2 over direct connection to my laptop. my simple program compiled, run and debugged. #include <iostream> using namespace std; ...
1
vote
0answers
57 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
99 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
116 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
1k 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
167 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
54 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
132 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
49 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
2answers
1k views

Can I run TensorFlow on the Raspberry Pi?

I wan't to know if TensorFlow (http://tensorflow.org/) can be used on the Raspberry Pi both the Python API and the C++?
0
votes
1answer
88 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 ...
1
vote
1answer
1k 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
155 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
162 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
97 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
324 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
266 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
1k 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
80 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
126 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
369 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
82 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
1answer
133 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 ...
3
votes
0answers
2k 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
334 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
489 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 ...