Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

IOCTL NOT DECLARED ERROR [closed]

I am trying to take in bearing values from a QMC5883L with the help of a c++ script. I am trying to do this with the help of the i2c bus as the compass is an i2c device. But I am facing multiple ...
0
votes
1answer
26 views

wiringPi compile issue on RPi 4B 64bit

I am trying to compile my C++ project using CMake. My Raspberry Pi OS does include /usr/include/wiringPi.h and all the required .so files in /usr/lib/. Here is the output of gpio -v command: gpio ...
2
votes
1answer
69 views

Using Motor Encoders with Raspberry Pi

I am trying to read a quadrature motor encoder with the Raspberry Pi. After attempting to write the code in Python, I came to the conclusion that Python was too slow (which was expected). I tried to ...
0
votes
1answer
25 views

OpenCV setting resolution results failing in reading frames

I've tried to change the resolution on raspicam v2 with my raspberry pi 4 b, but this code gives me false every time I try to read frame... Is there anything I am missing? I can easily read frames ...
0
votes
2answers
33 views

How can the x-tools C++ crosscompiler build code, which does not use the Pi's FPU?

After starting over with the x-tools C++ crosscompiler to build my Raspi apps, I found out that the app runs considerably (approx. 1/3) slower than when built with the g++ (version 6.5.0) on the Raspi....
0
votes
0answers
64 views

How to use 4 CS for SPI in C++

I'm currently trying to implement 4 CS in RaspPi. I'm still a newby in this field and used the library wiringPi. For CS0 and CS1 this works totally fine. However now I have 2 more CS on the GPIO Pin ...
0
votes
1answer
40 views

Cross Compilation of Qt OPC UA Server on Raspberry Pi 4B fails

currently I am trying to cross compile a stand-alone Opc Ua Server on a Raspberry Pi4B with Qt 5.15.2 and the Qt Opc Ua Plugin. For Cross Compilation, I used this instruction: https://wapel.de/?p=842. ...
0
votes
0answers
23 views

RPI not recieving I2C master's messages

Im trying to use a RPI3B+ to emulate a WiiMotion Plus, So i have it set up as a slave using pigpio and connected to a wiimote. Expected outcome: The wiimote will try to read from register 0xfe and ...
0
votes
0answers
31 views

RPI as I2C slave find bscXfer register

In my program, i have an array of 0x100 bytes, called m_reg_data. an index of this list will return the data at that given register. I have two functions which access this. BusRead: int BusRead(std::...
1
vote
3answers
134 views

How to start GPCLK2 pin inside code of C/C++

I would like to use GPIO 6 (GPCLK2) to produce a 8.192 MHz clock in other words i would like to use its alternate function of a general purpose clock, but im having trouble looking for a guide that ...
0
votes
1answer
190 views

How to read any connected DS18B20 temperature sensors with C/C++

I'm new to the Raspberry Pi ecosystem so pardon me if I'm talking nonsense. I want to read the temperature data from the connected DS18B20 sensors using C/C++. I followed this schema to connect them: ...
0
votes
1answer
123 views

Raspberry Pi Auto-start Executable with Systemd, Loaded but Inactive (Dead)

I am trying to run a CPP client application to connect to a server when Raspberry Pi is booted and connected to the Internet. I validated this CPP executable (Asio_Client_Main) works fine when ...
0
votes
1answer
171 views

How can I make an app linked against GLIBCXX_3.4.26 run on Raspbian Buster, which only offers 3.4.25?

I'm now trying to compile C++ apps for my Raspi 3B by using crosstool-ng on my OpenSuSE-based host machine. The toolchain now works fine, but when trying to run the app on the Raspi, I always get this ...
2
votes
1answer
214 views

How to directly render pi camera output to display using C++

Right now, I'm building an application and one of the sub goals is to display the camera to the screen with a good resolution and frame rate. I'm also trying to keep the cpu usage as low as possible ...
0
votes
1answer
145 views

Changing the code for the “Waveshare” e-paper display

I've put together quite a nice little ePaper display clock with the Raspberryp Pi Zero W running Buster. I'm using the Waveshare 6" kit (display and controller board). Has anyone here had any ...
0
votes
0answers
89 views

Visual Studio Code - output to “integrated Terminal” is corrupted / unreadable

the Unreadable text output from the 'integrated terminal' is shown below this line: xecutinga isk:C /+/++C a++ ltndv suinfc <ndc < tarrangb ulnd.... flnd. fngnhec. hlcchhflddy i am new to ...
0
votes
1answer
19 views

NRF24L01 PRX only datapipe 0 and 1 receiving data

I'm creating a project in C++ on a raspberry pi zero and C on PIC18F26Q10 where multiple PICs will transmit sensor data to the raspberry pi. Both devices can send and receive data to and from each ...
0
votes
1answer
214 views

How to control a Servo via libgpiod on a raspberry PI

I am trying to control a Servo in c ++ using the libgpiod library. My problem is in defining the 50Hz pwm pulse on the pin that the servo is connected to. The servo signal cable is connected to pin 33 ...
0
votes
0answers
73 views

Raspberry Pi Looking to control I2S DAC via C++

Hello stack exchange community! I have a project underway in which I am planning to produce sine wave audio output using a Pi 3B and a PCM 1780 DAC. I'm in the very early stages and am trying to ...
0
votes
1answer
54 views

Camera, splitter and encoder in OpenMAX

I want to access camera and get both encoded and not-encoded video from it in my C++ application. As I'm targetting Raspberry Pi Zero, I want it to be as efficient as possible, so I decided to use ...
0
votes
0answers
26 views

Eclipse 4.18 on Raspberry Pi

I would like to install newest Eclipse 4.18 for C++ development on Raspberry Pi 3 with 1Gb RAM. Is it possible to do so with such hardware resources? Will it run fine on Pi 4 with 8Gb RAM?
1
vote
1answer
351 views

How to write a C++ wireless communication to control my raspberry pi over network

I have a raspberry pi and I want to convert it into a RC car which I will control through my PC. I know C++ programming and I intend to use that to write the software stack. I want to create a C++ ...
2
votes
4answers
1k views

Install OpenCv in a raspberry pi 3 with c++

I've been working on a project with OpenCV and Visual Studio but I want to perform some tests on a Raspberry Pi 3, I haven't found accurate information about how can I use OpenCV in a Raspberry Pi ...
1
vote
2answers
74 views

Run application with other user than root

Within a small project I opened a wireless connection using the NRF24L01 transceiver and a Raspberry Pi 3 Model B+ with Raspbian 10. To communicate over the transceiver I make use of the RF24 library ...
2
votes
1answer
200 views

I want to build “raspberry pi ” c++ code in desktop ubuntu

I have created simple c++ application program in raspberry Pi. I could build this code in raspberry pi, but I'm getting error while compiling it in my labtop "ubuntu". My aim is to create executable ...
2
votes
1answer
119 views

Comparison between Object Detection Solutions on Raspberry PI

I have only little experience with embedded systems. I have a Raspberry Pi 4 with 1gb RAM and a Camera Module v2.1 and want to do object detection and tracking on it. By best solution I mean a ...
2
votes
2answers
1k views

WiFi packet sniffer for RPi in c++

We are currently working on a project, where we want to see the packets sent over WiFi. We are using an RPi zero w as a sniffer, and we have managed to use ioctl calls to get ssid and other ...
0
votes
1answer
857 views

Open (lx)terminal on startup, run program in it

I have the following service: [Unit] Description=Create test directory After=graphical.target [Service] Type=oneshot RemainAfterExit=yes User=pi ExecStart=/home/pi/Desktop/startup-script.sh [...
2
votes
2answers
926 views

How to run a script after bootup on RPi 4/Raspbian 10 (buster)

Im trying to run a script after bootup, when the desktop is shown. The script is rather simple: #!/bin/bash mkdir /home/pi/Desktop/test So in other words: This script is creating af folder "Test" ...
1
vote
1answer
408 views

What resolutions can I use for the Raspberry PI camera 2? And how can you tell?

I'm working on a project with Raspberry Pi 3 and camera module v2. I'm using OpenCV and raspicam. I want to know the maximum resolution I can use. The datasheet says 3280*2464, but I get errors when ...
3
votes
1answer
672 views

How to get 10-bit depth black and white image from raspicam v2.1?

I am a little bit confused about image capturing by Raspberry pi camera V2.1 [1]. I work on the Raspberry pi 4 and I know how to get 8-bit depth black and white (BW) image from it on the C++ level ...
0
votes
0answers
88 views

Poor std::atomic performance on Pi 4

I recently migrated a project of mine from Pi 3B+ to Pi 4B only to find that it now runs much slower than before. After investigation, it appears the culprit is the atomic library that I use heavily. ...
0
votes
0answers
71 views

C++ programming - Class for Motor rotation and control for washing machine embedded system device layer error?

#include <iostream> using namespace std; int main() { // declaring variables: int MotorControl; int MotorRotation; MotorControl = on; MotorControl = off; // process motor control and ...
1
vote
0answers
111 views

How to update GTK3 image using a button to capture a picture from the camera using C++?

I managed to create a program that will display some buttons and and Image. Now I would like to update the image when a button is clicked. How do I do that? Here is what I have so far, it all works ...
1
vote
4answers
470 views

Cannot run 2 apps with rc.local but it works from command line

I have 2 apps, lets call them /home/pi/app1 and /home/pi/app2 If I type into console sudo /home/pi/app1 & sudo /home/pi/app2 both apps execute without issue When I add the same line to /etc/rc....
1
vote
1answer
1k views

OpenCV Gstreamer pipeline doesn't work on Pi 4 Buster

I'm studying about object tracking and detecting in Gazebo Simulation. So, I'm trying to send Simulation video(Gst Plugin) to Raspberry Pi 4 via ethernet cable over UDP stream. And Pi 4 side, catch ...
0
votes
2answers
889 views

Raspberry Pi 4 B g++ undefined reference to boost::system::system_category()

I created a simple program in C++ on my RPi to test the Boost library. This is the code: #include <iostream> #include <boost/asio.hpp> int main() { std::cout << "Hello World!" &...
0
votes
1answer
435 views

Duplex communication via bluetooth - in C++ code [closed]

I have a working C++ code , partially converted to class, passing single (text char ) message form client (Rpi) to server (PC). I have used a composite ( fancy work for hack ) of many C/C++ code ...
0
votes
1answer
340 views

polling gpio raspberry 2 doesn't work

i'm writing a library for my raspberry pi 2 for gpio control. I'm trying to test a function for read a gpio driven by interrupts with sysfs but i can't do that my function stops in poll() function. ...
1
vote
0answers
68 views

pigpio library dependencies missing when compiling Radiohead nRF24 library

I am using Eclipse 2019-06 CDT to compile the Radiohead nRF24L01 library (v1.97) using the pigpio interface (v71) with C++. I get the following errors: rpi/rfs_pizw2/usr/lib/libpigpio.so: undefined ...
2
votes
0answers
91 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
232 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
113 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
311 views

Running Visual C++ 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?
1
vote
0answers
458 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 ...
-1
votes
1answer
143 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 ...
2
votes
1answer
205 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
440 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
3k 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 ...
3
votes
1answer
696 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 ...

1
2 3 4 5