2

I'm working on a project that uses an LM35 temperature sensor to control a few LEDs. Above 97 degrees, one LED should switch on. Below 95 degrees, it should switch off and the other should switch on. In between those temperatures, the LED state should remain unchanged.

When the Arduino Micro is plugged into my Macbook USB port, everything functions as I expect, however when I plug the same USB cable into a different USB power supply (like a portable cell phone charger), the LEDs tend to blink back and forth at the frequency at which I tell the Arduino to check which state the LEDs should be in.

The only thing I can think of that is different between the laptop USB and battery is the lack of serial data being read by the battery. Unclear, though how I can fix this issue. Any suggestions would be appreciated.

  • Can you show a schematic of your wiring of the sensor (complete circuit would be most helpful), as well as your code? – jose can u c Aug 18 '17 at 15:24

Your Answer

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

Browse other questions tagged or ask your own question.