The sketch there does not provide the means of reading negative temps or suppress leading zeros. The original code was obtained from the link provided in the sketch. I have posted below, the code I am working with. I haven't been able to locate a sketch that seems to work for this type of setup. So far, the examples I'm finding on the web don't seem to match into the code I'm currently working with or don't work at all. At the same time, I was wanting to have it place a minus (-) sign when the number is less than zero. When the variable 'tempF' is assigned a number such as 12.3, the display yields 012.3 and if the variable is assigned a number such as 1.2, the display will yield 001.2. It displays to the tenths decimal place I am having troubles trying to get rid of the leading zeros. Currently, it is setup to read a variable assigned with a number to test the display portion. look at comment 15 for the last update I connect 4 digit 7 segment display to UNO-R3 like this LED UNO 1 10 2 9 3 13 4 8 5 12 6 5 7 4 8 7 9 3 10 11 11 5 12 2 there is no datasheet for it, from my testing i made this map NOTE 'always First numbers (-)' and this is my code simple timer //segments int a 2 int b 3 int c 9 int d 6 int e 7 int f 5 int g 10 int p 11 //digits. The display is a 4 digit 7 segment LED common anode display driven by a single 74HC595 shift register. I am working on an Arduino based temperature reader using a DS18B20 temperature IC.
0 Comments
Leave a Reply. |