Questions tagged [c++]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
17 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
57 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
24 views

Programming MLX90640 to display what I want

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 ...
2
votes
2answers
39 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
63 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
28 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
25 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
21 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
56 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
48 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
84 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
34 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
145 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
69 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
66 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
335 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
78 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
39 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
31 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
61 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
116 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
214 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
112 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
93 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
295 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
511 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
349 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
379 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
576 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/...
0
votes
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
406 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
379 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
135 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
789 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
173 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
337 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
75 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
573 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
743 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
217 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
412 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 (...
2
votes
2answers
2k views

Error while loading shared libraries: foo.so: cannot open shared object file: No such file or directory

I have cross compiled c++ code for raspberry pi. Below is process I followed: 1) Cloned the official toolchain from raspberry pi github. Set the environment variable of arm-linux-gnueabihf-c++ (in ....
0
votes
1answer
199 views

Can't read the right channel from MCP3008 in C++ using pigpio

I'm trying to use an IR sensor with Raspberry Pi and I have this function to read a specific channel from the ADC MCP3008. When I try to read any other channel but channel 0, it doesn't work. What I ...
1
vote
2answers
2k views

Cross compiling from Fedora 27

I'm attempting to cross-compile a C++11 project for my Raspberry pi. In my searching online, I have come to the conclusion that I need the g++-arm-linux-gnueabihf compiler (please correct me if I am ...
1
vote
1answer
907 views

Can't access GPIO pins directly from C++ with wiringPi

I'm trying to access the GPIO pins of a Raspberry Pi 3 model B directly from c++. This code works fine with wiringPiSetup() and wiringPiSetupGpio() but I want to access the GPIO registers directly ...
0
votes
0answers
341 views

Linx GPS UART communication using wiringPi

I have a Linx RXM-GPS-R4-x GPS module that uses the UART pins on the Raspberry Pi 3 model B's GPIO pinout. I'm also using the wiringPi's serial library. However, I'm having difficulty with ...
0
votes
1answer
310 views

Cross-compiling with nfs-mount as sysroot fails due to absolute links

I want to cross-compile C++-applications for the raspi using the rpi-tools, CMake and a raspbian sysroot I'm exporting via nfs from a running raspi. My CMake-toolchain-file is OK, header-files and ...
0
votes
1answer
558 views

pigpio spiXfer in C++

I'm trying to communicate with MCP3008 ADC via SPI using "pigpio" library. Basically I'm trying to read an IR Sensor and I've managed to do it manually by sending the required signals but I can only ...