.............. 1 3 Pinout ............. 2 4 Code example Arduino ...........
7 Copyright by Joy-IT - Published under CC BY-NC-SA 3.0 Page 22 of 214 KY-004 Button-module Pinout Code example Arduino This example will light up a LED after the button is pressed. The module KY-011, KY-016 or KY-029 can be used as a LED. int Led = 13 ;// Declaration of the LED-output pin int Sensor = 10; // Declaration of the sensor input pin int val; // Temporary variable void setup () { pinMode (Led, OUTPUT) ; // Initialization output pin pinMode (Sensor, INPUT) ; // Initialization sensor pin digitalWrite(Sensor, HIGH); // Activating internal pull-up resistor } void loop () { val = di.
No. | Partie # | Fabricant | Description | Fiche Technique |
---|---|---|---|---|
1 | KY-001 |
Joy-IT |
Temperature sensor module | |
2 | KY-002 |
Joy-IT |
Vibration-switch module | |
3 | KY-003 |
Joy-IT |
Hall Magnetic Field Sensor | |
4 | KY-005 |
Joy-IT |
Infrared Transmitter module | |
5 | KY-006 |
Joy-IT |
Passiv Piezo-Buzzer module | |
6 | KY-008 |
IMRAD |
Laser module | |
7 | KY-008 |
ETC |
Laser sensor module | |
8 | KY-008 |
ETC |
Laser module | |
9 | KY-008 |
ETC |
Laser head sensormodule | |
10 | KY-008 |
AZ-Delivery |
Laser Transmitter module | |
11 | KY-009 |
Joy-IT |
RGB LED SMD module | |
12 | KY-010 |
Joy-IT |
Light barrier-module |