LED Show using Arduino Esplora

This example shows you how to read the values from the joystick. The output will be displayed through the serial monitor and as a color on the RGB LED.

LED Show using Arduino Esplora

The joystick has two axes, X and Y. Each axis controls a color of the RGB LED: red with the X-axis, and green with the Y-axis. The brightness of the blue element will be controlled by the position of the linear potentiometer.

Circuit

Only your Arduino Esplora is needed for this example.

LED Show using Arduino Esplora circuit

joystick and slider to control the color of the RGB led on the Esplora

Code

The RGB LED is comprised of three colors that represent the three primary colors: red, green, and blue. Each of these light’s brightness is individually controllable with functions in the Esplora library:

If you want to control all the colors with one instruction you can use the writeRGB() function.

Moving the joystick and changing the position of the linear potentiometer will generate different values. These values are used to produce two different outputs: one will appear by opening the serial monitor, and the other is displayed physically through the RGB led.

 

/*
Esplora LED Show

Makes the RGB LED bright and glow as the joystick or the
slider are moved.

Created on 22 november 2012
By Enrico Gueli <[email protected]>
Modified 22 Dec 2012
by Tom Igoe
*/

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]

Hardware Required

  • Arduino Esplora

[/box]

For more detail: LED Show using Arduino Esplora


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top