@VNB said in GUI-O with Nano 33 BLE and the ArduinoBLE Library:
2.) Once the brightness is adjusted then the Nano Yellow LED STAYS on at the selected brightness even though the "on" and "off" light bulb image toggles okay and Serial Monitor correctly displays "GUI-O app is requesting LIGHT ON!" and "GUI-O app is requesting LIGHT OFF!". That was fixed by always keeping the 'ledPin' in the 'analog' mode by changing digitalWrite(ledPin, HIGH); to analogWrite(ledPin, 0); and digitalWrite(ledPin, LOW); to analogWrite(ledPin, 255);
Ok, my mistake. The digitalWrite
overrides the analogWrite
, disabling the PWM.
@VNB said in GUI-O with Nano 33 BLE and the ArduinoBLE Library:
1.) The Slider Control knob always stayed at 100% even if it is set to a low brightness. That was fixed by adding the following instruction in the "led drive" section.
sendMsg("@brightness VIS:1 VAL:val\r\n");
This is strange and requires further investigation... It seems that the @light_on
is called - this can be the only reason that sets the slider value to 100... Something is not working correctly.
@VNB said in GUI-O with Nano 33 BLE and the ArduinoBLE Library:
sendMsg("@brightness VIS:1 VAL:val\r\n");
This sends the literal "val", not the actual brightness value.
I suggest you put some Serial.print's at the beginning of the message parsing function to see what happens.
Best regards,
kl3m3n