Still working on getting i2c to be usable and documented. I don't think that the i2c has been tested yet.
http://download.milesburton.com/Arduino ... 72Beta.zip
I added it via the Arduino IDE: Sketch->Include Library->Add .ZIP Library
Just before the line: String BasicVersion = "ESP Basic 1.xx";
//change the next line to match the pin you'd prefer to use, I use GPIO5
#define ONE_WIRE_BUS 5
// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
//Output lead:red (VCC), yellow(DATA) , black(GND) -55'C~125'C
// Pass our oneWire reference to Dallas Temperature.
In startup() after the line: Serial.begin(9600);
// Start up the 18b20 library
Lastly, after the entry for the ai command in ExicuteTheCurrentLine(), I added a new command "ti":
if ( Param0 == "ti")
valParam2 = GetMeThatVar(Param2).toInt();
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
sensors.requestTemperatures(); // Send the command to get temperatures
Then compile & load into your ESP device.
I have 2 DS18B20 devices hooked up together, so to read each one:
let tempa = 0
let tempb = 0
ti tempa 0
ti tempb 1
Todo: Add a setup command so that one or more ports can be setup for OneWire capability from a BASIC command instead of being compiled in.
Now I'll go make my home thermostat