After trying the basic Blink sketch and blinking a single LED, I thought I'd up the ante by blinking a great many LEDs!
I first tried out the included example LED_Matrix/DisplaySingleFrame, which shows up when you connect the board, or if you choose the Uno R4 WiFi as the currently selected board.
I used the LED Matrix Editor at the Arduino Website to draw my images, which is a whole lot quicker and easier than setting individual bits to indicate an LED being on in the matrix:
You can download the code in a couple of formats: 1) as an animation by using the download button, or 2, in a .h file containing the defined constants by using that </> button.
I used the .h file format, and then pulled out the individual frames out of the array and gave them names, and updated the .ino file to use the new names.
My .h file looks like this, for the images you can see in the editor picture above.
/* frames.h Holds the definitions for the frames to display on the Arduino Uno R4 LED Matrix. You can easily build the frames by drawing them with the LED Matrix Editor: https://ledmatrix-editor.arduino.cc */ const uint32_t arrow_left[] = { 0x400c01c, 0x3fc3fc1, 0xcc0cc04c, 66 }; const uint32_t arrow_right[] = { 0x2003003, 0x83fc3fc3, 0x38330320, 66 }; const uint32_t arrow_up[] = { 0x600f01f, 0x83fc0600, 0x60060060, 66 }; const uint32_t arrow_down[] = { 0x6006006, 0x603fc1, 0xf80f0060, 66 }; const uint32_t stop[] = { 0x1f81f, 0x81f81f81, 0xf81f8000, 66 };
Success!
Step into the world of open-source electronics! Our online stores feature the full assortment of arduino products for every skill level.