Pages: [1]   Go Down
Author Topic: DS18B20 Temperature Sensor Interrupt  (Read 225 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi.

I checked the Dallas library and it uses delays so it stop the microcontroller.

Is there any library who use interrupts to retrieve temperature from that sensor?


Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 70
Posts: 3727
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a function in the library that allows you to avoid the delay: setWaitForConversion. You have to manage the wait yourself using millis, but it lets you do other work while you're waiting.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was trying to program the interrupts but Im leaving. I am going to use another microcontroller to handle the polling.

This code does not work. I left here if someone want to use it or take as a reference.

* temperature1wire.cpp (7.24 KB - downloaded 4 times.)
* temperature1wire.h (1.01 KB - downloaded 3 times.)
Logged

Pages: [1]   Go Up
Jump to: