I'm having problems using a Dallas DS18B20 Temperature Sensor with Annex32 WiFi 1.43.2 CAN BLE
The pin works ok for button input, and I've tried at least 3 different sensors, all of which work ok on a Sonoff.
So I'm suspecting there is a Tempr$() bug... perhaps someone else could check please ?
Does this snippet work for anyone ? Or perhaps another pin ?
temp$= tempr$(5)
wlog temp$
DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
hi
Your code doesn't work for me, but the below does:
D4 = 2
curr$ = TEMPR$(D4,1)
wlog curr$
Your code doesn't work for me, but the below does:
D4 = 2
curr$ = TEMPR$(D4,1)
wlog curr$
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
Thanks Zim,
Did you mean that yours doesn't work on pin5 of the esp32 either, or that it needs to include the optional [,1] device number ?
Anyway, if yours is working using pin 2 of an esp32 flashed with Annex32 WiFi 1.43.2 CAN BLE, then I guess I can use pin 2 also.
Did you mean that yours doesn't work on pin5 of the esp32 either, or that it needs to include the optional [,1] device number ?
Anyway, if yours is working using pin 2 of an esp32 flashed with Annex32 WiFi 1.43.2 CAN BLE, then I guess I can use pin 2 also.
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
Nope, that doesn't work for me either, which leaves me stumped.
But I didn't know that "D2" etc was used on esp32's though, so can you just confirm that you were actually using an esp32 flashed with Annex32 WiFi 1.43.2 CAN BLE please ? (else I won't get any sleep)
But I didn't know that "D2" etc was used on esp32's though, so can you just confirm that you were actually using an esp32 flashed with Annex32 WiFi 1.43.2 CAN BLE please ? (else I won't get any sleep)
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
Ta Zim, was me being a dummy - I had deliberately not been adding a pullup cos I've not been needing one when plugging the Dallas into the Sonoffs... but (duh) I suppose I must have previously included a pullup when doing the Sonoff S20 TX/RX mod a few years ago.
Thanx for helping me past that bout of brain fade.
Thanx for helping me past that bout of brain fade.
-
- Posts: 142
- Joined: Mon Feb 08, 2021 10:10 pm
- Location: Scotland
- Has thanked: 46 times
- Been thanked: 50 times
Re: DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
Annex seems to return a null string if nothing found:-
t$="anything"
t$= tempr$(12)
if t$="" then wlog "no device found"
t$="anything"
t$= tempr$(12)
if t$="" then wlog "no device found"
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: DS18B20 on Annex32 WiFi 1.43.2 CAN BLE ?
When you 'cut out the middle man' Tempr$ returns -127 if no Dallas device found (I've seen it often!).
wlog tempr$(5,1)
wlog tempr$(5,1)