Hi Team!
A wish. I have played around with the different examble with DS1820 an DS 18B20 (Ben´s and Martin´s) here in forum. They work fine as long the temperature is above 0.00 Degree, but as soon I go under 0 Degree I get some strange value in the display Eks. -3.-10 should be -3.10
I would be nice with a component in the "drop down list" (Just like the DHT22 and the SHT21 wich work fine) for the DS18 device, and maybe if it is possible in properties to change between the B and the none B type and working with Pic and Arduino devices.
Unfortunately I am not able to create one, sorry . Hope some can and will spend some time for that.
Br Jorgen
DS1820 + DS18B20
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: DS1820 + DS18B20
Hi Martin!
Hereby two Programs. One for the DS1820 and one for DS18B20 It is some programs taken from here in fora, I think one of Ben´s and one of Martin´s
Common for both of them, they work both perfect as long the temperatur is over 0 Degree. But under eks. -2.-23
You are right, maybe something with display readout.
In these test, I use LDC, but my plan is to use them in a project in your nice MAX7219 component.
Hope you can help, please.
Br Jorgen
Hereby two Programs. One for the DS1820 and one for DS18B20 It is some programs taken from here in fora, I think one of Ben´s and one of Martin´s
Common for both of them, they work both perfect as long the temperatur is over 0 Degree. But under eks. -2.-23
You are right, maybe something with display readout.
In these test, I use LDC, but my plan is to use them in a project in your nice MAX7219 component.
Hope you can help, please.
Br Jorgen
- Attachments
-
- SingleOneWireDS1820Arduino.fcfx
- (11.79 KiB) Downloaded 215 times
-
- 1. Single OneWire DS18B20ArduinoMega.fcfx
- (12.46 KiB) Downloaded 212 times
-
- Valued Contributor
- Posts: 1191
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
- Contact:
Re: DS1820 + DS18B20
Hi Jorgen
I think the problem is here: Temp2 is getting the same sign as temp - which works AOK with +ve numbers (as the '+' isn;t displayed)
The simplest fix should be to use the 'abs' function:
- but I've only FC7 here and it doesn't seem to support it so:
Though fabs night work too??
Martin
I think the problem is here: Temp2 is getting the same sign as temp - which works AOK with +ve numbers (as the '+' isn;t displayed)
The simplest fix should be to use the 'abs' function:
Code: Select all
temp2 = abs((temp mod 2) * 5)
Code: Select all
if temp2<0 then temp2 = 0-temp2
Martin
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: DS1820 + DS18B20
I created a flowchart here a fair while ago that displayed temperatures below 0.
Maybe you can use the formula in that within your flowchart?
Maybe you can use the formula in that within your flowchart?
Martin
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: DS1820 + DS18B20
Hi Martin!
Thank you. For test, I change the device to an Arduino Mega and an I2c display, perfect, working so nice and perfect
Thank´s. have a nice evening.
Br Jorgen
Thank you. For test, I change the device to an Arduino Mega and an I2c display, perfect, working so nice and perfect
Thank´s. have a nice evening.
Br Jorgen
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: DS1820 + DS18B20
Hi Jorgen,
Glad you now have a working version.
Thanks for letting us know.
Glad you now have a working version.
Thanks for letting us know.
Martin