@@ -381,93 +381,108 @@ Have fun creating interactive interfaces or animation on your UNO R4 WiFi!
381
381
382
382
To write more advanced sketches on your own, you may use the full API of the library as found below.
383
383
384
- Members | Descriptions
385
- --------------------------------|---------------------------------------------
386
- ` public ` [ ` ArduinoLEDMatrix ` ] ( # ) ` () ` | The main class for controlling the LED matrix.
387
- ` public void ` [ ` autoscroll ` ] ( # ) ` (int32_t interval_ms) ` | Sets the time in ms for each frame to be displayed.
388
- ` public void ` [ ` on ` ] ( # ) ` (size_t pin) ` | Turn an individual pixel on.
389
- ` public void ` [ ` off ` ] ( # ) ` (size_t pin) ` | Turn an individual pixel off.
390
- ` public void ` [ ` begin ` ] ( # ) ` () ` | Start the LED matrix.
391
- ` public void ` [ ` next ` ] ( # ) ` () ` | Manually move to the next frame in the sequence.
392
- ` public void ` [ ` loadFrame ` ] ( # ) ` (const uint32_t buffer[3]) ` | Load a new single frame that is not in any sequence.
393
- ` public void ` [ ` renderFrame ` ] ( # ) ` (uint8:t frameNumber) ` | Render the loaded frame.
394
- ` public void ` [ ` play ` ] ( # ) ` (bool loop = false) ` | Start playing the sequence of frames, with the option to loop indefinitely or play once.
395
- ` public bool ` [ ` sequenceDone ` ] ( # ) ` () ` | checks if the sequence has finished playing.
396
- ` public void ` [ ` loadPixels ` ] ( # ) ` (uint8_t *arr, size_t size) ` |Loads the pixels into the buffer but does not display them.
397
- ` public void ` [ ` loadWrapper ` ] ( # ) ` ( ` [ ` const uint32_t frames[][4], uint32_t howMany ` ] ( # ) ` callback) ` | Sets the current frame to number 0 in the sequence.
384
+ Members | Descriptions
385
+ ---------------------------------------------------------------|---------------------------------------------
386
+ ` public ` [ ` ArduinoLEDMatrix ` ] ( # ) ` () ` | The main class for controlling the LED matrix.
387
+ ` public void ` [ ` autoscroll ` ] ( # ) ` (int32_t interval_ms) ` | Sets the time in ms for each frame to be displayed.
388
+ ` public void ` [ ` begin ` ] ( # ) ` () ` | Start the LED matrix.
389
+ ` public void ` [ ` next ` ] ( # ) ` () ` | Manually move to the next frame in the sequence.
390
+ ` public void ` [ ` loadFrame ` ] ( # ) ` (const uint32_t buffer[3]) ` | Load a new single frame that is not in any sequence.
391
+ ` public void ` [ ` renderFrame ` ] ( # ) ` (uint8:t frameNumber) ` | Render the loaded frame.
392
+ ` public void ` [ ` loadSequence ` ] ( # ) ` (const uint32_t frames[][4]) ` | Loads an animation sequence into the buffer but does not display it.
393
+ ` public void ` [ ` play ` ] ( # ) ` (bool loop = false) ` | Start playing the sequence of frames, with the option to loop indefinitely or play once.
394
+ ` public bool ` [ ` sequenceDone ` ] ( # ) ` () ` | checks if the sequence has finished playing.
398
395
399
396
## Members
400
397
401
- ** public ArduinoLEDMatrix()**
398
+ ### ` ArduinoLEDMatrix() `
402
399
403
- Construct a new ` LEDMatrix ` object.
400
+ Construct a new LED matrix object. This will be used to access the methods in the library .
404
401
405
- ** public void autoscroll(int32_t interval_ms) **
406
-
407
- Enable autoscrolling through the frames in a sequence.
402
+ ```
403
+ ArduinoLEDMatrix LEDMatrix;
404
+ ```
408
405
409
- ** Parameters**
410
- * ` interval_ms ` Sets the time in milliseconds that should be spent on a frame before switching to the next frame in the sequence.
411
406
407
+ ### ` autoscroll() `
412
408
413
- ** public void on(size_t pin) **
409
+ Enable autoscrolling through the frames in a sequence.
414
410
415
- Turn on an individual LED.
416
411
417
412
** Parameters**
418
- * ` pin ` Defines which LED should be turned on. Accepted values are 0-95.
419
- ** public void off(size_t pin)**
420
413
421
- Turn off an individual LED .
414
+ - ` interval_ms ` Sets the time in milliseconds that should be spent on a frame before switching to the next frame in the sequence .
422
415
423
- ** Parameters**
424
- * ` pin ` Defines which LED should be turned off. Accepted values are 0-95.
425
416
426
- ** public void begin()**
417
+ ### ` begin() `
427
418
428
419
Starts the LED matrix.
429
420
430
- ** public void next()**
421
+ ``` arduino
422
+ LEDMatrix.begin()
423
+ ```
424
+
425
+ ### ` next() `
431
426
432
427
Manually moves to the next frame in the sequence.
433
428
434
- ** public void loadFrame(const uint32_t buffer[ 3] )**
429
+ ```
430
+ LEDMatrix.next()
431
+ ```
432
+
433
+ ### ` loadFrame() `
434
+
435
+ Loads a single frame that is not part of a sequence.
435
436
436
- loads a single frame that is not part of a sequence.
437
+ ``` arduino
438
+ LEDMatrix.loadFrame(buffer[i])
439
+ ```
437
440
438
441
** Parameters**
439
- * ` buffer[3] ` an array of three 32bit integers, where each bit represents an LED.
440
442
441
- ** public void renderFrame(uint8_t frameNumber)**
443
+ - ` buffer[3] ` an array of three 32bit integers, where each bit represents an LED.
444
+
445
+ ### ` renderFrame() `
446
+
447
+ Render a specific frame from a sequence.
442
448
443
- Render a specific frame from a sequence
449
+ ```
450
+ LEDMatrix.renderFrame(frameNumber)
451
+ ```
444
452
445
453
** Parameters**
446
- * ` frameNumber ` Specifies which frame of the sequence should be rendered.
447
454
448
- ** public void play(bool loop) **
455
+ - ` int ` - frame to load.
449
456
450
- Starts playing the loaded sequence.
457
+ ### ` loadSequence() `
451
458
452
- ** Parameters**
453
- * ` loop ` true to enable looping the sequence, false to play once.
459
+ Loads an animation sequence into the buffer but does not display it.
454
460
455
- ** public bool sequenceDone()**
461
+ ``` arduino
462
+ LEDMatrix.frames[][4]
463
+ ```
456
464
457
- Check for if the sequence is finished playing or if the frame should be advanced another step.
465
+ ** Parameters **
458
466
459
- ** Returns**
460
- false if the sequence is not finished, true if it is.
467
+ - ` frameNumber ` Specifies which frame of the sequence should be rendered.
461
468
462
- ** public void loadPixels(uint8_t arr, size_t size) **
469
+ ### ` play() `
463
470
464
- Loads the pixels into the frame but does not load them.
471
+ Starts playing the loaded sequence.
472
+
473
+ ```
474
+ LEDMatrix.play(state) //true or false
475
+ ```
465
476
466
477
** Parameters**
467
- * ` arr ` Pointer to an array that holds the frame
468
478
469
- * ` size ` the amount of pixels in your frame.
479
+ - ` loop ` true to enable looping the sequence, false to play once.
480
+
481
+ ### ` sequenceDone() `
482
+
483
+ Check for if the sequence is finished playing or if the frame should be advanced another step.
484
+
485
+ ** Returns**
470
486
471
- ** public void loadWrapper(const uint32_t frames [ ] [ 4 ] , uint32_t howMany) **
487
+ - ` false ` if the sequence is not finished, ` true ` if it is.
472
488
473
- Sets the current frame to frame 0 in the sequence.
0 commit comments