Closed
Description
Hi,
I am trying to add a dallas sensor to a sonoff dual r2, after compiling with -DDALLAS_PIN=9 -DDALLAS_SUPPORT=1 -DSENSOR_SUPPORT=1
and modifying hardware.h to
//#define BUTTON2_PIN 9 // Button 1 on header
#define BUTTON2_PIN GPIO_NONE // Button 1 on header
I am getting in the console:
[294200] [SENSOR] Initializing Dallas @ GPIO9
[294201] [GPIO] Failed getting lock for GPIO9
[294201] [SENSOR] -> ERROR 7
What am I doing wrong?
With tasmota I can read temperature in GPIO9
Activity
mcspr commentedon Oct 24, 2019
Firmware tracks Dallas GPIO usage via some helper methods here:
espurna/code/espurna/gpio.ino
Lines 17 to 28 in e17ee61
But it does not even get to the locking part, because GPIO number is less than 12:
espurna/code/espurna/gpio.ino
Lines 12 to 13 in e17ee61
Adjusting 12 to 9 will fix the specific issue, because 8285 does not have GPIO9 connected to the SPI
reydecopas commentedon Oct 24, 2019
perfect!!! thank you!! it works!!!