To me it feels you are asking two very different questions. The second one is probably best handled by reading the documentaion:in other words:
Code: Select all
INCLUDEPATH += /usr/local/include
LIBS += -lpigpiod_if2 # To include libpigpiod_if2.so from /usr/local/lib
Code: Select all
#include "pigpiod_if2.h"// The header for using GPIO pins on Raspberry
...
int gpioHostHandle = pigpio_start((char*)"localhost", (char*)"8888");
if(gpioHostHandle >= 0) {
if(set_mode(gpioHostHandle, gpioLEDpin, PI_OUTPUT) < 0) {
ui->statusBar->showMessage(QString("Unable to initialize GPIO%1 as Output")
.arg(gpioLEDpin));
gpioHostHandle = -1;
}
else if(set_pull_up_down(gpioHostHandle, gpioLEDpin, PI_PUD_UP) < 0) {
ui->statusBar->showMessage(QString("Unable to set GPIO%1 Pull-Up")
.arg(gpioLEDpin));
gpioHostHandle = -1;
}
}
else {
ui->statusBar->showMessage(QString("Unable to initialize the Pi GPIO."));
}
Code: Select all
if(gpioHostHandle >= 0)
pigpio_stop(gpioHostHandle);
Code: Select all
INCLUDEPATH += /usr/local/include
LIBS += -L"/usr/local/lib"
LIBS += -lwiringPi
Code: Select all
label_03.setText(QString("%1").arg(i));
salvato wrote: ↑Tue Sep 17, 2019 7:51 amshould do the work.Code: Select all
label_03.setText(QString("%1").arg(i));
Code: Select all
void __fastcall TForm1::XYZ( ) { }
(XYZ == FormCreate, Button1Click, Button2Click, ComPort1RxChar, Edit1Change, Edit2Change, ScrollBar1Change ...)
Code: Select all
void __fastcall TForm1::ComPort1RxChar(TObject *Sender, int Count)
{
Form1->Caption="UART character detected";
AnsiString rcvStr;
ComPort1->ReadStr(rcvStr, 250);
Label2->Caption=String(rcvStr);
}
Starte /home/pi/raspiProgs/Qt/build-quit_wiringPi-QtKit-Debug/quit_btn...
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
/home/pi/raspiProgs/Qt/build-quit_wiringPi-QtKit-Debug/quit_btn beendet, Rückgabewert 0
Code: Select all
TARGET = quit_btn
Code: Select all
TARGET = quit_wiringPi
Code: Select all
pin23Label
pin24Label
and play with the possible valuesframeShape
Code: Select all
void __fastcall TForm1::Button1Click(TObject *Sender)
{
}