Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4844

Interfacing (DSI, CSI, I2C, etc.) • Re: Using GPIO on Pi5 from C/C++

$
0
0
I made a simple method like the arduino.

bool pinMode(int pin,int mode); OUTPUT, INPUT, INPUT_PULLUP, INPUT_PULLDOWN, OPENDRAIN_PULLUP
void digitalWrite(int pin,int output);
int digitalRead(int pin);

just check my main.cpp.
P.S. I also add my ds18b20 bitbanging method. On main.cpp I checked gpio 4 and 17. Just rem it if you don't need it

https://github.com/danjperron/gpiod_cpp

Statistics: Posted by danjperron — Fri Jan 26, 2024 11:54 pm



Viewing all articles
Browse latest Browse all 4844

Trending Articles