Fairly new to arduino, what is the best and simplest way to connect an LM35 temperature sensor, a GL5528 photoresistor and some LEDs as well as the required resistors to an arduino for recording values? Any tutorials with wiring diagrams for something similar would be helpful.

  • I'm pretty sure using the text entry box on the top right will find you some. – Ignacio Vazquez-Abrams Mar 12 '15 at 18:33
  • Hi, like Ignacio hinted, your requests would be easily answered with a search. I provided an answer by doing the search for you. – krol Mar 12 '15 at 19:02
  • I meant the site search box, but either or. – Ignacio Vazquez-Abrams Mar 12 '15 at 21:53

The LM35 is a very common temperature sensor. It has 3 pins - Vs, Vout, and Gnd. Connect Vs to the Arduino's Vs pin. Connect the Gnd pin to one of the Arduino's GND pins. The Vout pin should be connected to an Analog input pin. If you google your board, you should find the pinout on Arduino's website. The LM35 pin diagram and information on how to calculate the temperature from voltage is found in the LM35's Datasheet. Here is LadyAda's Temerature Sensor tutorial (note: the tutorial specifies the TMP36, however the two sensors are comparable). Here is an instructable for the LM35 (includes diagrams and source code).

The GL5528 is a photoresistor. That means its resistance changes proportional to how much light strikes its sensor surface. Because of this trait, we can build a Voltage Divider. This will allow us to read in values (again, analog values). AdaFruit's tutorial is very comprehensive and includes diagrams.

LEDs are generally considered output displays (we program to use LEDs as a visual display of state). A good starting place for Arduino LEDs is the Blink Example. we connect an LED and resistor in series with an Arduino output pin and GND or 5v. This allows us to 'write' to the Arduino pin HIGH or LOW, turning the LED on or off.

I found these results by googling 'Arduino LM35', 'Arduino GL5528', and 'Arduino LED' respectively.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.