# Why can't I connect LDR sensor?

**URL:** <https://discourse.nodered.org/t/why-cant-i-connect-ldr-sensor/49809>\
**Category:** General\
**Created:** [16 August 2021 21:45 UTC](https://discourse.nodered.org/t/why-cant-i-connect-ldr-sensor/49809 "2021-08-16T21:45:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![owmath](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/owmath/32/46537_2.png) [@owmath](https://discourse.nodered.org/u/owmath)\
**Post date:** [16 August 2021 21:45 UTC](https://discourse.nodered.org/t/why-cant-i-connect-ldr-sensor/49809/1 "2021-08-16T21:45:40Z")

</div>

1- First of all I have StandardFirmata loaded for my Arduino board connected to COM4 port:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a1222991982ad6cd69d0187888bf7e7f8303328f.png)

2- After opening Node Red and Deploying, only the LED works and the LDR does not connect

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/8/2854002eef4d20d11cb3fc1f6f0851df27d90023.png)

3- Both are connected to the same COM4 port, which is the correct one

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c993749fe6679353af5670e482986dae3fd4833f.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/a/ea0c8dd3366f9116c39fb7acf3e5b79bc7e5449b.png)

Does anyone know how to solve this problem? If I have to run another type of Firmata, I don't know

Thank you very much for your attention

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [17 August 2021 00:07 UTC](https://discourse.nodered.org/t/why-cant-i-connect-ldr-sensor/49809/2 "2021-08-17T00:07:44Z")

</div>

An LDR is an analog device, have you connected it to one of the Analog in pins, via a voltage divider, as well as designated as such in the node?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/9105963ad06684428f756055ad0998878d6075dc.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/b/abc2a44b42b41c9ad132c68ca0cf1afd0685adf8.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/f/2f1d24e5839fd7f03e993ef8244032ff8ac71752.png)

---

<div class="post-metadata">

**Author:** ![owmath](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/owmath/32/46537_2.png) [@owmath](https://discourse.nodered.org/u/owmath)\
**Post date:** [17 August 2021 00:51 UTC](https://discourse.nodered.org/t/why-cant-i-connect-ldr-sensor/49809/3 "2021-08-17T00:51:05Z")

</div>

It worked, the problem was that I was putting A5 instead of just 5

Thank you very much for the reply and for the help, I appreciate it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 August 2021 00:52 UTC](https://discourse.nodered.org/t/why-cant-i-connect-ldr-sensor/49809/4 "2021-08-31T00:52:03Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
