{"id":1472,"date":"2021-11-16T18:41:12","date_gmt":"2021-11-16T17:41:12","guid":{"rendered":"https:\/\/www.onetimenexttime.sk\/arduino\/?post_type=product&#038;p=1472"},"modified":"2024-02-22T17:30:58","modified_gmt":"2024-02-22T16:30:58","slug":"ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027","status":"publish","type":"product","link":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/","title":{"rendered":"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"container\">\n<h1>KY-027 Magic Light Cup Sensor<\/h1>\n<table>\n<tbody>\n<tr>\n<th>Popis<\/th>\n<th>Vlastnosti<\/th>\n<\/tr>\n<tr>\n<td>V\u00fdrobca<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Model<\/td>\n<td>KY-027<\/td>\n<\/tr>\n<tr>\n<td>Pou\u017eitie<\/td>\n<td>Detekcia okolit\u00e9ho svetla<\/td>\n<\/tr>\n<tr>\n<td>Nap\u00e1janie<\/td>\n<td>3.3V &#8211; 5V DC<\/td>\n<\/tr>\n<tr>\n<td>Pinovanie<\/td>\n<td>AO, GND, +, S<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Pr\u00edklady pou\u017eitia:<\/h2>\n<p>Pr\u00edkladov\u00fd k\u00f3d pre Arduino:<\/p>\n<pre>        \/\/ Include the library\r\n        #include &lt;KY_027.h&gt;\r\n        \r\n        \/\/ Define the sensor pin\r\n        int sensorPin = A0;\r\n        \r\n        void setup() {\r\n          Serial.begin(9600);\r\n        }\r\n        \r\n        void loop() {\r\n          int lightLevel = analogRead(sensorPin);\r\n          Serial.print(\"Light Level: \");\r\n          Serial.println(lightLevel);\r\n          delay(1000);\r\n        }\r\n<\/pre>\n<p>Pr\u00edkladov\u00fd k\u00f3d pre ESPHome:<\/p>\n<pre>        sensor:\r\n          - platform: adc\r\n            pin: A0\r\n            name: \"Light Sensor\"\r\n            update_interval: 60s\r\n<\/pre>\n<p><button class=\"button\">Skop\u00edrova\u0165 k\u00f3d<\/button><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<header class=\"entry-header\">\n<h1 class=\"entry-title\">NodeMCU &amp; KY-027 Magic light cup\u00a0module<\/h1>\n<\/header>\n<div class=\"entry-content\">\n<p>The KY-027 is part of the\u00a0<a href=\"https:\/\/piandmore.wordpress.com\/2016\/02\/09\/37-arduino-sensors-nodemcu\/\">37 sensor set<\/a>.(just the KY-027 will cost you less than a Euro online). In short it\u2019s 2 components combined, a mercury tilt switch and a led. You can actually use this\u00a0<a href=\"https:\/\/piandmore.wordpress.com\/tag\/peripheral\">input sensor<\/a>\u00a0with just 2 batteries:<\/p>\n<ul>\n<li>Connect G to the \u2013 side of the battery pack<\/li>\n<li>Connect + to the + side of the battery pack<\/li>\n<li>Connect S (switch) to the L (LED)<\/li>\n<\/ul>\n<p>The magic is, when you tilt the switch, the led will turn on and off.<\/p>\n<p>Of course it is also possible to connect it to the\u00a0<a href=\"https:\/\/piandmore.wordpress.com\/category\/esp8266\/\">NodeMCU<\/a>.<\/p>\n<ul>\n<li>Connect G to a GND port of your NodeMCU<\/li>\n<li>Connect + to a 3.3v port of your NodeMCU<\/li>\n<li>Connect S to a digital port on your NodeMCU (in my example port D3)<\/li>\n<li>Connect L to a digital port on your NodeMCU (in my example port D5)<\/li>\n<\/ul>\n<p>Let\u2019s start with the led:<\/p>\n<pre>gpio.mode(5,gpio.OUTPUT)\r\ngpio.write(5,gpio.HIGH)\r\n-- this should turn on the led\r\ngpio.write(5,gpio.LOW)\r\n-- this should turn off the led<\/pre>\n<p>The mercury tilt is essentially a switch:<\/p>\n<pre>gpio.mode(3,gpio.INPUT)\r\nprint(gpio.read(3))\r\n-- tilt the switch and re-execute the above statement<\/pre>\n<p>A 1 means the switch is not making contact, a 0 means there is a contact (the tit.<br \/>\nNow to combine this with a\u00a0<a href=\"https:\/\/piandmore.wordpress.com\/2016\/01\/14\/triggered-action-on-nodemcu\/\">trigger<\/a>, turn the led off if the switch is upright (and making contact) and turn the led on if there is no contact:<\/p>\n<pre>gpio.trig(3,\"both\",function(level) gpio.write(5,level) end)<\/pre>\n<div id=\"atatags-370373-65d775d6d5bac\"><\/div>\n<div id=\"jp-post-flair\" class=\"sharedaddy sd-like-enabled sd-sharing-enabled\">\n<div class=\"sharedaddy sd-sharing-enabled\">\n<div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\">\n<h3 class=\"sd-title\">___________<\/h3>\n<h1 style=\"font-weight: 400;\">KY-027 magic light cup Tilt Switch Module with Arduino<\/h1>\n<p style=\"font-weight: 400;\"><a href=\"https:\/\/www.blogger.com\/profile\/04455636703022533470\">simply iot sensors<\/a>October 16, 2021<\/p>\n<p>How to use magic light cup KY-027 with Arduino and how the magic light cup module work are some questions that may arise in your mind while programming an Arduino.<\/p>\n<p>Hello guys! Welcome back to my blog today. We are going to see about the magic light cup (KY-027) sensor.<\/p>\n<h1 style=\"font-weight: 500;\">What is Magic Light Cup Tilt Switch??<\/h1>\n<p>The magic light cup module is a combination of an LED module and a Tilt switch module. The Mercury ball inside the Tilt switch causes the LED to TURN OFF and TURN ON. The tilt switch consists of a mercury ball.\u00a0it is sometimes called a mercury opening module<\/p>\n<p>&nbsp;<\/p>\n<p>A tilt switch is a switch that uses mercury as a conductive material to make electrical contact between two leads. A tilt switch consists of a tube inside which a mercury ball is used to make a contact between the lead terminals.<\/p>\n<h2 style=\"font-weight: 500;\">How does Magic Light Cup Tilt Switch Works??<\/h2>\n<p>When the tilt switch is placed at the vertical position, the mercury ball falls to the bottom of the tube, as is a good conductor of electricity it generates electrical contact between the lead terminal thus acting as a Closed circuit.<\/p>\n<p>When you change the position of the switch in the horizontal direction the mercury ball which was at the bottom rolls towards the side direction and hence there is no contact between the lead terminal, therefore, it acts as an Open-circuit.<\/p>\n<p>The circuitry of the module is such that when the mercury ball is at the bottom of the glass the voltage at the signal pin will be LOW and the led module will be turned OFF. When we roll the mercury ball the voltage at the signal pin will be HIGH and the led module will be turned ON.<\/p>\n<h2 style=\"font-weight: 500;\">Parts Required<\/h2>\n<ul style=\"font-weight: 400;\">\n<li>KY-027\u00a0(magic light cup Tilt Switch Module\u00a0Arduino)<\/li>\n<\/ul>\n<ul style=\"font-weight: 400;\">\n<li>Jumper wires<\/li>\n<\/ul>\n<ul style=\"font-weight: 400;\">\n<li>LED<\/li>\n<\/ul>\n<ul style=\"font-weight: 400;\">\n<li>Breadboard<\/li>\n<\/ul>\n<h3 style=\"font-weight: 500;\">Schematic Diagram<\/h3>\n<p>Connect the ground pin of the tilt switch to the ground pin of Arduino, the VCC pin to 5v, and the Signal pin to 8. Also, connect the positive lead of LED to Arduino pin 10.<\/p>\n<h4 style=\"font-weight: 500;\">Code<\/h4>\n<p>int ledmodule=8;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ Set led pin at Arduino pin 8<br \/>\nint tiltmodule=10;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ Set sensor pin at Arduino pin 10<br \/>\nint sensorvalue;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ initialize variable to store sensor data<br \/>\nvoid setup()<br \/>\n{<br \/>\npinMode(ledmodule,OUTPUT);\u00a0 \u00a0 \u00a0 \u00a0\/\/ LED pin set to output<br \/>\npinMode(tiltmodule,INPUT);\u00a0 \u00a0\/\/ tilt sensor pin set to input<br \/>\nSerial.begin(115200);\u00a0 \u00a0 \u00a0 \u00a0 \/\/ set baud rate for Serial communication<br \/>\n}<br \/>\nvoid loop()<br \/>\n{<br \/>\nsensorvalue = digitalRead(tiltmodule); \/\/ read values from sensor pin and store in variable<br \/>\nif (sensorvalue==HIGH)\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ checking conditions<br \/>\n{<br \/>\ndigitalWrite(ledmodule,HIGH);\u00a0 \u00a0\/\/ turn LED on<br \/>\nSerial.println(&#8220;Rolling&#8221;); \/\/ Print message<br \/>\n}<br \/>\nelse{<br \/>\ndigitalWrite(ledmodule,LOW);\u00a0 \u00a0\/\/ turn LED off<br \/>\nSerial.println(&#8220;Stable&#8221;);\u00a0 \u00a0 \u00a0 \u00a0\/\/ Print message<br \/>\n}<br \/>\ndelay(20);\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ delay<br \/>\n}<\/p>\n<p>First, initialize pins of sensors &amp; LED and variables. We have declared a variable name sensor value to read values from sensors. In the void setup, we configure pins as INPUT or OUTPUT. We want to read values from the sensor pin so we will declare it as INPUT. Also, we configure the baud rate to 115200.<\/p>\n<p>In a void loop, we continuously read values from the tilt switch and store values in variable name sensor value and we check here condition if it is HIGH or not. Normally by default sensor sends a low signal when the sensor is at a stationary position means the mercury ball is at the bottom and connects two leads to make a close circuit. And HIGH means mercury ball is moved away from two leads making the connection as open circuit, the sensor sends a HIGH signal to our Arduino which we printed as \u201cRolling\u201d. Here we have written code to turn ON led when there is a movement of the mercury ball.<\/p>\n<p>When the mercury ball is at the bottom of the tube connecting two leads then the sensor sends a LOW signal to Arduino which is printed as \u201cStable\u201c and the LED module connected to pin 10 will be turned OFF. We have introduced a delay of 20 milliseconds. The sensor output may differ depending upon the pull-up and pull-down onboard resistor.<\/p>\n<p><strong>Output<\/strong><\/p>\n<p>You can see output on the Serial monitor. When the tilt switch is at the stable position, the mercury ball is at the base then the output will be \u201cStable\u201d and when we make a move to the sensor such that the mercury ball goes away from the base of the tube, then sensor output will be \u201cRolling\u201d.<\/p>\n<p><strong>Conclusion &#8211;<\/strong><\/p>\n<p>Today we learn about what is a magic light cup, how to use a magic light cup\u00a0with Arduino &amp; working principle of the magic light cup.<\/p>\n<p><em>&#8220;I hope you find this IoT blog very helpful to you. In the upcoming lesson, we will see more about IoT sensors till then bye. See you all in my next blog.&#8221;<\/em><\/p>\n<p>_________________<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"container\">\n<h1>KY-027 Magic Light Cup Sensor<\/h1>\n<h2>Popis<\/h2>\n<p>Senzor KY-027 je jednoduch\u00fd senzor svetla, ktor\u00fd sa pou\u017e\u00edva na detekciu okolit\u00e9ho osvetlenia.<\/p>\n<h2>Vlastnosti<\/h2>\n<ul>\n<li>Detekcia svetla<\/li>\n<li>Integrovan\u00fd potenciometer na nastavenie citlivosti<\/li>\n<li>Jednoduch\u00e9 pripojenie cez 4 pinov\u00fd konektor<\/li>\n<\/ul>\n<h2>\u0160pecifik\u00e1cie<\/h2>\n<table>\n<tbody>\n<tr>\n<th>Parameter<\/th>\n<th>Hodnota<\/th>\n<\/tr>\n<tr>\n<td>Nap\u00e1janie<\/td>\n<td>3.3V &#8211; 5V<\/td>\n<\/tr>\n<tr>\n<td>V\u00fdstupn\u00fd sign\u00e1l<\/td>\n<td>Digit\u00e1lny<\/td>\n<\/tr>\n<tr>\n<td>Rozmery<\/td>\n<td>19mm x 15mm<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Pr\u00edklady pou\u017eitia<\/h2>\n<ul>\n<li>Automatiz\u00e1cia osvetlenia v miestnostiach<\/li>\n<li>Kontrola osvetlenia v r\u00f4znych scen\u00e1roch IoT projektov<\/li>\n<\/ul>\n<h2>Pr\u00edkladov\u00fd k\u00f3d pre Arduino<\/h2>\n<pre><code>\/\/ N\u00e1zov: Pr\u00edklad k\u00f3du pre KY-027 Magic Light Cup Sensor s Arduinom\r\n\/\/ Autor: Tvoje meno\r\n\/\/ Webov\u00e1 str\u00e1nka: www.tvojastranka.com\r\n\r\nint sensorPin = A0; \/\/ Pripojenie senzora na anal\u00f3gov\u00fd vstup A0\r\nint sensorValue;    \/\/ Premenn\u00e1 pre ulo\u017eenie hodnoty z senzora\r\n\r\nvoid setup() {\r\n  Serial.begin(9600); \/\/ Inicializ\u00e1cia s\u00e9riovej komunik\u00e1cie\r\n}\r\n\r\nvoid loop() {\r\n  sensorValue = analogRead(sensorPin); \/\/ \u010c\u00edtanie hodnoty zo senzora\r\n  Serial.println(sensorValue);         \/\/ Vyp\u00edsanie hodnoty na s\u00e9riov\u00fd port\r\n  delay(1000);                         \/\/ \u010cakanie 1 sekundu\r\n}<\/code><\/pre>\n<h2>Pr\u00edkladov\u00fd k\u00f3d pre ESPHome<\/h2>\n<p>V s\u00fa\u010dasnosti nie je k dispoz\u00edcii pr\u00edkladov\u00fd k\u00f3d pre ESPHome, ale senzor KY-027 m\u00f4\u017ee by\u0165 integrovan\u00fd pomocou dostupn\u00fdch kni\u017en\u00edc pre senzory svetla.<\/p>\n<p><button class=\"copy-button\">Skop\u00edrova\u0165 k\u00f3d<\/button><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>KY-027 4kol\u00edkov\u00fd modul sn\u00edma\u010da magick\u00e9ho svetla<\/h2>\n<p>Princ\u00edp stmievania spo\u010d\u00edva v pou\u017eit\u00ed princ\u00edpu zmeny jasu dvoch modulov pre pwm.<\/p>\n<p>Ortu\u0165ov\u00e9 sp\u00edna\u010de poskytuj\u00fa digit\u00e1lny sign\u00e1l, ktor\u00fd sp\u00fa\u0161\u0165a PWM, prostredn\u00edctvom n\u00e1vrhu programu,<\/p>\n<p>Svetlo vid\u00edme ako dve \u0161\u00e1lky naplnen\u00e9 efektom mie\u0161ania sa tam a sp\u00e4\u0165.<\/p>\n<p>testovac\u00ed k\u00f3d:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"line-numbers language-arduino\"><code class=\" language-arduino\"><span class=\"token keyword\">int<\/span> ledPinA <span class=\"token operator\">=<\/span> <span class=\"token number\">9<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token keyword\">int<\/span> switchPinA <span class=\"token operator\">=<\/span> <span class=\"token number\">8<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token keyword\">int<\/span> switchStateA <span class=\"token operator\">=<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token keyword\">int<\/span> ledPinB <span class=\"token operator\">=<\/span> <span class=\"token number\">6<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token keyword\">int<\/span> switchPinB <span class=\"token operator\">=<\/span> <span class=\"token number\">7<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token keyword\">int<\/span> switchStateB <span class=\"token operator\">=<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token keyword\">int<\/span> brightness   <span class=\"token operator\">=<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span>\r\n\r\n<span class=\"token keyword\">void<\/span> <span class=\"token important\">setup<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> \r\n<span class=\"token punctuation\">{<\/span>\r\n  <span class=\"token selector\">pinMode<\/span><span class=\"token punctuation\">(<\/span>ledPinA<span class=\"token punctuation\">,<\/span> <span class=\"token boolean\">OUTPUT<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> \r\n  <span class=\"token selector\">pinMode<\/span><span class=\"token punctuation\">(<\/span>ledPinB<span class=\"token punctuation\">,<\/span> <span class=\"token boolean\">OUTPUT<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  \r\n  <span class=\"token selector\">pinMode<\/span><span class=\"token punctuation\">(<\/span>switchPinA<span class=\"token punctuation\">,<\/span> <span class=\"token boolean\">INPUT<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> \r\n  <span class=\"token selector\">pinMode<\/span><span class=\"token punctuation\">(<\/span>switchPinB<span class=\"token punctuation\">,<\/span> <span class=\"token boolean\">INPUT<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token punctuation\">}<\/span>\r\n\r\n<span class=\"token keyword\">void<\/span> <span class=\"token important\">loop<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> \r\n<span class=\"token punctuation\">{<\/span>\r\n  switchStateA <span class=\"token operator\">=<\/span> <span class=\"token selector\">digitalRead<\/span><span class=\"token punctuation\">(<\/span>switchPinA<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\r\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>switchStateA <span class=\"token operator\">==<\/span> <span class=\"token boolean\">HIGH<\/span> <span class=\"token operator\">&amp;&amp;<\/span> brightness <span class=\"token operator\">!=<\/span> <span class=\"token number\">255<\/span><span class=\"token punctuation\">)<\/span>\r\n  <span class=\"token punctuation\">{<\/span> \r\n   brightness <span class=\"token operator\">++<\/span><span class=\"token punctuation\">;<\/span>\r\n  <span class=\"token punctuation\">}<\/span> \r\n  switchStateB <span class=\"token operator\">=<\/span> <span class=\"token selector\">digitalRead<\/span><span class=\"token punctuation\">(<\/span>switchPinB<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\r\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>switchStateB <span class=\"token operator\">==<\/span> <span class=\"token boolean\">HIGH<\/span> <span class=\"token operator\">&amp;&amp;<\/span> brightness <span class=\"token operator\">!=<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span>\r\n  <span class=\"token punctuation\">{<\/span> \r\n   brightness <span class=\"token operator\">--<\/span><span class=\"token punctuation\">;<\/span>\r\n  <span class=\"token punctuation\">}<\/span> \r\n  <span class=\"token selector\">analogWrite<\/span><span class=\"token punctuation\">(<\/span>ledPinA<span class=\"token punctuation\">,<\/span> brightness<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\" spellcheck=\"true\"> \/\/  A slow fade out\r\n<\/span>  <span class=\"token selector\">analogWrite<\/span><span class=\"token punctuation\">(<\/span>ledPinB<span class=\"token punctuation\">,<\/span> <span class=\"token number\">255<\/span> <span class=\"token operator\">-<\/span> brightness<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\" spellcheck=\"true\"> \/\/ B slow bright up\r\n<\/span>  <span class=\"token selector\">delay<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">20<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\r\n<span class=\"token punctuation\">}<\/span><\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-165045 alignleft\" src=\"https:\/\/arduinomodules.info\/wp-content\/uploads\/Arduino_Arduino_KY-027_Keyes_magic_light_cup_module_connection_diagram.png\" sizes=\"(max-width: 1665px) 100vw, 1665px\" srcset=\"https:\/\/arduinomodules.info\/wp-content\/uploads\/Arduino_Arduino_KY-027_Keyes_magic_light_cup_module_connection_diagram.png 1665w, https:\/\/arduinomodules.info\/wp-content\/uploads\/Arduino_Arduino_KY-027_Keyes_magic_light_cup_module_connection_diagram-300x168.png 300w, https:\/\/arduinomodules.info\/wp-content\/uploads\/Arduino_Arduino_KY-027_Keyes_magic_light_cup_module_connection_diagram-1024x572.png 1024w, https:\/\/arduinomodules.info\/wp-content\/uploads\/Arduino_Arduino_KY-027_Keyes_magic_light_cup_module_connection_diagram-240x134.png 240w\" alt=\"\" width=\"278\" height=\"155\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<table>\n<thead>\n<tr>\n<td>KY-027 (A)<\/td>\n<td><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>G<\/td>\n<td>GND<\/td>\n<\/tr>\n<tr>\n<td>+<\/td>\n<td>5v<\/td>\n<\/tr>\n<tr>\n<td>S<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>L<\/td>\n<td>9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<td>KY-027 (B)<\/td>\n<td><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>G<\/td>\n<td>GND<\/td>\n<\/tr>\n<tr>\n<td>+<\/td>\n<td>5v<\/td>\n<\/tr>\n<tr>\n<td>S<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td>L<\/td>\n<td>6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>V tomto n\u00e1\u010drte Arduina pou\u017eijeme oba moduly KY-027 na vytvorenie efektu magick\u00e9ho sveteln\u00e9ho poh\u00e1ra. Ortu\u0165ov\u00e9 sp\u00edna\u010de v ka\u017edom module poskytuj\u00fa digit\u00e1lny sign\u00e1l, ktor\u00fd sa pou\u017e\u00edva na regul\u00e1ciu jasu LED di\u00f3d pomocou PWM. Naklonen\u00edm modulov sa zn\u00ed\u017ei jas na jednom module, zatia\u013e \u010do na druhom sa zv\u00fd\u0161i, \u010d\u00edm sa vytvor\u00ed il\u00fazia svetla magicky prech\u00e1dzaj\u00faceho z jedn\u00e9ho modulu na druh\u00fd.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; KY-027 Magic Light Cup Sensor Popis Vlastnosti V\u00fdrobca Model KY-027 Pou\u017eitie Detekcia okolit\u00e9ho svetla Nap\u00e1janie 3.3V &#8211; 5V&hellip;<\/p>\n","protected":false},"featured_media":1474,"template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"product_cat":[16,69,71],"product_tag":[],"class_list":{"0":"post-1472","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-ard","7":"product_cat-sensors","8":"product_cat-vibracie","10":"first","11":"instock","12":"shipping-taxable","13":"purchasable","14":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027 - Arduino e-shop<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/\" \/>\n<meta property=\"og:locale\" content=\"sk_SK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027 - Arduino e-shop\" \/>\n<meta property=\"og:description\" content=\"&nbsp; &nbsp; KY-027 Magic Light Cup Sensor Popis Vlastnosti V\u00fdrobca Model KY-027 Pou\u017eitie Detekcia okolit\u00e9ho svetla Nap\u00e1janie 3.3V &#8211; 5V&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/\" \/>\n<meta property=\"og:site_name\" content=\"Arduino e-shop\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-22T16:30:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"522\" \/>\n\t<meta property=\"og:image:height\" content=\"523\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Predpokladan\u00fd \u010das \u010d\u00edtania\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 min\u00faty\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/\",\"url\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/\",\"name\":\"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027 - Arduino e-shop\",\"isPartOf\":{\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg\",\"datePublished\":\"2021-11-16T17:41:12+00:00\",\"dateModified\":\"2024-02-22T16:30:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#breadcrumb\"},\"inLanguage\":\"sk-SK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"sk-SK\",\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#primaryimage\",\"url\":\"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg\",\"contentUrl\":\"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg\",\"width\":522,\"height\":523},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Domov\",\"item\":\"https:\/\/www.onetimenexttime.sk\/arduino\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Obchod\",\"item\":\"https:\/\/www.onetimenexttime.sk\/arduino\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.onetimenexttime.sk\/arduino\/#website\",\"url\":\"https:\/\/www.onetimenexttime.sk\/arduino\/\",\"name\":\"Arduino e-shop\",\"description\":\"Home Assistant\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.onetimenexttime.sk\/arduino\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sk-SK\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027 - Arduino e-shop","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/","og_locale":"sk_SK","og_type":"article","og_title":"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027 - Arduino e-shop","og_description":"&nbsp; &nbsp; KY-027 Magic Light Cup Sensor Popis Vlastnosti V\u00fdrobca Model KY-027 Pou\u017eitie Detekcia okolit\u00e9ho svetla Nap\u00e1janie 3.3V &#8211; 5V&hellip;","og_url":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/","og_site_name":"Arduino e-shop","article_modified_time":"2024-02-22T16:30:58+00:00","og_image":[{"width":522,"height":523,"url":"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Predpokladan\u00fd \u010das \u010d\u00edtania":"3 min\u00faty"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/","url":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/","name":"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027 - Arduino e-shop","isPartOf":{"@id":"https:\/\/www.onetimenexttime.sk\/arduino\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#primaryimage"},"image":{"@id":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#primaryimage"},"thumbnailUrl":"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg","datePublished":"2021-11-16T17:41:12+00:00","dateModified":"2024-02-22T16:30:58+00:00","breadcrumb":{"@id":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#breadcrumb"},"inLanguage":"sk-SK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/"]}]},{"@type":"ImageObject","inLanguage":"sk-SK","@id":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#primaryimage","url":"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg","contentUrl":"https:\/\/www.onetimenexttime.sk\/arduino\/wp-content\/uploads\/2021\/11\/17916.jpg","width":522,"height":523},{"@type":"BreadcrumbList","@id":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/produkt\/ky-027-magic-light-cup-sensor-4pin-module-diy-starter-kit-ky027\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Domov","item":"https:\/\/www.onetimenexttime.sk\/arduino\/"},{"@type":"ListItem","position":2,"name":"Obchod","item":"https:\/\/www.onetimenexttime.sk\/arduino\/"},{"@type":"ListItem","position":3,"name":"KY-027 Magic Light Cup Sensor 4pin Module diy Starter Kit KY027"}]},{"@type":"WebSite","@id":"https:\/\/www.onetimenexttime.sk\/arduino\/#website","url":"https:\/\/www.onetimenexttime.sk\/arduino\/","name":"Arduino e-shop","description":"Home Assistant","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.onetimenexttime.sk\/arduino\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sk-SK"}]}},"_links":{"self":[{"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/product\/1472"}],"collection":[{"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/media\/1474"}],"wp:attachment":[{"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/media?parent=1472"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/product_cat?post=1472"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.onetimenexttime.sk\/arduino\/index.php\/wp-json\/wp\/v2\/product_tag?post=1472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}