Rainbow on Earth and in Space
While the father and son wandered through the warehouse in search of provisions and necessary repair tools, the mother and daughter remained in the cabin. Immersed in an atmosphere filled with the quiet rustle of the ship’s life support systems, they sat side by side. Little Melia looked at her mother with interest, who was about to tell her something amazing.
“Melia, ” Lirania began with a soft smile, “have you ever wondered how light works? Why is it different? How do colors mix and create new ones?”
The girl thought for a moment before answering: “Well, I saw a rainbow on Earth… before we flew away. It’s so beautiful! But why do all those colors appear?”
“Ah, the rainbow… It’s one of the most magical phenomena you can see on Earth,” her mother sighed, recalling the days when they studied humans at the institute while living on their home planet in the Proxima Centauri system. “Light, like many things in nature, consists of different elements. When sunlight passes through the atmosphere and water droplets, it refracts and separates into the different colors that we see as a rainbow.”
“This happens because light can be decomposed into its constituent colors: red, orange, yellow, green, light blue, dark blue, and violet. On the ship, we use LEDs that can shine in any color. Today, I’ll show you how to create a rainbow right here.”
The mother took out a small LED module, looking like a tiny cube, and plugged it into the Arduino board.
“This is a special LED,” she continued. “It consists of three small LEDs: Red, Green, and Blue, all assembled in one housing. These LEDs are called RGB because they can create all the colors of the rainbow by mixing these three base colors.”
“We will connect the red LED to Pin 3, the green to Pin 5, and the blue to Pin 6. Watch, now the LEDs will light up and smoothly change color.”
Lirania loaded the program into the Arduino, and the LED began to blink red, green, and blue in turn.
“Now, Melia, we will try to make them fade in and out smoothly. We will use commands to send an analog signal from 0 to 255 – this way the LED will gradually gain brightness and then fade again.”
“It’s so beautiful,” Melia whispered, mesmerized by the shimmering light.
“But that’s not all!” Lirania smiled. “We can mix all three colors simultaneously to create any shade. Look at how computer screens on Earth work. Every image consists of millions of tiny dots of light called pixels.”
“A pixel is the smallest element of a screen. Each pixel consists of several LEDs, most often three: red, green, and blue – just like our module. When pixels glow with different intensities, they create an image. For example, if all three LEDs in a pixel are at full power, the pixel will be white. If only the red one is on, the pixel will be red.”
“So all pictures are made of little dots?” Melia looked at her mother in surprise.
“Yes, exactly. These dots are created by LEDs turning on and off millions of times per second. LEDs are very efficient – they don’t heat up like incandescent lamps and last much longer.”
“Now let’s try to create a real rainbow.”
The mother entered a few commands, and the LED began to cycle through the spectrum: red, orange, yellow, green, cyan, blue, and finally violet. The light painted a rainbow stripe across the dark walls of the cabin.
“Mom! We made a rainbow!” Melia clapped her hands. “Just like on Earth!”
“Yes, sweetheart. Even here, far from Earth, we can create something beautiful with our own hands,” her mother replied, gently stroking Melia’s head. “Everything in this world is made of simple things, like light. We just have to understand how they work.”
Melia beamed with happiness as the colors continued to flow smoothly into one another, filling the cabin with rainbow light.
