Loop not working
Solved
General and Desktop
-
Hi.
I'm new to QT and I'm trying to create a project for school using QT and Arduino. I want to send signals to a RGB LED in a loop when I push a button, to light up the LED colors one after another, but the code in the loop does not work:void Dialog::on_pushButton_pressed() { buclaLeduri(); } void Dialog::buclaLeduri(){ int i = 1; while(i>=10){ Dialog::updateRGB(QString("r%1").arg(ledAprins)); qDebug() << ledAprins; Sleep(500); Dialog::updateRGB(QString("r%1").arg(ledStins)); qDebug() << ledStins; Sleep(500); i++; } }
Any help, please?
Thanks!