Git Product home page Git Product logo

ds18b20's People

Contributors

davidlehrian avatar feelfreelinux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ds18b20's Issues

1 wire?

Hi there
Thanks for the simple library
Can it be used to 1 wire communication?

Write to registers

Hi there.
Sorry for the noobie question and the poor english, but could you tell me how can I write to the DS18B20 registers with this library? Such as set the alarm, check the address and so. Reading the temperature is cool, but the datasheet says that this little guy is able to do more!
Thanks!

read() and send() conflict with lwip read and send

If the application requires the use of both libraries, there will be errors at compile time due to conflicting names of functions. Currently I have this set up to work by changing the names to add "ds_" prefixes.

Wrong temperatures every once in a while

Hello,

I am using your code in a simple project of mine. While doing so, I notice that every once in a while the temperature reading is incorrect. My guess is that it has something to do with the task scheduler switching tasks during one-wire communication. I fixed this by filtering out these measurements, but that is more of a workaround than a proper fix.

Have you noticed this behaviour?

I have just checked, but I don't have an extra sensor, I will order some, but it will take some time to arrive.

Difference between ds18b20_get_temp() and ds18b20_getTempC()

Could you please explain why there is a difference in temperature values between ds18b20_get_temp() and ds18b20_getTempC()?

My question is related to the following part of the code from main.c file:

while (1) {
	ds18b20_requestTemperatures();
	float temp1 = ds18b20_getTempF((DeviceAddress *)tempSensors[0]);
	float temp2 = ds18b20_getTempF((DeviceAddress *)tempSensors[1]);
	float temp3 = ds18b20_getTempC((DeviceAddress *)tempSensors[0]);
	float temp4 = ds18b20_getTempC((DeviceAddress *)tempSensors[1]);
	printf("Temperatures: %0.1fF %0.1fF\n", temp1,temp2);
	printf("Temperatures: %0.1fC %0.1fC\n", temp3,temp4);

	float cTemp = ds18b20_get_temp();
	printf("Temperature: %0.1fC\n", cTemp);
	vTaskDelay(1000 / portTICK_PERIOD_MS);
}

Example of my output in console:
Temperatures: 78.8F 77.9F
Temperatures: 26.0C 25.5C <====== ds18b20_getTempC()
Temperature: 24.0C <====== ds18b20_get_temp()

The example was tested on ESP32-WROOM-32E using ESP-IDF v5.0.1

Purpose of system_init() in example

Hey there,

might be an absolute stupid question, but what is the purpose of the
system_init()
in your example https://github.com/feelfreelinux/myesp32tests/blob/master/examples/ds18b20_temperature.c ?
Building it, i get an error because there is no definition found for that function.
Maybe the example is a little outdated?

I removed system_init() but don't know if that was correct since i still get no temperature and see no action on the GPIO when checking with my oscilloscope. Anyway, building is possible now.

In addition to that, is it correct to substitute

DS_init(DS_PIN) by ds18b20_init(DS_PIN)

and

DS_get_temp() by ds18b20_get_temp()?

Thanks man, i'd realy be happy if you coul'd have a look on it :-)

License

Hi, first off, thanks for the work. Much appreciated.

I have used your library on an open source project and before I post it to github I would like to know what is the license.

best regards,

Find A Bug

when it goes first while then numberFound = 1,but the secode while set numberFound = 0,so numberFound always no be 2;
my solution is clear numberFound = 0(line 26)
the result is :
Temperatures: 80.6F 80.6F
Temperatures: 27.0C 27.0C
Temperature: 27.0C

	// search for 2 addresses on the oneWire protocol
	while (search(tempSensorAddresses[numberFound],true)) {
		numberFound++;
		if (numberFound == 2) break;
	}
	// if 2 addresses aren't found then flash the LED rapidly
	while (numberFound != 2) {
		numberFound = 0;

if you have a good idea for solve this problem please tell me. thank you every much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.