Let's Workshop: Keyes LDR Sensor Module
Posted by Sebastian Karam on
Here is a quick introduction to using the Keyes LDR sensor module. Hopefully it will provide you with the confidence to intergrate light sensing into your project.
This example will demonstrate the use of an Arduino UNO in monitoring an analog pin over the range of light levels that an LDR responds to.
Components
- 1pcs Arduino UNO or Compatible - LCAA100005
- 1pcs Keyes LDR Sensor Module - BDAA100009
- 3pcs Male to Female Jumper Cables - GBAA100002
Wiring
Wire the one of the two boards to the Arduino as can be seen in the images below, taking care to match the pin numbers.
Coding
The code consists of a definition, setup and loop. First the A0 pin is assigned followed by a varaiable to store the value read. This allows easier use later in your program. A setup informs the system that the pin is an input is an input and then lauches the serial connection. Next we enter the loop, where the value on the pin is read and stored in the variable declared earlier. Following that we send it to the serial monitor so that the value can be read on the screen.
Load the code below into the Arduino IDE and upload it to your board.
/* A simple program designed to setup and demonstrate the Keyes LDR Sensor Module. The program monitors a connected analog pin and outputs the value to the serial monitor. modified 7th June 2019 by Sebastian Karam - Flux Workshop */ int analogApin = 0; // define OUT signal pin int analogA; // define variable to store value read from pin void setup() { pinMode(analogApin, INPUT); // set the OUT signal pin as an input Serial.begin(9600); // launch the serial monitor Serial.println("Flux Workshop Example"); } void loop() { analogA = analogRead(analogApin); // read the voltage level on the A0 Serial.println((String)"Light level: " + analogA); // send the result to the serial monitor delay(200); // pause for a moment before repeating }
Running
With the board loaded with the program and all the connections made the serial monitor will produce an output like the one seen below. In this case the sensor is in bright sunlight before it is covered by a cup.
What to try next?
- Use the output to monitor sunrise and sunset.
- As the sensor reacts to reflected light, line sensing should be possible. Ideal as the basis for a line following robot.
Share this post
- 19 comments
- Tags: Arduino, BDAA100009, Keyes, LDR, Module, UNO
شركة كيان لنقل العفش بالرياض والمدينة المنورة وجدة ومكة والطائف والدمام تقديم لكم دليل كامل لشركات نقل العفش بالمملكة العربية السعودية
https://mycanadafitness.com/ شركة كيان لنقل العفش
https://mycanadafitness.com/forum.html منتدي نقل العفش
https://mycanadafitness.com/movingfurnitureriyadh.html شركة نقل اثاث بالرياض
https://mycanadafitness.com/movingfurniturejaddah.html شركة نقل اثاث بجدة
https://mycanadafitness.com/movingfurnituremecca.html شركة نقل اثاث بمكة
https://mycanadafitness.com/movingfurnituretaif.html شركة نقل اثاث بالطائف
https://mycanadafitness.com/movingfurnituremadina.html شركة نقل اثاث بالمدينة المنورة
https://mycanadafitness.com/movingfurnituredammam.html شركة نقل اثاث بالدمام
https://mycanadafitness.com/movingfurniturekhobar.html شركة نقل اثاث بالخبر
https://mycanadafitness.com/movingfurnituredhahran.html شركة نقل اثاث بالظهران
https://mycanadafitness.com/movingfurniturejubail.html شركة نقل اثاث بالجبيل
https://mycanadafitness.com/movingfurnitureqatif.html شركة نقل اثاث بالقطيف
https://mycanadafitness.com/movingfurnitureahsa.html شركة نقل اثاث بالاحساء
https://mycanadafitness.com/movingfurniturekharj.html شركة نقل اثاث بالخرج
https://mycanadafitness.com/movingfurniturekhamismushit.html شركة نقل اثاث بخميس مشيط
https://mycanadafitness.com/movingfurnitureabha.html شركة نقل اثاث بابها
https://mycanadafitness.com/movingfurniturenajran.html شركة نقل اثاث بنجران
https://mycanadafitness.com/movingfurniturejazan.html شركة نقل اثاث بجازان
https://mycanadafitness.com/movingfurnitureasir.html شركة نقل اثاث بعسير
https://mycanadafitness.com/movingfurniturehail.html شركة نقل اثاث بحائل
https://mycanadafitness.com/movingfurnitureqassim.html شركة نقل عفش بالقصيم
https://mycanadafitness.com/movingfurnitureyanbu.html شركة نقل اثاث بينبع
https://mycanadafitness.com/movingfurnitureburaidah.html شركة نقل عفش ببريدة
https://mycanadafitness.com/movingfurniturehafralbatin.html شركة نقل عفش بحفر الباطن
https://mycanadafitness.com/movingfurniturerabigh.html شركة نقل عفش برابغ
https://mycanadafitness.com/movingfurnituretabuk.html شركة نقل عفش بتبوك
https://mycanadafitness.com/movingfurnitureasfan.html شركة نقل عفش بعسفان
https://mycanadafitness.com/movingfurnituresharora.html شركة نقل عفش بشرورة
https://mycanadafitness.com/companis-moving-riyadh.html شركات نقل العفش بالرياض
https://mycanadafitness.com/cars-moving-riyadh.html سيارات نقل العفش بالرياض
https://mycanadafitness.com/company-number-moving-riyadh.html ارقام شركات نقل العفش بالرياض
https://mycanadafitness.com/company-moving-jeddah.html شركات نقل العفش بجدة
https://mycanadafitness.com/price-moving-jeddah.html اسعار نقل العفش بجدة
https://mycanadafitness.com/company-moving-mecca.html شركات نقل العفش بمكة
http://www.domyate.com/2019/08/27/transfer-furniture-north-riyadh/ نقل عفش شمال الرياض
http://www.domyate.com/2019/09/05/movers-company-khamis-mushait/ شركات نقل عفش بخميس مشيط
http://www.domyate.com/2019/09/05/10-company-transfer-furniture-khamis-mushait/ شركة نقل العفش بخميس مشيط
http://www.domyate.com/2019/09/05/all-transfer-furniture-khamis-mushait/ شركات نقل اثاث بخميس مشيط
http://www.domyate.com/2019/09/05/best-company-transfer-furniture-khamis-mushit/ افضل شركات نقل اثاث بخميس مشيط
http://www.domyate.com/2019/09/05/company-transfer-furniture-khamis-mushit/ شركات نقل اثاث بخميس مشيط
http://www.domyate.com/category/%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%AC%D8%AF%D8%A9/ نقل عفش جدة
http://www.domyate.com/2019/09/25/movers-furniture-from-jeddah-to-jordan/ نقل عفش من جدة الي الاردن
http://www.domyate.com/2019/10/03/price-cleaning-tanks-in-jeddah/ اسعار شركات تنظيف خزانات بجدة
http://www.domyate.com/2019/09/25/movers-furniture-from-jeddah-to-egypt/ نقل عفش من جدة الي مصر
http://www.domyate.com/2019/09/24/movers-furniture-from-jeddah-to-lebanon/ نقل عفش من جدة الي لبنان
http://www.domyate.com/2019/09/22/%d8%a3%d9%86%d8%ac%d8%ad-%d8%b4%d8%b1%d9%83%d8%a7%d8%aa-%d9%86%d9%82%d9%84-%d8%a7%d8%ab%d8%a7%d8%ab-%d8%a8%d8%ac%d8%af%d8%a9/ شركات نقل اثاث بجدة
http://www.domyate.com/2019/09/22/best-company-movers-jeddah/ افضل شركات نقل اثاث جدة
http://www.domyate.com/2019/09/22/company-transfer-furniture-yanbu/ شركات نقل العفش بينبع
http://www.domyate.com/2019/09/21/taif-transfer-furniture-company/ شركة نقل عفش في الطائف
http://www.domyate.com/2019/09/21/%d8%b4%d8%b1%d9%83%d8%a7%d8%aa-%d9%86%d9%82%d9%84-%d8%a7%d9%84%d8%b9%d9%81%d8%b4/ شركات نقل العفش
http://www.domyate.com/2019/09/21/%d8%b7%d8%b1%d9%82-%d9%86%d9%82%d9%84-%d8%a7%d9%84%d8%b9%d9%81%d8%b4/ طرق نقل العفش
http://www.domyate.com/2019/09/20/%d8%ae%d8%b7%d9%88%d8%a7%d8%aa-%d9%86%d9%82%d9%84-%d8%a7%d9%84%d8%b9%d9%81%d8%b4-%d9%88%d8%a7%d9%84%d8%a7%d8%ab%d8%a7%d8%ab/ خطوات نقل العفش والاثاث
http://www.domyate.com/2019/09/20/best-10-company-transfer-furniture/ افضل 10 شركات نقل عفش
http://www.domyate.com/2019/09/20/%d9%83%d9%8a%d9%81-%d9%8a%d8%aa%d9%85-%d8%a7%d8%ae%d8%aa%d9%8a%d8%a7%d8%b1-%d8%b4%d8%b1%d9%83%d8%a7%d8%aa-%d9%86%d9%82%d9%84-%d8%a7%d9%84%d8%b9%d9%81%d8%b4-%d9%88%d8%a7%d9%84%d8%a7%d8%ab%d8%a7%d8%ab/ اختيار شركات نقل العفش والاثاث
http://www.domyate.com/2019/09/20/cleaning-company-house-taif/ شركة تنظيف منازل بالطائف
http://www.domyate.com/2019/09/20/company-cleaning-home-in-taif/ شركة تنظيف شقق بالطائف
http://www.domyate.com/2019/09/20/taif-cleaning-company-villas/ شركة تنظيف فلل بالطائف
http://www.domyate.com/ شركة نقل عفش
http://www.domyate.com/2017/09/21/%D9%86%D9%82%D9%84-%D8%A7%D9%84%D8%B9%D9%81%D8%B4-%D9%88%D8%A7%D9%84%D8%AA%D8%AE%D8%B2%D9%8A%D9%86/ نقل العفش والتخزين
http://www.domyate.com/2016/07/02/transfer-furniture-dammam شركة نقل عفش بالدمام
http://www.domyate.com/2015/11/12/%D8%B4%D8%B1%D9%83%D8%A9-%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A8%D8%A7%D9%84%D9%85%D8%AF%D9%8A%D9%86%D8%A9-%D8%A7%D9%84%D9%85%D9%86%D9%88%D8%B1%D8%A9/ شركة نقل عفش بالمدينة المنورة
http://www.domyate.com/2016/06/05/transfer-furniture-jeddah/ شركة نقل عفش بجدة
http://www.domyate.com/2017/08/10/movers-company-mecca-naql/ شركات نقل العفش بمكة
http://www.domyate.com/2016/06/05/transfer-furniture-mecca/ شركة نقل عفش بمكة
http://www.domyate.com/2016/06/05/transfer-furniture-taif/ شركة نقل عفش بالطائف
http://www.domyate.com/2016/06/05/transfer-furniture-riyadh/ شركة نقل عفش بالرياض
http://www.domyate.com/2016/06/05/transfer-furniture-yanbu/ شركة نقل عفش بينبع
http://www.domyate.com/category/%D8%AE%D8%AF%D9%85%D8%A7%D8%AA-%D9%86%D9%82%D9%84-%D8%A7%D9%84%D8%B9%D9%81%D8%B4-%D9%88%D8%A7%D9%84%D8%AA%D8%AE%D8%B2%D9%8A%D9%86/ نقل العفش والتخزين
http://www.domyate.com/2015/08/30/furniture-transport-company-in-almadinah/ شركة نقل عفش بالمدينة المنورة
http://www.domyate.com/2016/06/05/transfer-furniture-medina-almonawara/ شركة نقل عفش بالمدينة المنورة
http://www.domyate.com/2018/10/13/%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%AC%D8%AF%D8%A9-%D8%B4%D8%B1%D9%83%D8%A7%D8%AA-%D9%86%D9%82%D9%84-%D9%85%D9%85%D9%8A%D8%B2%D8%A9/ نقل عفش بجدة
http://www.domyate.com/2016/07/22/%d8%a7%d8%b1%d8%ae%d8%b5-%d8%b4%d8%b1%d9%83%d8%a9-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%a8%d8%a7%d9%84%d9%85%d8%af%d9%8a%d9%86%d8%a9-%d8%a7%d9%84%d9%85%d9%86%d9%88%d8%b1%d8%a9/ ارخص شركة نقل عفش بالمدينة المنورة
http://www.domyate.com/2016/07/25/%D8%B4%D8%B1%D9%83%D8%A9-%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A8%D8%A7%D9%84%D9%82%D8%B5%D9%8A%D9%85/ شركة نقل عفش بالقصيم
http://www.domyate.com/2016/07/25/%D8%B4%D8%B1%D9%83%D8%A9-%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A8%D8%AE%D9%85%D9%8A%D8%B3-%D9%85%D8%B4%D9%8A%D8%B7/ شركة نقل عفش بخميس مشيط
http://www.domyate.com/2016/07/25/%D8%B4%D8%B1%D9%83%D8%A9-%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A8%D8%A7%D8%A8%D9%87%D8%A7/ شركة نقل عفش بابها
http://www.domyate.com/2016/07/23/%D8%B4%D8%B1%D9%83%D8%A9-%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A8%D8%AA%D8%A8%D9%88%D9%83/ شركة نقل عفش بتبوك
شركة سكاي لخدمات نقل العفش والاثاث بالمنطقة العربية السعودية نحن نوفر خدمات نقل اثاث بالرياض ونقل عفش بالمدينة المنورة ونقل عفش بمكة ونقل عفش بالطائف نحن نقدم افضل نقل اثاث بخميس مشيط ونقل عفش بجدة
https://treeads.net/ شركة سكاي نقل العفش
https://treeads.net/blog.html مدونة لنقل العفش
https://treeads.net/movers-mecca.html شركة نقل عفش بمكة
https://treeads.net/movers-riyadh-company.html شركة نقل عفش بالرياض
https://treeads.net/all-movers-madina.html شركة نقل عفش بالمدينة المنورة
https://treeads.net/movers-jeddah-company.html شركة نقل عفش بجدة
https://treeads.net/movers-taif.html شركة نقل عفش بالطائف
https://treeads.net/movers-dammam-company.html شركة نقل عفش بالدمام
https://treeads.net/movers-qatif.html شركة نقل عفش بالقطيف
https://treeads.net/movers-jubail.html شركة نقل عفش بالجبيل
https://treeads.net/movers-khobar.html شركة نقل عفش بالخبر
https://treeads.net/movers-ahsa.html شركة نقل عفش بالاحساء
https://treeads.net/movers-kharj.html شركة نقل عفش بالخرج
https://treeads.net/movers-khamis-mushait.html شركة نقل عفش بخميس مشيط
https://treeads.net/movers-abha.html شركة نقل عفش بابها
https://treeads.net/movers-qassim.html شركة نقل عفش بالقصيم
https://treeads.net/movers-yanbu.html شركة نقل عفش بينبع
https://treeads.net/movers-najran.html شركة نقل عفش بنجران
https://treeads.net/movers-hail.html شركة نقل عفش بحائل
https://treeads.net/movers-buraydah.html شركة نقل عفش ببريدة
https://treeads.net/movers-tabuk.html شركة نقل عفش بتبوك
https://treeads.net/movers-dhahran.html شركة نقل عفش بالظهران
https://treeads.net/movers-rabigh.html شركة نقل عفش برابغ
https://treeads.net/movers-baaha.html شركة نقل عفش بالباحه
https://treeads.net/movers-asseer.html شركة نقل عفش بعسير
https://treeads.net/movers-mgmaa.html شركة نقل عفش بالمجمعة
https://treeads.net/movers-sharora.html شركة نقل عفش بشرورة
https://treeads.net/how-movers-furniture-yanbu.html كيفية نقل العفش بينبع
https://treeads.net/price-movers-furniture-yanbu.html اسعار نقل عفش بينبع
https://treeads.net/find-company-transfer-furniture-yanbu.html البحث عن شركات نقل العفش بينبع
https://treeads.net/transfer-furniture-khamis-mushit.html شركات نقل العفش بخميس مشيط
https://treeads.net/how-transfer-furniture-khamis-mushit.html كيفية نقل العفش بخميس مشيط
https://treeads.net/price-transfer-furniture-khamis-mushit.html اسعار نقل عفش بخميس مشيط
https://treeads.net/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AC%D9%84%D9%8A-%D8%A8%D9%84%D8%A7%D8%B7-%D8%A8%D8%AC%D8%AF%D8%A9.html شركة جلي بلاط بجدة
https://treeads.net/%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%81%D9%84%D9%84-%D8%A8%D8%AC%D8%AF%D8%A9.html تنظيف فلل بجدة
https://treeads.net/company-transfer-furniture-jazan.html شركة نقل عفش بجازان
https://treeads.net/best-company-cleaning-jeddah-2020.html افضل شركة تنظيف بجدة
https://www.crtmovers.com/
https://www.crtmovers.com/2020/10/transfer-furniture-taif.html شركة نقل اثاث بالطائف
https://www.crtmovers.com/2020/10/transfer-furniture-madina.html
https://www.crtmovers.com/2020/10/movers-madina.html
https://www.crtmovers.com/2020/10/transfer-furniture-riyadh.html
https://www.crtmovers.com/2020/07/transfer-furniture-riyadh.html
https://www.crtmovers.com/2020/05/mecca-transfer-furniture-company-2020.html
https://www.crtmovers.com/2020/05/riyadh-transfer-furniture-company.html
https://www.crtmovers.com/2019/12/jeddah-transfer-furniture.html
https://www.crtmovers.com/2019/12/transfer-furniture-company-jeddah.html
https://www.crtmovers.com/2019/12/transfer-furniture-jeddah-1.html
https://www.crtmovers.com/2019/12/transfer-furniture-taif-1.html
https://www.crtmovers.com/2019/12/transfer-furniture-taif.html
https://www.crtmovers.com/2019/12/price-company-cleaning-tanks-jeddah.html
https://www.crtmovers.com/2019/12/blog-post.html
https://www.crtmovers.com/2019/12/cleaning-tanks-jeddah.html
https://www.crtmovers.com/2023/01/%d8%a7%d9%81%d8%b6%d9%84-%d8%b4%d8%b1%d9%83%d8%a9-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%a8%d8%ac%d8%af%d8%a9.html
https://saudi-germany.com/ شركة السعودي الالماني للخدمات المنزلية
https://saudi-germany.com/%d8%b4%d8%b1%d9%83%d8%a7%d8%aa-%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%ae%d8%b2%d8%a7%d9%86%d8%a7%d8%aa-%d8%a8%d8%ac%d8%af%d8%a9/ شركات تنظيف خزانات بجدة
https://saudi-germany.com/%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%ae%d8%b2%d8%a7%d9%86%d8%a7%d8%aa-%d8%a8%d8%ac%d8%af%d8%a9/ تنظيف خزانات بجدة
https://saudi-germany.com/%d8%a7%d9%81%d8%b6%d9%84-%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%ae%d8%b2%d8%a7%d9%86%d8%a7%d8%aa-%d8%a8%d8%ac%d8%af%d8%a9/ افضل شركة تنظيف خزانات بجدة
https://saudi-germany.com/%d8%a7%d8%b1%d8%ae%d8%b5-%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%ae%d8%b2%d8%a7%d9%86%d8%a7%d8%aa-%d8%a8%d8%ac%d8%af%d8%a9/ ارخص شركة تنظيف خزانات بجدة
https://saudi-germany.com/%d8%ba%d8%b3%d9%8a%d9%84-%d8%ae%d8%b2%d8%a7%d9%86%d8%a7%d8%aa-%d8%a8%d8%ac%d8%af%d8%a9/ غسيل خزانات بجدة
https://saudi-germany.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%ae%d8%b2%d8%a7%d9%86%d8%a7%d8%aa-%d8%a8%d8%ac%d8%af%d8%a9/ شركة تنظيف خزانات بجدة
https://saudi-germany.com/cleaning-tanks-company-taif/
https://saudi-germany.com/cleaning-tanks-company-mecca/
https://saudi-germany.com/jumperads-transfer-furniture/
https://saudi-germany.com/%d8%a7%d9%81%d8%b6%d9%84-20-%d8%b4%d8%b1%d9%83%d8%a9-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%a8%d9%8a%d9%86%d8%a8%d8%b9-%d8%ae%d8%b5%d9%85-50-%d9%85%d8%b9-%d8%a7%d9%84%d9%81%d9%83-%d9%88%d8%a7/
https://saudi-germany.com/%d8%a7%d8%b1%d8%ae%d8%b5-%d8%b4%d8%b1%d9%83%d8%a9-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%ac%d8%af%d8%a9-%d8%ad%d9%8a-%d8%a7%d9%84%d8%b5%d9%81%d8%a7/
https://saudi-germany.com/%d8%a7%d8%b1%d8%ae%d8%b5-%d8%b4%d8%b1%d9%83%d8%a9-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%ac%d8%af%d8%a9-%d8%a7%d8%a8%d8%ad%d8%b1-%d8%a7%d9%84%d8%b4%d9%85%d8%a7%d9%84%d9%8a%d8%a9/
https://saudi-germany.com/%d8%a7%d8%b1%d9%82%d8%a7%d9%85-%d8%b4%d8%b1%d9%83%d8%a7%d8%aa-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%a8%d8%ac%d8%af%d8%a9-%d9%85%d8%b9-%d8%a7%d9%84%d8%aa%d8%ba%d9%84%d9%8a%d9%81/
https://saudi-germany.com/%d8%a7%d8%b1%d8%ae%d8%b5-%d8%b4%d8%b1%d9%83%d8%a9-%d9%86%d9%82%d9%84-%d8%b9%d9%81%d8%b4-%d8%a8%d8%ac%d8%af%d8%a9/