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
> Note 1: Before trying to add NuGet packages to your projects and/or before flashing the devices (see next section) using MS Visual Studio (VS), open VS > Tools > Options > NuGet Package Manager > Package Sources and make sure that it contains an entry pointing to <https://api.nuget.org/v3/index.json> , otherwise add it.
35
38
> Note 2: When invoking VS > Project > Manage NuGet Packages make sure that in the Package source drop-down menu (right upper corner) "nuget.org" is selected. Also if you're using preview version the "include prerelease" checkbox should be clicked/selected as well.
The M5Core, M5Core2 and Atom Lite provides as well an `SpiDevice`:
346
+
The M5Core, M5Core2 and Atom Lite/Matrix provides as well an `SpiDevice`:
345
347
346
348
```csharp
347
349
// In this case GPIO5 will be used as chip select:
@@ -359,7 +361,7 @@ var pin5 = M5StickC.GpioController.OpenPin(36, PinMode.Output);
359
361
360
362
### DAC
361
363
362
-
The M5Core, M5Core2 and Atom Lite exposes 2 DAC and you can access them thru the `Dac1` and `Dac2` properties. Refer to the [DAC documentation](https://github.com/nanoframework/System.Device.Dac) for more information.
364
+
The M5Core, M5Core2 and Atom Lite/Matrix exposes 2 DAC and you can access them thru the `Dac1` and `Dac2` properties. Refer to the [DAC documentation](https://github.com/nanoframework/System.Device.Dac) for more information.
363
365
364
366
### Led
365
367
@@ -372,7 +374,7 @@ M5StickC.Led.Toggle();
372
374
373
375
### Infrared Led
374
376
375
-
The M5StickC/CPlus and Atom Lite 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.
377
+
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.
376
378
377
379
### NeoPixel
378
380
@@ -383,6 +385,25 @@ The Atom Lite exposes a rgb led. You can access it thru the `NeoPixel` property:
383
385
AtomLite.NeoPixel.SetColor(Color.Green);
384
386
```
385
387
388
+
### RGB LED matrix
389
+
390
+
The Atom Matrix has a matrix of 25 RGB LEDs.
391
+
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.
392
+
393
+
You can access it thru the `LedMatrix` property, like this:
394
+
395
+
```csharp
396
+
// This will set the RGB LED at position 0 to green
397
+
AtomMatrix.LedMatrix.SetColor(0, Color.Green);
398
+
```
399
+
400
+
After you're done with updating all the LEDs that you want to change, flush the updated to the LEDs, like this:
401
+
402
+
```csharp
403
+
// This will update all RGB LED
404
+
AtomMatrix.LedMatrix.Update();
405
+
```
406
+
386
407
## Feedback and documentation
387
408
388
409
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