Interfacing 2-color led module with evive

About This Tutorial
In this tutorial we will interface 2-color led module with evive and we will produces different color combination’s using this led
Tutorial Info

Components Required

ImageComponentQuantityAvailable in Kit
evive1
USB A-B Cable1
Male to Female Jumper Cable 10cm1
  • None

Introduction

The KY-011  2-color led is a handy littel component that allows two colors ( Red and Green) in a single LED while only having 3 pins 

  • Comman cathode pin 
  • Anode for green led 
  • Anode for  red  led

The KY-011 2-color led  emits red and green colors but by applying different voltages on anodes of led we can produce different colors ,we will use PWM pin’s of our evive board to generate different voltages ,click here for more information on PWM

 

Circuit diagram

 

  • Connect comman cathode pin of KY-011 module to ‘GND’  pin of evive
  • Connect anode of green LED to pin number 10 of evive
  • Connect anode of red LED to pin number 11 of evive

Arduino code

We have used two different ‘for’ loops in this code  , first for loop will increase the intensity of  “Red” led and second ‘for’ loop will increase the intensity of “Green” led 

Expected result

This helped
This didn't help
Share this Tutorial
Share on facebook
Facebook
Share on twitter
Twitter
Share on google
Google+
Share on pinterest
Pinterest
Share on reddit
Reddit
Share on print
Print
Related Projects & Tutorials
All articles loaded
No more articles to load
Featured Projects
Robotic-Arm-Bartender
DIY Robotic Arm Bartender

This project will show you how to make your own robotic arm bartender that will make you a star host!

All articles loaded
No more articles to load
Close Menu
×

Cart