Category : wiringpi

I coding C++ WiringPi(Linux) project and i using #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <signal.h> this libraries but i using windows and i getting ‘sys/socket.h’: No such file or directory error i know windows not have sys/socket.h, arpa/inet.h etc but if i not have files i ..

Read more

Hi I need to control the GPIO’s with C++. I used the code from the original Documentation but it doesent work. Does anyone have any Ideas? Code: // WiringPi-Api embed #include <wiringPi.h> // C-Standardbibliothek embed #include <stdio.h> int main() { // Start the WiringPi-Api if (wiringPiSetup() == -1) return 1; pinMode(0, OUTPUT); while(1) { // ..

Read more

I have been testing UART communication in C++ with wiringPi. The problem: It seems that C++ isn’t outputting whole data into the UART port /dev/ttyAMA0. Perhaps I’m doing it the wrong way? Investigations: Note : I am using minicom, minicom –baudrate 57600 –noinit –displayhex –device /dev/ttyAMA0 to check the received data. Also! The UART port, ..

Read more

I am trying to make code for line following vehicle in the opencv C++ and wiringpih libereries. I am using the following GitHub Link as a reference: https://github.com/gmueth/line-following-robot/blob/master/line-follower.py However the source code is in OpenCV Python but I need to do it in opencv C++. Till now i am completed till this: #include <opencv2/opencv.hpp> #include ..

Read more

I have created a class Capteur_Input and one of the options in the constructor creates an interrupt using wiringPiISR wiringPiISR(m_pin, INT_EDGE_RISING, isrInput); my class also has an attribute m_impulsion and I am incrementing this value each time that an interruption happens. this what my interrupt handler looks like void Capteur_Input::isrCallback() { if(m_pin== Pin_vitesse) { increment_impulsion(); ..

Read more