Questions tagged [c++]
For questions pertaining to compiling c++ programs on the Raspberry Pi.
262 questions
0
votes
0
answers
85
views
Unable to build a project that uses pio_USB for pico
I am trying to build this project:
https://github.com/sekigon-gonnoc/Pico-PIO-USB
Unfortunately, I am not able to build it.
I am on Ubuntu 20 and I have the pico sdk downloaded.
After the cmake ...
2
votes
1
answer
732
views
pico/stdlib.h is no longer found
I'm trying to get a simple program that uses GPIO running on a Pico W. But I've run into a build issue. I'm 99% sure the problem is in my CMakeList.txt file. But it isn't apparent to me where I've ...
1
vote
1
answer
829
views
How to load binary into Raspberry Pi Pico only with CLI without GUI
I have a Raspberry Pi Pico connected to a Raspberry Pi 4 into which I am working with SSH. I succeeded into loading the blink LED example by drag-and-drop the binary file. Is it possible to do this ...
2
votes
1
answer
297
views
Control multiple push buttons on a raspberry pi using an mcp23017 over C++
Having followed various tutorials on the web (i.e. 1,2), I have made the following connections:
To enhance clarity, I post another picture depicting the connections on the mpc23017 using a cropped ...
0
votes
1
answer
47
views
C++: Linking failing on Pi 1 B+ for class members, but the same code compiles on Ubuntu
Let me start by saying that the reason I'm using this model is because this particular specimen old and relatively disposable, which is appropriate for my project.
I have written myself a library and ...
0
votes
1
answer
449
views
Using DMA + PIO to write function sample points to a DAC chip periodically
I'm attempting to make a function-generator (or AWG) with a Raspberry Pi Pico. For that, I'd like to utilize the DMA and PIO capabilities of the chip. On a DMA channel I would copy and direct sample ...
-1
votes
2
answers
111
views
20mhz GPIO signal: possible on Raspberry Pi models?
I am wondering whether any model of the Raspberry Pi can reliably output an 8-bit 20mhz signal into 8 GPIO pins at the same time. Basically I am trying to read 8-bits from a file at a time out to 8 ...
-1
votes
1
answer
100
views
Python-less Pi Pico toolchain in Windows
Is there any way to build a C++ Raspberry Pi Pico binary without having to install Python. It's quite heavyweight and feels quite unnecessary (I do like tidy toolchains without huge bloat and an ...
2
votes
1
answer
370
views
It is possible to set I2C bus speed programmatically without the bcm2835 library?
All, I've ported a C++ OLED library from the bcm2835 library to use i2c-smbus to prevent having to run the executable as root. (not the best from a security standpoint). However, i2c-smbus and ioctl() ...
1
vote
1
answer
885
views
Simple http server in c++
I am writing a multiplatform program in c++ that should run on AMD and Raspberry Pi 4.
On AMD I installed cpp-httplib-dev like this: sudo apt-get install libcpp-httplib-dev
and then the code like ...
0
votes
0
answers
234
views
Why is digitalRead/digitalWrite not working in C++ nor in gpio terminal commands?
I'm writing in C++ using WiringPi to integrate with GPIO but it doesn't seem to work during runtime.
Below I have a simple example of an output wired to an input expecting the input to read HIGH, but ...
2
votes
2
answers
2k
views
One time timer interrupt? (Pico W, C/C++)
Is there a way to set a one time timer interrupt on the Raspberry Pi Pico? I.e. in code, I would be able to tell the hardware timer to interrupt me in a specified period of time. Example pseudocode ...
1
vote
1
answer
459
views
ADC and PWM strange behaviour
I'm trying to measure the voltage of a 11.1V LIPO battery, which is substituted by a power supply for testing, using the raspberry pi pico on a breadboard, and then it changes the voltages of an RGB ...
2
votes
1
answer
125
views
Does Raspberry Pi Pico C/C++ SDK Setup Script work on Raspberry Pi Desktop installed on a PC?
The Raspberry Pi Pico documentation indicates "if you are intending to develop for Pico on a Raspberry Pi, then you can set up the C/C++ toolchain quickly by running our setup script from the ...
3
votes
1
answer
479
views
Assistance with pigpio SPI slave bscXfer on Raspberry Pi 4
I am trying to write C code so my Raspberry Pi4 can be an SPI slave, and the SPI master can read data from the Pi4.
I'm expecting to get this data from SPI master (in a continuous loop):
0x01 0x42 ...