Arduino Project

Arduino RGB LED Color Mixer with Push Buttons

Kit purchase

Looking for parts? Check out our all-in-one kits below — packed with components, beginner-friendly guides, and tons of fun.

2.webp__PID:7d088a16-8752-49fb-8b1f-f9bba7297987

Name

Includes Arduino board

PURCHASE LINK

Ultimate Sensor Kit

Arduino Uno R4 Minima

Elite Explorer Kit

Arduino Uno R4 WiFi

3 in 1 Ultimate Starter Kit

Arduino Uno R4 Minima

Universal Maker Sensor Kit

×

Course Introduction

In this lesson, you’ll use an RGB LED and four buttons with the Arduino UNO R4 WIFI to create an interactive color palette.

Press the red, green, or blue button to display a color. Short-press the function button to mix in another color, or long-press it to clear the current color.

Note

If this is your first time working with an Arduino project, we recommend downloading and reviewing the basic materials first.

1.1 Install Arduino IDE(Important)
1.2 Introduction of Arduino IDE

Required Components

In this project, we need the following components:

SN

COMPONENT INTRODUCTION

QUANTITY

PURCHASE LINK

1

Arduino UNO R4 WIFI

1

2

USB Type-C cable

1

×

3

Breadboard

1

4

Wires

Several

5

Button

4

6

RGB LED

1

7

220Ω resistor

3

Wiring

3.png__PID:84fca225-5128-4d4a-b93e-0214c07ff5f8

Common Connections:

RGB LED
Blue pin:
Connect the LED Blue pin to a 220Ω resistor, then to 10 on the Arduino.
Green pin: Connect the LED Green pin to a 220Ω resistor, then to 11 on the Arduino.
Red pin: Connect the LED Red pin to a 220Ω resistor, then to 9 on the Arduino.
Long pin: Connect the LED long pin to the negative power bus on the breadboard.

Button
Blue Button:
Connect to the negative power bus on the breadboard, and the other end to 8 on the Arduino board.
Green Button: Connect to the negative power bus on the breadboard, and the other end to 4 on the Arduino board.
Red Button: Connect to the negative power bus on the breadboard, and the other end to 2 on the Arduino board.
Plus Button: Connect to the negative power bus on the breadboard, and the other end to 12 on the Arduino board.

Writing the Code

Note
You can copy this code into Arduino IDE.
Don’t forget to select the board(Arduino UNO R4 Minima/WIFI) and the correct port before clicking the Upload button.