Article count:1547 Read by:1783867

Featured Content
Account Entry

Want to quickly hook up and experiment with RGB LEDs? Get this module!

Latest update time:2024-11-13
    Reads:
Q
A
&
What is the Arduino Modulino Pixels module?
The Arduino Modulino Pixels module is a maker-friendly module with eight individually addressable color LEDs and a Qwiic interface. The Pixels module ( Arduino model number ABX00109) was originally provided as part of the larger Arduino Plug and Make kit . It is a relatively complex module because it integrates a 32-bit STMicroelectronics ARM microcontroller to handle communication between the Arduino UNO R4 and a single red, green, and blue (RGB) LED. The ARM Cortex M0 microcontroller can be seen in the lower left corner of Figure 1.
This article explores the software interface and the underlying hardware, but is limited to basic operations using the default Modulino addressing scheme. It does not cover advanced operations such as changing the address of the Pixels module or operating multiple Pixels boards on the same I2C network. If you are interested in performing these complex operations, please leave a comment below. These advanced techniques will become increasingly important in the future if Arduino provides a separate Modulino board.
Figure 1: Image of the Arduino Modulino Pixels module. The 32-bit STM ARM microcontroller is visible in the lower left corner.
Software Description for Arduino Modulino Pixels
Arduino provides a simplified library for the Modulino module. This code can be installed using the Arduino IDE's library manager as described in the Arduino instructions .
Modulino Class Structure
The software interface to the Arduino Modulino board is handled using a class structure. The first step is to use the constructor:
ModulinoPixels leds;
This will create an leds object which can then be manipulated using various methods including:
  • leds.clear (); This is an overloaded method used to clear a single or all LEDs. When called without arguments, all LEDs are cleared. When called with index N, the Nth LED is cleared.
  • leds.set (); This is an overloaded method used to set the intensity and color of the LED.
  • leds.show(); This method transfers the internal data established by the clear() and set() methods to the physical LEDs.

Modulino Pixels operate similarly to double buffering. We use the clear() and set() methods to change the registers in the Pixels memory. These changes happen in the background and have no effect on the display. Only when the show() method is called is the data transferred to the physical LEDs.

Technical tips:


Double buffering is an important part of serial communication. It allows data to be transferred one block at a time. When all blocks are assembled, they can be displayed simultaneously. For example, loading the LED index number, color, and intensity data takes time. However, a single event triggered by the show() method ensures that all LEDs are updated simultaneously.

For simplified example code and communication protocol, please refer to this tutorial to understand how to configure the Arduino Modulino Pixels module, how to set the color, and how to blink a single LED.

Figure 2: Physical setup and results for the Getting Started Pixels code listing.

Technical tips:


Several methods of the Arduino Modulino Pixels are overloaded. Overloaded functions are easily identified because multiple method definitions have the same name. In this example, calling clear() with no arguments will clear all LEDs. When overloaded with clear(N), the Nth LED will be cleared. Similarly, the set() method will accept either a built-in color or a separate 8-bit RGB value.

Summarize

Arduino Modulino Pixels allow users to quickly connect and experiment with three-color RGB LEDs.


Finally, if you like this article, please share it with more friends ! Remember to give it a thumbs up !


Tips Click the menu Design Support: Engineer Tips to get more tips for engineers

Click "Read More" below to see more


Let me know you 're watching

 
EEWorld WeChat Subscription

 
EEWorld WeChat Service Number

 
AutoDevelopers

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building,Block B, 18 Zhongguancun Street, Haidian District,Beijing, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号