@@ -188,6 +188,39 @@ In addition, analog pins A0-A5 can also be used as digital pins. Note that **A4/
188188
189189The reference voltage of all digital pins is 5 V.
190190
191+ ## LED
192+
193+ The UNO R4 Minima has a total of four LEDs, three of which are programmable:
194+ - ** ON** - power LED, cannot be programmed.
195+ - ` LED_BUILTIN ` - classic "built-in LED", attached to pin 13.
196+ - ` RX_LED ` - LED labelled "RX" on the board.
197+ - ` TX_LED ` - LED labelled "TX" on the board.
198+
199+ To control these, define them as outputs and write desired state. The below example blinks each LED every second.
200+
201+ ``` arduino
202+ void setup(){
203+ //define pins as output
204+ pinMode(LED_BUILTIN, OUTPUT);
205+ pinMode(RX_LED, OUTPUT);
206+ pinMode(TX_LED, OUTPUT);
207+ }
208+
209+ void loop(){
210+ //turn on all LEDs
211+ digitalWrite(LED_BUILTIN, HIGH);
212+ digitalWrite(LED_RX, HIGH);
213+ digitalWrite(LED_TX, HIGH);
214+ delay(1000);
215+
216+ //turn off all LEDs
217+ digitalWrite(LED_BUILTIN, LOW);
218+ digitalWrite(LED_RX, LOW);
219+ digitalWrite(LED_TX, LOW);
220+ delay(1000);
221+ }
222+ ```
223+
191224## DAC
192225
193226![ DAC Pin] ( assets/dacpin.png )
0 commit comments