Code Monkey home page Code Monkey logo

rgb-controlled-by-pwm's Introduction

RGB-controlled-by-PWM

May 17 2021, Roy Ben Avraham;Mk;Ge

In this project we will learn how to control RGB using PWM and a Joystick.

To make it a little bit "complex" we won't use an RGB moudle or Joystick moudle BUT - 3 diffrent LEDS as an RGB and 2 potentiometers (one for each axis) as a joystick.

You can implement is as you wish :)

Lets start:

Color of the R G and B LED is controlled by an XY Joystick (two potentiometers and button).

Position of the XY-Joysticks is evaluated every 250ms by using a timer

The system can work at two modes:

Mode A:

X-axis of the joystick controlled G color intensity by using PWM

Y-axis of the joystick controlled R color intensity by using PWM

B color intensity is not changed

Intensity of the R, G, B are graphically shown on the serial Plotter

Mode B:

X-axis of the joystick controlled color intensity of all LEDs by using PWM

Y- axis of the joystick CHANGED R color intensity by using PWM G and B color

intensities are not changed Intensities of the R, G, B are

graphically shown on the serial Plotter.

ModeA:

In this plot we can see the graphs of LEDs intensity. The Red graph represent the blue LED, the yellow graphrepresent the red LED, and the blue graph represent the green LED.

image

ModeB:

In this plot we can see the graphs ofLEDs intensity.We switched from mode A to mode B by pushing the button in the beginning of themeasurement. TheRed graph represent the blue LED, the yellow graph represent the red LED, andthe blue graph represent the green LED.

image

Block diagram:

image

Electric circuit:

image

System layout:

image

rgb-controlled-by-pwm's People

Contributors

combowave avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.