I went through three orders of temp sensors (LM34, LM35, TMP36) assuming I was getting one defective batch after the other. My analogRead would feed a potentiometer with 0 - 1023, so I assumed the board was good. But wiring to a sensor gave me raw numbers in the 800 range with ridiculous temperature conversions. I always order the Uno knock-offs because they seem to work just fine. Just for the hell of it, I ordered a genuine Uno. Problem solved! Something about the knock-off boards is different in a way that allowed all my other exercises to work while the temp sensors won't. Hope this helps someone.
Hope this helps someone.
Doubtful, because you don't state the supplier or give any indication of what might cause the problem (if there even is a problem with the "knockoff").
Problem solved! Something about the knock-off boards is different in a way that allowed all my other exercises to work while the temp sensors won't. Hope this helps someone.
You could be onto something, but rather than "knockoff" boards being different, maybe you just got lucky - at last.
It might be worth your while to investigate what is really going on. You could start by looking into the meaning of "knockoff" and how it applies in the open architecture (more buzzwords) world of Arduino.
I'm back to retract my previous claim that my sensor problems were the fault of knock-off Unos. I was wrong. And to Nick_Pyner-- obviously open source hardware can be copied and sold. But I don't think it's inappropriate to refer to those other than genuine Unos as knock-offs. I doubt if anyone would be confused with what I meant. I didn't state the supplier of my collection of knock-offs (KOs) because I've accumulated them over a few years from here, there, and yonder.
But my point tonight is to retract any hope for solving sensor problems (as described in the OP) by ordering the Genuine Article (GA). The KOs were all wired up to a board I made with pots and LEDs, etc. When I tested the GA, it was hooked to nothing but the sensor and PC. I repeated the test tonight with a KO disconnected from my contraption and got good numbers. So the culprit must certainly be in my homemade test board.