KY-034
KY-034 is 7-Colour LED flash-module manufactured by Joy-IT.
- Part of the KY-034-Joy comparator family.
- Part of the KY-034-Joy comparator family.
description
1 3 Pinout 2 4 Code example Arduino 2 5 Code example Raspberry Pi 3
Picture
Technical data / Short description
If you connect this module with a power supply, a LED will light up which changes its colour automatically. It includes 7 different colours.
Voltage range: 3,3V
- 5V
Export: 16.06.2017
Copyright by Joy-IT
- Published under CC BY-NC-SA 3.0
Page 151 of 214
KY-034 7 Colour LED flash-module
Pinout
Code example Arduino
This code example shows how you can switch a LED on for 4 seconds and than off for 2 seconds via defined output pin. int Led = 13; void setup () { pin Mode (Led, OUTPUT); // Initialization of the LED output pin } void loop () // main program loop { digital Write (Led, HIGH); // LED will be switched on delay (4000); // waitmode for 4 seconds digital Write (Led, LOW); // LED will be switched off delay (2000); // waitmode for another 2 seconds }
Connections Arduino:
Sensor Signal Sensor [N.C] Sensor GND
= [Pin 13] = = [Pin GND]
Example program download:
KY-034_7-color-led-flash-module
Export: 16.06.2017
Copyright by Joy-IT
- Published under CC BY-NC-SA 3.0
Page 152 of 214
KY-034 7 Colour LED flash-module
Code example Raspberry Pi
# Needed modules will be imported and configured import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) # Declaration of the input pin which is connected with the sensor. # Additional to that the pull up resistor from the input will be activated. LED_PIN...