You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,25 +372,33 @@ M5StickC.Led.Toggle();
372
372
373
373
The M5StickC/CPlus and Atom Lite/Matrix exposes an infrared led. You can access it thru the `InfraredLed` property. This will give you a `TransmitterChannel`. Check out the [sample pack](https://github.com/nanoframework/Samples/tree/main/samples/Hardware.Esp32.Rmt) to understand how to use it.
374
374
375
-
### NeoPixel
375
+
### NeoPixel on AtomLite
376
376
377
377
The Atom Lite exposes a rgb led. You can access it thru the `NeoPixel` property:
### RGB LED matrix on AtomMatrix and Led bar on Fire
385
386
386
387
The Atom Matrix has a matrix of 25 RGB LEDs.
387
388
The position of the LEDs in the array follows their placement in the matrix, being 0 the one at the top left corner, growing left to right, top to bottom.
388
389
389
-
You can access it thru the `LedMatrix` property, like this:
390
+
You can access it thru the `LedMatrix` property on the AtomMatrix, like this:
390
391
391
392
```csharp
392
-
// This will set the RGB LED at position 0 to green
393
-
AtomMatrix.LedMatrix.SetColor(0, Color.Green);
393
+
// This will set the RGB LED at position 2, 2 to green
Similarly, you have access to the `LedBar` property on the Fire:
398
+
399
+
```csharp
400
+
// This will set the second RGB LED to green
401
+
Fire.LedBar.Image.SetPixel(2, 0, Color.Green);
394
402
```
395
403
396
404
After you're done with updating all the LEDs that you want to change, flush the updated to the LEDs, like this:
@@ -400,6 +408,13 @@ After you're done with updating all the LEDs that you want to change, flush the
400
408
AtomMatrix.LedMatrix.Update();
401
409
```
402
410
411
+
And on the Fire:
412
+
413
+
```csharp
414
+
// This will update all RGB LED
415
+
Fire.LedBar.Update();
416
+
```
417
+
403
418
## Feedback and documentation
404
419
405
420
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
0 commit comments