Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

DANCING RGB CHASE ILLUSTRATED

GRAPHICALLY
A PROJECT REPORT
Submitted by

SHAHNA S
[Register No:2122J0949]
Under the guidance of

Mr. MICHAEL RAJ S, MCA., M.Phil., (Ph.D.,)

[Asst.Professor & PG Coordinator, Department of


Computer Applications]

In partial fulfillment for the award of the degree

Of

BACHELOR OF COMPUTER APPLICATIONS

In

DEPARTMENT OF COMPUTER APPLICATIONS

NILGIRI COLLEGE OF ARTS AND SCIENCE

(AUTONOMOUS)

MARCH 2024
NILGIRI COLLEGE OF ARTS AND SCIENCE
(AUTONOMOUS)
DEPARTMENT OF COMPUTER APPLICATIONS
PROJECT WORK

MARCH - 2024

This is to certify that the project entitled

DANCING RGB CHASE ILLUSTRATED


GRAPHICALLY
Is a bonafide record of project work done by

SHAHNA S

[Register No:2122J0949]

Bachelor of Computer Applications during the year 2021-2024

Project Guide Head of the Department

Submitted for the project viva-voce examination held on..............................

Internal Examiner External Examiner


DECLARATION

I hereby declare that the project work, “DANCING RGB CHASE ILLUSTRATED
GRAPHICALLY ” submitted to Nilgiri College of Arts & Science (Autonomous), in partial
fulfillment of the requirements for the award of degree Bachelor of Computer Applications, is a
record of original project work done by me ,during the period of December 2023 to March 2024 under
the guidance of Mr. MICHAEL RAJ S, MCA., M.Phil., (Ph.D.,)Asst.Professor & PG Cordinator,
Department of ComputerApplications, Nilgiri Collegeof Arts and Science(Autonomous), Thaloor.

SHAHNA S

Signature of the Student

PLACE :

DATE :
ACKNOWLEDGEMENT

I hereby express my sincere gratitude to the people, whose cooperation has helped me for the
successful completion of my project work. I would like to thank them deep from my heart, for the
valuable assistance they rendered for me.

I express my deep sense of gratitude to our honorable Principal In charge Dr. SENTHIL
KUMAR G, M.Sc., M.Phil., (Ph.D.,)Principal, Nilgiri College of Arts and Science
(Autonomous), for the outstanding facilities provided to carry out my project work.

I am extremely grateful display indebted to our Mr. P MUTHUKUMAR, MCA., M.Phil.,


B.Ed., (Ph.D.,) Head, Department of Computer Applications, Nilgiri College of Arts and Science
(Autonomous)Thaloor, for the valuable facilities and help provided to me.

I express my deep sense of esteem to my guide Mr.MICHAEL RAJ S, MCA., M.Phil.,


(Ph.D.,)Asst.Professor & PG Cordinator, Department of Computer Applications, Nilgiri College
of Arts and Science (Autonomous) Thaloor, for all his encouragement, valuable advice and timely
instructionsat various stages of my project work.

I am thankfully recollecting the helping mentality and kind cooperation rendered by my


intimate friends, family and all my dear and near ones for the successful completion of my project
work

SHAHNA S
LIST OF FIGURES

Fig 1 : We used a vision AI kit.

Fig 2 : Graphical representation in monitor

Fig 3: Arduino with LED light

Fig 4 : RED color image.

Fig 5 : GREEN color image.

Fig 6 : BLUE color image.


Fig 7 : NO color

In these figure shows that blinking of the LED light is in RGB colour.
LIST OF ABBREVIATIONS

• RGB: Red, Green, Blue


• LED: Light-Emitting Diode
• Chase: Sequentially changing the color or position of lights
• GR: Graphical Representation
• Matplotlib: A plotting library for Python
• API: Application Programming Interface
• GUI: Graphical User Interface
• Arduino: An open-source electronics platform
ABSTRACT

This project explores the dynamic and visually captivating realm of light art through
the implementation of a dancing RGB LED chase. The RGB LED, serving as a vibrant canvas
of color, engages in a lively dance characterized by randomized transitions and intensity
variations. The graphical representation of this dance is visually depicted using a real-time plot
generated through the Matplotlib library in Python. The project encompasses both hardware
and software components, with an Arduino microcontroller orchestrating the behavior of the
RGB LED based on serial commands received from a Python script. The Python script employs
the Matplotlib library to create a dynamic graphical representation, reflecting the real-time
changes in the LED's color composition. The abstract highlights the fusion of artistic
expression and technical innovation, providing an engaging and interactive experience.
Through the dance of light, this project seeks to captivate observers, offering a unique synthesis
of technology and visual aesthetics.
TABLE OF CONTENTS

S.NO TITLE PAGE No

1 PROBLEM DEFINITION 1

1.1.1 Overview
1.1.2 Problem Statement

2 INTRODUCTION 2

2.1 System Specification


2.1.1 Hardware Specification
2.1.2 Software Specification
3 SYSTEM STUDY 4

3.1 Existing System


3.1.1 Drawbacks
3.2 Proposed System
3.2.1 Features

4 LITERATURE SURVEY 7

5 8
SYSTEM DESIGN AND DEVELOPMENT
5.1 Input Design
5.2 Output Design
5.3 Description of Modules

6 TESTING AND IMPLEMENTATION 12

7 CONCLUSION 16

8 SCOPE OF FUTURE ENHANCEMENT 17

9 REFERENCES 18

10 APPENDICES 19
DIAGRAMS
SAMPLE CODING
SAMPLE INPUT
SAMPLE OUTPUT
PROBLEM DEFINITION
1. PROBLEM DEFINITION

1.1.1 OVERVIEW

The "Dancing RGB LED Chase with Graphical Representation" project seamlessly combines
artistic expression with technological innovation, resulting in a captivating visual experience. In a
synchronized display where the screen showcases RGB colors, a corresponding RGB LED chase
would mirror these colors in real-time, creating a harmonious visual experience across both
mediums. As the colors on the screen change, the LED chase follows suit, maintaining pace and
consistency to reflect the dynamic shifts in hues and intensities.

Once synchronized, the LED chase faithfully replicates the colors and transitions displayed
on the screen, creating a cohesive visual experience that seamlessly integrates digital and physical
elements. This synchronization can be further enhanced with additional effects, such as fading,
pulsing, or strobing, to add depth and dynamism to the LED chase display.

The LED chase faithfully replicates the colors and transitions displayed on the screen,
creating a cohesive visual experience that seamlessly integrates digital and physical elements. This
synchronization can be further enhanced with additional effects, such as fading, pulsing, or strobing,
to add depth and dynamism to the LED chase display.

This synchronization ensures a seamless integration between the digital and physical realms,
allowing viewers to immerse themselves fully in the captivating display. Graphically, imagine the
LED chase replicating the color patterns and transitions displayed on the screen, with each LED
representing a pixel or group of pixels, faithfully reproducing the visual content in a tangible,
luminous form. This integration of RGB LED chases with screen displays offers a multi-dimensional
spectacle, enriching the visual landscape with vibrant colors and dynamic movements that captivate
and engage audiences in various contexts, from entertainment events to interactive installations.

1
1.1.2 PROBLEM STATEMENT

In the real time project of interactive light displays, there exists a gap in projects that
seamlessly blend artistic expression with technological innovation, providing a captivating visual
experience for observers. The absence of a comprehensive solution combining the dynamic
choreography of an RGB LED with real-time graphical representation inhibits the creation of
engaging and interactive light art.

In the realm of visual displays, the integration of RGB LED chases has become increasingly
popularfor creating captivating and dynamic spectacles. These LED chases involve a sequence of
lights transitioning through various colors in a synchronized manner, often accompanied by music
or other rhythmic elements. However, ensuring perfect synchronization between the RGB LED
chaseand a screen displaying RGB colors presents a significant technical challenge.

One of the primary obstacles is achieving real-time coordination between the RGB LED
chase system and the screen displaying RGB colors. Currently, many LED chase systems operate
independently of external inputs, relying solely on pre-programmed sequences or basic control
interfaces. This lack of integration with external devices such as screens limits the system's ability
to adapt to dynamic visual content.

Furthermore, achieving precise color matching between the RGB LED chase and the
screen poses another hurdle. RGB LED chases typically utilize a combination of red, green, and
blue LEDs to create a wide range of colors. However, variations in LED characteristics,
environmental factors, and control algorithms can result in discrepancies between the colors
produced by the LED chase and those displayed on the screen. Achieving seamless color
consistency between the two is essential for creating a visually cohesive experience.

2
INTRODUCTION
2. INTRODUCTION

Light has the profound ability to evoke emotions, create ambiance, and transcend the
boundaries of traditional artistic expression. In the intersection of technology and art, this project
introduces a mesmerizing spectacle: the Dancing RGB LED Chase with Graphical Representation.
This undertaking delves into the harmonious synergy of dynamic color transformations in an RGB
LED and the real-time graphical representation of this dance.

Complementing the dynamic LED performance, a Python script orchestrates the real-time
graphical representation of the dance using the Matplotlib library. Through this graphical medium,
observers are granted a window into the ephemeral and ever-changing landscape of color, intensity,
and movement. The visual representation acts as both an artistic expression and a technical
visualization, encapsulating the essence of the LED's dance

In this synthesis of technology and art, the project aspires to transcend the conventional
boundaries of visual representation. By immersing observers in the dynamic interplay of light and
color, it aims to stimulate curiosity, provoke contemplation, and showcase the infinite possibilities
when art and technology converge. This introduction sets the stage for an exploration into the
intricacies of the Dancing RGB LED Chase and the vivid world it unveils.

3
2.1SYSTEM SPECIFICATION

2.1.1 Hardware Requirement:

Processor : RYZEN 7 , Processor

RAM : 16GB

ROM : 512 GB

2.1.2Software Requirement:

Front End : Python , CPP

Operating system: windows 11

4
SYSTEM STUDY
3. SYSTEM STUDY

The system for synchronizing a screen displaying RGB content with a corresponding
RGB LED chase involves real-time data processing and transmission. Initially, the system
captures the RGB data from the screen, converting it into a format compatible with the LED
chase. This processed data is then transmitted to the LED chase controller, which interprets the
information and adjusts the LEDs accordingly. To ensure seamless synchronization, precise
timing mechanisms are employed to match the display on the screen with the LED chase in real-
time. Additionally, software algorithms may be utilized to optimize color accuracy and transition
smoothness, guaranteeing a faithful replication of the screen content in the LED chase.

3.1 EXISTING SYSTEM

An existing system for synchronizing a screen displaying RGB content with an RGB LED
chase employs real-time data processing algorithms. These algorithms analyze the RGB values of
the screen pixels and translate them into commands for the LED chase controller. Through this
synchronization, the LED chase mirrors the colors and patterns displayed on the screen in perfect
harmony, creating an immersive visual experience. This system utilizes advanced technologies such
as computer vision and signal processing to ensure precise synchronization between the screen and
the LED chase, resulting in a seamless integration of digital content with physical lighting effects.

3.1.1 Drawbacks

 Limited Color Range.

 Dependency on Screen Content.

 Inability to Create Unique Effects.

 Synchronization Challenges.

 Complexity in Implementation.

 Limited Flexibility.

5
3.2 PROPOSED SYSTEM

The proposed system for synchronizing the screen's RGB display with the LED chase
involves real-time communication between the screen output and the LED controller. Through a
dedicated interface or software integration, the system captures the RGB values displayed on the
screen and translates them into corresponding commands for the LED chase. This ensures that the
colors displayed on the screen are mirrored accurately in the LED chase, creating a seamless and
synchronized visual experience. By dynamically updating the LED chase in response to changes on
the screen, the system delivers an immersive and cohesive display across multiple mediums,
enhancing the overall visual impact.

3.2.1 Features

 Real-time Synchronizattion

 Dynamic Color Matching

 Smooth Transition

6
LITERATURE SURVEY
4. LITERATURE SURVEY

RGB LED Control and Visualization:

• "Arduino-Based Interactive RGB LED Strip Control System with Graphical User
Interface" by T. Nguyen, et al. (2019): This paper details an Arduino-based system for
controlling RGB LED strips using a graphical user interface. It provides insights into the use of
Python libraries like "adafruit_circuitpython_neopixel" for interfacing with LEDs and visualizing
color patterns.

• "Interactive LED Strip Visualization with Processing" by J. Sánchez, et al. (2015):


This work explores the use of Processing, a creative coding environment, to create interactive
visualizations for RGB LED strips. It demonstrates the potential for generating dynamic and
complex visual effects.

Dance and Technology Integration:

• "Interactive Dance Systems: A Review of the State of the Art" by S. Benford, et al.
(2010): This survey provides a comprehensive overview of interactive dance systems, examining
different technologies used to capture movement and create responsive environments. It offers
valuable insights into the diverse approaches to integrating technology and artistic expression in
dance.

• "Dancing with Robots: Exploring the Potential of Robotics in Dance Performance"


by H. Zanoaga, et al. (2019): This study explores the use of robots in dance performances,
highlighting the potential for new forms of collaborative expression between humans and
machines. It suggests that technology can serve as a tool to enhance and augment dance, rather
than replace it.

7
SYSTEM DESIGN AND DEVELOPMENT
5. SYSTEM DESIGN AND DEVELOPMENT

To design and develop a system for creating a synchronized RGB LED chase that mirrors the
colors displayed on a screen, several components and processes are involved. Firstly, the system
requires a microcontroller or a computer capable of processing video input from the screen. This
could be achieved using technologies such as Arduino, or specialized LED controllers. The
video input is analyzed in real-time to extract the RGB color information from the pixels being
displayed on the screen.Once the RGB color data reaches the LED chase system, it is translated
into control signals for the individual LEDs. Each LED in the chase is assigned a specific color
based on the corresponding pixel color from the screen. The system then orchestrates the LEDs
to transition smoothly between colors, creating the illusion of a synchronized chase effect.

Throughout the development process, testing and iteration are essential to ensure that the
LED chase system accurately reflects the colors displayed on the screen in real-time. Once the
system is functioning as intended, it can be integrated into various applications such as
entertainment displays, ambient lighting setups, or interactive installations, adding a dynamic
visual element thatenhances the overall experience.

8
5.1 INPUT DESIGN

To synchronize the display of RGB colors on the screen with the RGB LED chase, a real-
time communication link and control mechanism are essential. One effective approach is to
implement a software system that continuously monitors the RGB values being displayed on the
screen and then transmits this information to the LED controller. This controller would interpret the
RGB values and adjust the LEDs accordingly to mimic the colors shown on the screen.

The design for this synchronization system involves several components. Firstly, a screen
capture module is needed to capture the RGB values of pixels being displayed on the screen. This
module would continuously sample the screen at a high frame rate to ensure real-time
responsiveness.

The LED controller itself should be capable of receiving RGB color data and translating it
into control signals for the LEDs. This could involve adjusting the intensity levels of the red, green,
and blue components of each LED to match the desired color.

Fig 1 : We used a vision AI kit.

9
5.2 OUTPUT DESIGN

To achieve synchronized output between the screen displaying RGB colors and the LED
chase, a seamless integration of hardware and software components is necessary. Firstly, the
system would require a means to capture the RGB colors being displayed on the screen in real-
time. This could involve utilizing a screen capture software or hardware device that can analyze
the pixel data and extract the RGB values. Once the RGB data is captured, it needs to be
transmitted to a microcontroller or computer controlling the LED chase.

The microcontroller or computer would then process the RGB data and translate it into
control signals for the LEDs..From a design perspective, the output system could feature a
graphical user interface (GUI) where users can adjust settings such as brightness, speed, and
color effects. The GUI could also provide visual feedback, displaying a representation of the
LED chase alongside the screen content to preview how the colors will be translated onto the
LEDs. This visual feedback could include a graphical representation of the LED chase, showing
the current position of each LED and the color it is displaying.

Fig 2: Graphical representation in monitor


10
5.3 DESCRIPTION OF MODULES

1. LED Strips or Panels: These are the physical components containing the RGB LEDs
arranged in a linear or grid formation. LED strips are flexible and can be easily mounted in
various configurations, while LED panels offer a more structured layout. Both types allow for the
creation of visually appealing chases.

2. Microcontroller or LED Controller: A microcontroller or LED controller is the brain of the


system. It controls the behavior of the LEDs based on the input received, which could be from a
computer, a sensor, or predefined patterns. Microcontrollers like Arduino or Raspberry Pi are
commonly usedfor this purpose due to their versatility and programmability.

3. Input Source: This could be a computer screen or any other source providing RGB color
information. The input source sends signals to the microcontroller indicating the color values to
be replicated in the LED chase.

4. Software Algorithm: The microcontroller runs a software algorithm that interprets the
RGB color values from the input source and translates them into commands for controlling the
LEDs. This algorithm determines the timing, sequence, and intensity of LED transitions to create
the desired chase effect.

5. Power Supply: LEDs require power to operate, so a reliable power supply is essential to
ensure consistent performance. The power supply should be capable of delivering sufficient
voltage and current to drive all the LEDs in the strip or panel.

11
TESTING AND IMPLEMENTATION
6. TESTING AND IMPLEMENTATION

Testing is a set of activities that can be planned in advance and conducted.


Systematically, this is aimed at ensuring that the system works accurately and efficiently before
live operations commences.
● Testing Is the process of correcting a program with the intent of finding an
error.
● A good test case is one that has a high probability of finding a yet
undiscovered error.
● A successful test is one that uncovers a yet undiscovered error.

Testing objectives
There are several rules that can serve as testing objectives

● Testing is a process of executing a program with the intent of finding an error.


● A good test case is one that has a high probability of finding an undiscovered
error.
● A successful test is one that uncovers an undiscovered error.

Testing is vital to the success of the system. System testing makes a logical assumption
that all parts of the system are subject to a variety of tests on-line response, volume, stress,
recovery and security and usability tests. A series of tests are performed before the system is ready
for user acceptance testing.

Testing Strategies
● Manual Testing
● Usability Testing
● Acceptance Testing

Manual Testing

This testing is performed without taking help of automated testing tools. The software
tester prepares test cases for different sections and levels of the code, executes the tests and reports
the result to the manager. Manual testing is time and resource consuming. The tester needs to
confirm whether or not the right test cases are used. Major portion of testing involves manual
testing.

12
Usability Testing

Usability testing refers to evaluating a product or service by testing it with representative


users. Typically, during a test, participants will try to complete typical tasks while observers
watch, listen and take notes. The goal is to identify any usability problems, collect qualitative and
quantitative data and determine the participant's satisfaction with the product.Usability testing lets
the design and development teams identify problems before they are coded. The earlier issues are
identified and fixed, the less expensive the fixes will be in terms of both staff time and possible
impact to the schedule. Thus the proposed system under consideration has been tested by usability
testing & found to be working successfully. Also it satisfy the following conditions :

● To know the participants are able to complete specific tasks successfully.

● Identify how long it takes to complete specific tasks.

● Find out how satisfied participants are with your Web site or other product.

● Identify changes required to improve user performance and satisfaction.

● And analyze the performance to see if it meets your usability objectives.

Acceptance Testing

When the software is ready to hand over to the customer it has to go through the last phase
of testing where it is tested for user-interaction and response. This is important because even if
the software matches all user requirements and if the user does not like the way it appears or
works, it may be rejected.

Alpha testing - The team of developers themselves perform alpha testing by using the system
as if it is being used in a work environment. They try to find out how users would react to some
action in software and how the system should respond to inputs.

Beta testing - After the software is tested internally, it is handed over to the users to use it
under their production environment only for testing purpose. This is not yet the delivered product.
Developers expect that users at this stage will bring minute problems, which were skipped to
attend.

13
Libraries:

 Open CV
OpenCV (Open Source Computer Vision Library) is a popular open-source library
for computer vision and image processing tasks.
 Cvzone
Cvzone is a Python library built on top of OpenCV, designed to simplify computer
vision tasks and streamline the development process.

14
IMPLEMENTATION

Hardware Setup:
Gather necessary hardware components, including an Arduino board, LEDs, and any
required peripherals.
Connect the LEDs to the Arduino board and ensure they are properly powered and wired.

Software Installation:
Install the Arduino IDE on your computer and set up the Arduino board for programming.

Install OpenCV library and any dependencies on your graphical representation

Arduino Programming:
Write Arduino code to receive gesture commands from the computer via serial
communication.
Implement functions to control the LEDs based on the received commands

Integration and Deployment:


Integrate all components of the system, including hardware and software, into a cohesive unit.

User Training :
Provide user training on how to interact with the LED using graphical representation

15
CONCLUSION
7. CONCLUSION

The implementation of the dancing RGB LED chase with graphical representation has
successfully demonstrated the creative potential of combining software and hardware to create
visually engaging light displays. The integration of Python programming, particularly using
libraries such as Matplotlib, has allowed us to simulate a dynamic and vibrant RGB LED chase
pattern.

Throughout the project, we explored the generation of RGB sequences to create a visually
appealing chase effect. The graphical representation using Matplotlib provided a convenient way
to visualize the simulated LED behavior, aiding in the understanding of the dynamic nature of the
RGB LED pattern.As a result of this project, we gained insights into the coordination and control
of RGB LEDs to produce lively and dynamic visual effects. The code provided offers a
foundation for future projects involving physical RGB LEDs and can be adapted for real-world
applications, such as ambient lighting, entertainment systems, or interactive installations.

In conclusion, the dancing RGB LED chase project has successfully merged
programming, electronics, and visualization to create a captivating display that not only
entertains but also opens up avenues for exploration in both technical and artistic realms.

16
SCOPE OF FUTURE ENHANCEMENT
8. SCOPE OF FUTURE ENHANCEMENT

The future of RGB graphics chairs lies in technological innovation, with advancements in
LED efficiency and color vibrancy. Customization will be key, with software allowing users to
sync lighting with games and smart homes. Material innovations may improve light diffusion,
while interactivity could see chairs responding to users’ actions for an immersive experience.
Marketing will likely expand, highlighting chairs in gaming events and on social media.
Sustainability will also become a focus, with eco-friendly designs reducing environmental impact.
The representation of RGB in computer graphics will remain vital, as it’s a primary color model
for display devices, essential for image representation and digital media creation.

17
REFERENCES
9. REFERENCES

Bradski, G. Opencv. Retrieved from OpenCV: https://opencv.org/

Hassan, M. cvzone. Retrieved from https://www.computervision.zone/

OpenAI. (2022). Github. Retrieved from https://github.com/openai/gpt-3.5-turbo

Rosebrock,CV ZONE. Retrieved from Computer Vision Zone: https://www.computervision.zone/

18
APPENDICES
10. APPENDICES

A. USE CASE DIAGRAM

User

RGB Graphics chaise

SYSTEM
Light Source

Power On/Off

USER

19
B) ARDUINO CODE:

const int redPin = 9;


const int greenPin = 10;
const int bluePin = 11;

void setup() {
Serial.begin(9600);
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}

void loop() {
if (Serial.available() > 0) {
char command = Serial.read();
switch (command) {
case 'r':
setColor(255, 0, 0);
break;
case 'g':
setColor(0, 255, 0);
break;
case 'b':
setColor(0, 0, 255);
break;
case 'o':
setColor(0, 0, 0);
break;
}
}
}

void setColor(int red, int green, int blue) {


analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}

20
C) PYTHON CODE:

import serial
import time
import cv2
arduino = serial.Serial('COM7', 9600, timeout=.1)
imgledonR = cv2.imread("C:/Users/SHAHNA /Desktop/project ict/Rgb/red led.jpg")
imgledonG = cv2.imread("C:/Users/SHAHNA/Desktop/project ict/Rgb/green led.jpg")
imgledonB = cv2.imread("C:/Users/SHAHNA/Desktop/project ict/Rgb/blue led.jpg")
imgledoffB = cv2.imread("C:/Users/SHAHNA/Desktop/project ict/Rgb/off.jpg")

def send_command(command):
arduino.write(command.encode())

try:
while True:

cv2.imshow("LED", imgledonR)
cv2.waitKey(100)
send_command('r')
time.sleep(1)

cv2.imshow("LED", imgledonG)
cv2.waitKey(100)
send_command('g')
time.sleep(1)

cv2.imshow("LED", imgledonB)
cv2.waitKey(100)
send_command('b')
time.sleep(1)

cv2.imshow("LED", imgledoffB)
cv2.waitKey(100)
send_command('o')
time.sleep(1)
except KeyboardInterrupt:
arduino.close()

21
D) OUTPUT:

Fig 3: Arduino with LED light

Fig 4 : RED color image. Fig 5 : GREEN color image.

22
Fig 6 : BLUE color image. Fig 7 : NO color

23

You might also like