I have a copy of the Uno Q and tried the sketch posted here:
it compiles and downloads correctly. The result is backward/reverse behavior from what is expected on my Uno Q built-in LED when I change the timing. Changing delay for HIGH from 500 to 1500 results in the LED OFF for 1.5 sec and ON for 500 ms. I have seen this shown on YouTube also (Top Tech Boy, Paul Mc..) on his review of Uno Q. Also, with no configuration of an external LED can I make it fade as given in the Examples> Basic> Fade . The external LED is proven to work using V and Gnd directly. I have tried pins 9, 12, and A1 . Fade does not work on Uno Q. Also, I cannot get servo to respond and control any servo motor in my kits. I have uninstalled the board in manager and reinstalled it, using the standard Arduino IDE. The Uno Q is advertised to work with the IDE on both Amazon and Arduino sales site (where I bought my Arduino Uno Q 4GB version.)
Do you have an Arduino Uno Q board in hand ? If so try the blink sketch and see the results that I am talking about; backward result. If not, then why are you commenting ?
It is easy to get the impression that HIGH means "on" and LOW means "off". However, this is incorrect. The effect of the pin state on a circuit depends on how that circuit is configured.
Here we have an example LED circuit in one possible configuration:
In this case, when pin 2 is set HIGH, current will flow through the LED and it will turn on, as you expected. This is referred to as an "active HIGH" configuration.
Now consider this alternative, and equally valid, configuration for the example circuit:
In this case, when pin 2 is set LOW, current will flow through the LED and it will turn on. This is referred to as an "active LOW" configuration.
The LEDs on the UNO Q have an "active LOW" circuit configuration. So the behavior you observed is expected. This is actually the case on several Arduino boards.
Something that might make it easier for you to work with the LEDs is to define some convenience variables in your sketch:
byte ledOnState = LOW;
byte ledOffState = HIGH;
Then you can write self-documenting code like this:
@FrankSchmidt yes it does state here that 'High' means 'On' that is Active High Logic. But As explained earlier the LED_BUILTIN on Arduino Uno Q follows Active Low Logic. This is counterintuitive and could create confusion.
UNO Q represents a remarkable migration from the UNO R3 platform. However, in the UNO Q board design, the onboard LED (LED_BUILTIN = LED3_R, lebeled STM-3) is implemented using active-LOW (negative) logic, meaning the LED turns ON when its cathode terminal is pulled LOW (Fig-1).
In contrast, on the UNO R3, the LED_BUILTIN is implemented using active-HIGH (positive) logic, where the cathode is permanently grounded and the LED turns ON when a HIGH level is applied to its anode terminal.
Since LED_BUILTIN on the UNO Q is not driven from header pin D13, the board designers likely had valid architectural or electrical reasons for choosing an active-LOW configuration in this case. It is worth noting that all header GPIO pins on the UNO Q continue to follow positive logic, consistent with the behavior of the UNO R3 header pins.
How about fixing “Fade” also ? That’s offered under “basic” sketches when I install UnoQ board and it doesn’t work either. Because there are so many failed Arduino sketch offerings under Examples > Basics, I haven’t even bothered to go further down the list . Again, speaking to the consumer Arduino/Qualcomm has said flatly that all the standard Arduino sketches work with Uno Q (both on Arduino sales site and on Amazon) and this is clearly not true. Expect blowback from consumers.
There are four 3-color RGB LEDs on the UNO Q board (QBR: 1 and 2; STM: 3 and 4). I attempted to mix and modulate their colors at different duty-cycle percentages; however, I was unsuccessful because the analogWrite() function does not work for these LEDs, even though it functions correctly on DPins 3, 5, 6, 9, 10, and not on 11).
Hi @GolamMostafa. Which version of the "Servo" library do you have installed? Support for the "Arduino UNO Q Board" platform was added in version 1.3.0:
So it seems you are using an outdated version of the library.
I have now installed V 1.3.0 and no more compilation error. However, the intensity of LED4_G does not modulate. The LED4_G remains On all the time. This is the sketch I have uploaded in IDE 2.3.7.