๐ŸŽ TENYO 2026
๐Ÿšš Shipping from 12 USD
๐Ÿ’ฐ DEALS OF THE DAY

RGB LED

The Hardware of Atom

Atom comes with an RGB LED that can be used to display information. It can display any color, however, we have limited the colors to a list, and brightness is a constantly dimmed light at the moment.

Supported Colors

Atom currently supports the following colors:

  • w: white
  • x: black (LED off)
  • r: red
  • g: green
  • b: blue
  • y: yellow
  • o: orange
  • p: purple
  • c: cyan

Setting a Static LED Color

To set a static LED color, you need to send the letter of the color and a star (*) character. The star character will repeat the color infinitely, and the LED will not turn off.

				
					atom.led('r*'); // set the LED to red
atom.led('g*'); // set the LED to green
atom.led('x*'); // turn off the LED
atom.led('');   // turn off the LED
				
			

Sending Basic Color Sequences

To display a color sequence, you need to send the letters of the colors in a row. Each color will be displayed for 50 ms.

				
					atom.led('rgb'); // red, green, blue, then off

				
			

You can combine it with infinite repeats by adding a star character at the end.

				
					atom.led('rb*'); // red and blue colors will alternate
atom.led('rx*'); // red will blink (red, off will alternate)
				
			

Timings

You can control how long a color will stay displayed by adding timing characters to set the time. The default is 50ms, and you can override it with these characters:

				
					.   50 ms
-   250 ms
=   1000 ms
				
			

You Can Use It Like This:

				
					atom.led('r');      // red for 50 ms, then off
atom.led('r.');     // red for 50 ms, then off
atom.led('r..');    // red for 100 ms, then off
atom.led('r-');     // red for 250 ms, then off
atom.led('r=');     // red for 1000 ms, then off
atom.led('r=-');    // red for 1250 ms, then off
atom.led('r=x..*'); // red for 1000 ms, then off for 100 ms, and repeat
				
			

Repeats

You can specify the number of repeats by adding exclamation marks (!) at the end of the pattern. The repeat-related characters must be at the end of the pattern; otherwise, they will be ignored. These are the two characters to control the repeats:

				
					

!   repeat +1 times
*   repeat infinite times

And you can use them like this:

atom.led('r x=');     // red for 50 ms then off for 1 s - once
atom.led('r x=!');    // red for 50 ms then off for 1 s - once
atom.led('r x=!!');   // red for 50 ms then off for 1 s - twice
atom.led('r x=!!!');  // red for 50 ms then off for 1 s - three times
atom.led('r x=*');    // red for 50 ms then off for 1 s - infinitely

				
			

Conclusion

That’s it! We hope this documentation page has been helpful in using the RGB LED of Atom in MagiScript. Remember, you can play color patterns with atom.led(‘r*’) calls, where the parameter is a color pattern consisting of the supported colors (‘w’, ‘x’, ‘r’, ‘g’, ‘b’, ‘y’, ‘o’, ‘p’, ‘c’), timing characters (‘.’, ‘-‘, ‘=’), and repeat characters (‘!’, ‘*’).

Devices & MagiScript

โš›๏ธ Atom Remote

๐Ÿ”ข Quantum Calculator

๐Ÿคนโ€โ™‚๏ธ MagiScript Language

๐Ÿคนโ€โ™‚๏ธ MagiScript Examples

๐Ÿคนโ€โ™‚๏ธ MagiScript Tutorials

General

๐Ÿ“ƒ First Steps

MagiScript Editor

๐Ÿ“ƒ Basics

๐Ÿ“ƒ Keyboard Shortcuts

๐Ÿ“ƒ Running Your First Program

๐Ÿ“ƒ App Store

๐Ÿ“ƒ Atom Settings (Editor)

๐Ÿ“ƒ Debugging Techniques

Input/Output

๐Ÿ“ƒ Buttons

๐Ÿ“ƒ Vibration Motor

๐Ÿ“ƒ RGB LED

๐Ÿ“ƒ Devices

๐Ÿ“ƒ PeekSmith

๐Ÿ“ƒ Quantum

๐Ÿ“ƒ Teleport

๐Ÿ“ƒ Spotted Dice

๐Ÿ“ƒ SB Watch

๐Ÿ“ƒ IARVEL Watch

๐Ÿ“ƒ Fossil Watch

๐Ÿ“ƒ Cosmos Printer

๐Ÿ“ƒ PeriPage Printer

๐Ÿ“ƒ ATC Remote

๐Ÿ“ƒ Labco Scrabble

๐Ÿ“ƒ Bluetooth Keyboard

๐Ÿ“ƒ Bluetooth Mouse

๐Ÿ“ƒ Timers

๐Ÿ“ƒ Database

๐Ÿ“ƒ Events

๐Ÿ“ƒ System (exit, sleep, rand)

๐Ÿ“ƒ Objects (card, time)

Language

๐Ÿ“ƒ Summary

๐Ÿ“ƒ Comments

๐Ÿ“ƒ Variable Declarations

๐Ÿ“ƒ Operators

๐Ÿ“ƒ Control Flow

๐Ÿ“ƒ Functions

๐Ÿ“ƒ Numbers

๐Ÿ“ƒ Strings

๐Ÿ“ƒ Arrays

๐Ÿ“ƒ Objects

๐Ÿ“ƒ Uint8Array