We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [c++]

For questions pertaining to compiling c++ programs on the Raspberry Pi.

Filter by
Sorted by
Tagged with
2
votes
0answers
20 views

g++ and gdb debugging does not provide full backtrace

I never experienced this behaviour on classic desktop platform thus I'm asking here. The question is how to correctly debug C++ application (g++ build) using GDB on Raspberry Pi? When my application ...
0
votes
1answer
32 views

C++ Long Double or equivalent on ARM64

I'm having a hard time getting a straight answer about long double precision on ARM64 architecture. I'm engineering a scientific machine requiring extreme precision, and the driver, which I will write ...
0
votes
0answers
37 views

Running a visual studio 2019 c++ code with cryptopp library on raspberrypi for performance analysis

I've written a code in visual studio 2019 in c++ language and it involves various cryptographic mechanisms. It also includes Elliptic curve library named cryptopp. I want to simulate and test the ...
0
votes
1answer
59 views

Running Visual Studio code on raspberry pi

Can we run a program written in visual studio c++ (windows), with or without the rasp-bian OS? Any guidance about how it will be done? What software will be needed?
0
votes
0answers
21 views

How to link gmp to g++ on Raspberry?

I attempt to compile a small code that uses bitcoin.hpp with the line g++ -o file file.cpp $(pkg-config --cflags --libs libbitcoin) and get an error related to gmp. /usr/bin/ld: /home/pi/libbitcoin/...
1
vote
0answers
107 views

Cross-compiling for Raspberry Pi I fails using Linaro 7.4.1 toolchain

I downloaded the latest Linaro toolchain (https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/) to cross-compile C++ code for different Raspberry Pis which running a ...
0
votes
1answer
49 views

How to use at the same time 2 hardware pwm in wiringpi

I need help to configure 2 hardware PWM channels. I am developing device, and sometimes I will need active 2 PWM channels with different frequencies (frequencies is low: 410 and 580 Hz).I'm writing ...
0
votes
0answers
20 views

Looking for suggestions digital price cards

Hello fellow raspberry pi users I am looking for suggestions in getting a raspberry pi 3 to create digital pricing for our locations. The idea is to have it pull the price for products from a google ...
2
votes
1answer
128 views

see output from c++ program which was started by rc.local

is there a possibility to see output (f.e. std cout << ...) from my program which was started from rc.local script when i am logged into my Rpi via SSH?
1
vote
1answer
99 views

Programming MLX90640 to display what I want [closed]

Yay. Got my MLX90640 working and boy it works great. However, the ambient temp of around 20C keeps showing as a green background and i would like it to be blue or even grey. Has anyone attempted to ...
3
votes
2answers
211 views

C++ problem: boost/asio.hpp non existing

I'm using Raspberry Pi 3B+. I'm trying to compile a rather massive C++ package given to me from somewhere else. However make fails compiling. It cannot find boost/asio.hpp. I simplified the problem ...
2
votes
1answer
123 views

outb() equivalent in Python for GPIO

I am a very beginner on programming and raspberry usage, tho I think I learn fast. I am trying to convert an old program (not mine) that was written for Linux on C++ for communication with a printer ...
0
votes
1answer
117 views

sqlite3 cannot find -lsqlite3

I'm using raspberry pi 2B with raspbian lite. I'm trying to add an sqlite3 library on my C++ program. Without starting adding any piece of code, using the flag -lsqlite3 I get the error. src/main....
1
vote
1answer
50 views

C++ Qt5 / OpenGL issue when compiling a program that uses glGetTexImage()

I am on latest Raspian release with latest Qt5 pkgs and related OpenGL + MESA pkgs installed from the standard Raspian repo. I am attempting to build a C++ program (not mine) that relies on Qt5 and ...
1
vote
0answers
26 views

I want to know about printing NFC tag time out

I used libnfc and nfc-poll command. I get a UID and something else can I get a information about NFC tag time and print it out?
1
vote
1answer
103 views

Qt Userland raspistill/racpicam integration - Unable to find an X11 visual which matches EGL config

I am developing simple gui app for a client on Raspberry pi running Ubuntu(Mate) 16.04 using Qt 5.5.1 and OpenCV for some face recognition (all C++) using 5MP pi camera. The framerate/CPU usage ...
-2
votes
1answer
55 views

Ensure/lock a program to run on Raspberry Pi only?

Are there any characteristics/ lock available so that the program would fail to run on any other device except Raspberry Pi. I have thought about using GPIO with external circuits but would prefer ...
1
vote
1answer
99 views

SPI sending function

I'm currently reworking a project from someone who graduated a few years back and I'm supposed to change the function of his work for a bit. I have trouble understanding these few lines from SPI ...
0
votes
0answers
45 views

HD44780 Display and wiringPi

I have wired a display to the raspberry pi, which uses an HD44780 controller. The wiring was verified by using this python script: https://www.raspberrypi-spy.co.uk/2012/08/20x4-lcd-module-control-...
0
votes
1answer
278 views

Several serial ports with c++

Trying to work on Raspberry Pi 3, Model B V1.2 with several serial ports with C++ code. Previously I should say that when I use only one ports everything works like a charm, so ports configuration is ...
0
votes
2answers
85 views

Is it possible to compile and Arduino Sketch into a C++ file to run on Raspberry Pi?

Since Arduino uses C++ for its programming with libraries that are specific to Arduino, is it possible to compile your sketch and have it run as a C++ program on a Raspberry Pi? I saw there was ...
0
votes
0answers
89 views

Raspberry Pi 3 Model B - Windows IOT - UWP C++ - Servo control?

So currently, I have already developed a uwp application in Visual C++. I ordered a raspberry pi 3 model b from Amazon and its expected to arrive on Wednesday. In my program, I have a button, when I ...
0
votes
0answers
16 views

Is it possible to use Adafruit's Arduino libraries for my Raspberry Pi alone? [duplicate]

I have a MPR121 touch sensor, LSM303DLHC accelerometer & magnetometer, & SSD1306 128x64 display, and I don't have a Arduino.
2
votes
1answer
714 views

Problem with gcc/g++ versions

I'm currently setting up Homebridge to run on my Pi using this installation guide. I have run into a problem regarding the C++ compiler section; I understand that this part of the guide is out of ...
1
vote
0answers
119 views

Any DS3231 RTC C++ experts here?

I'm trying to program a DS3231 using a translated C++ Arduino Mega 2560 library. Translated means all the Arduino I2C methods have been changed over to use the BCM2835 GPIO/SPI/[I2C] library. The RTC ...
0
votes
1answer
60 views

Can't trigger GPIO control via executable run through php's exec function

/var/www/html/index.php <?php exec("./on"); shell_exec("/var/www/html/on"); on.cpp #include <string> #include <getopt.h> #include <cstdlib> #include <sstream> #include &...
0
votes
0answers
40 views

Generating multiple square waves simultaneously

I'm trying to generate 2 simultaneous square waves (50% duty cycle PWM signals) to step two stepper motors (STEP signal to separate motor drivers) on the Raspberry Pi Zero W. I use GPIO12 and GPIO19, ...
0
votes
1answer
75 views

HC-SR04 Sensor stops reading

I am working on HC-SR04 ultrasonic sensor for my project. I made the connections given here. Here is my code int main(){ int count = 0; if (gpioInitialise() < 0) { qDebug() << "...
-1
votes
1answer
186 views

Data logging in Raspberry Pi

I have made a C++ program which communicates with an RFM95 LoRa module and listens to messages from a various transmitters nearby. Those transmitters transmits sensors' data like temperature, humidity,...
1
vote
1answer
381 views

What is the pixel format for Raspberry Pi framebuffer

Good afternoon, I'm trying to programmatically display an image to a 3.5 inch TFT display mounted on /dev/fb1 using the following code: Using trial and error I determined the pixel width to be 16 ...
5
votes
0answers
132 views

Raspberry as I2C Slave, how to slow down transfer rate?

I have had minor success using the PIGPIO library and interfacing the Pi as an I2C Slave (Using GPIO Pins 18 and 19 as SDA and SCL) with a Campbell CR1000X Datalogger I am encountering a problem ...
2
votes
1answer
128 views

memory trouble compiling c++ on the rpi3b+

The compiler works great, there are 4 cores available, but if I use all 4 of them, invariably the memory runs out. Aside from uninstalling as many services as possible, compiling with a cross-compiler ...
2
votes
1answer
350 views

SPI only returning zeros with Raspbian (It works with IoT core)

I am using this ADC connected to the channel 0 of my Pi3 board for reading values from a sensor. In IoT core, I was using a very simple code for testing the my device, and it worked fine. The C# code ...
-1
votes
1answer
707 views

Showing an image on HDMI (DSI, HDMI screens connected)

I have a Raspberry Pi 3B device connected to a LCD '7 (7 inches LCD, its a touch screen I believe that's called DSI not sure) and also a HDMI screen. By default Raspbian considers the LCD as the ...
1
vote
1answer
457 views

Files not saving even with flush

I have a program that is intended to log the incoming data from a sensor. The sensor is reporting at 200 hz and needs to be logged at least that fast so there are no lapses in data. It is important ...
1
vote
2answers
435 views

Raspberry pi GPIO pinout diagrams diferent than BCM and BOARD?

I know what BCM and BOARD mean when you set up the pi to work with the GPIO coding in python. Recently a had a look in some code for raspberry written in c++ and everything is okay but how the code ...
0
votes
0answers
714 views

Invalid string offset errors when compiling RaspiCam C++ Library

I am getting these warnings with the RaspiCam C++ library, and wondering if anyone has a fix for them? My program is also crashing and I'm wondering if it's related. /usr/bin/ld: /usr/local/lib/...
1
vote
1answer
1k views

Access RPi's camera stream in OpenCV C++ (Qt)

I've setup my Raspberry pi 3 B with uv4l and have access to the video stream on http://(raspberry-IP):8080/stream address. Now, I have Qt5(C++) and OpenCV installed on my main computer. How can I ...
0
votes
2answers
500 views

DAC MCP4725 not working with raspberry

I am using raspberry pi 3. I am trying to run the AC induction motor for that I want an analog pin. In raspberry pi model doesn't have an analog pin. All pins are digital IO pins. So I have tried MCP ...
0
votes
1answer
439 views

Frequency bands from FFT (audio visualizer)

I'm currently working on an audio visualizer running on a 64x64 LED matrix, and some tests showed that the Pi1 is totally capable of doing that. I'm receiving raw PCM audio data using PortAudio, and I ...
0
votes
1answer
161 views

pigpio, update xfer.txBuf

Question refactored: Im currently struggling to understand how to update the transmit FIFO of the bsc_xfer. For reference: Slave side: int main(int argc, char** argv) { int GPIO = gpioInitialise();...
0
votes
1answer
978 views

PIGPIO wiring, basic i2c slave questions

I'm toying with pigpio and I can't find some informations: 1) I'm currently using a arduino uno to send bytes (as master) to a Rpi3 as slave, I currently use BCM2 as SDA (A4 on Uno) and BCM3 as SDL(...
1
vote
0answers
214 views

PortAudio is not listing my USB audio card

I'm having a weird issue currently, which I'm not too sure how to resolve as of right now. On my Raspberry Pi 1, there's a USB sound card connected, where I need the microphone input from (the pi is ...
2
votes
2answers
466 views

How to start an app without windows manager

Hi sorry for the answer I´m very inexperienced in Raspbian, just started to use the pi a few weeks ago, I need to start an app developed with Qt in C++, it has a GUI, this app has strict timing ...
1
vote
0answers
84 views

Installing a higiher version of GCC on Wheezy that doesn't rely on a newer glibc [closed]

We have software that we distributed to a bunch of Pis that have Raspian Wheezy. Recently, we've added in a bit of code that uses C++ standards that aren't integrated until >=gcc-4.8. If I compile on ...
3
votes
1answer
2k views

Pi 3B+ jack audio inputs and low latency

Related: Raspberry Pi 3 audio input? I need to be able to input several jack microphones (minimum 2, more could prove useful) to my raspberry, to do some audio processing (between all inputs), and ...
1
vote
0answers
602 views

Qt5.10.1 Cross-Compiled to Raspberry Pi Zero W uses EGLFS instead of XCB

I have been trying to create a GUI application using Qt5 on Raspbian Stretch, but the application doesn't launch correctly unless I specifically tell it to run as XCB. This is fine, as I don't need it ...
0
votes
1answer
903 views

C++ GUI development with graph support

So, I am developing a project in the RPi where I will be reading values from a sensor using I2C, and this values will be plotted in real time using a GUI. The project is strictly being developed C++ (...
0
votes
1answer
260 views

AVFrame YUV420P to dispmanx VC_IMAGE_YUV420

I'm using ffmpeg for decoding a video with h264_mmal encoder. And all test videos are in YUV420P color encoding. Also I'm using dispmanx for drawing frames from a video. Only problem which I have is ...
1
vote
2answers
455 views

RF24L01 - RF24 Creation Segmentation Fault in Raspberry

What I have Raspberry Pi 3 B RF24L01 RF24 Library TMRh20 How I've Connected It Based on the library indications: RF24L01 pin | RPi 3B 1 GND | 9 GND 2 VCC | 1 (3.3V) 3 CE | 15 (...