Closed ajpowell closed 8 years ago
I cant find any OneWire devices to test with( i know i have a bunch of DS18's somewhere.... ) but i suspect the standard ESP8266 Arch should work.
If your comfortable trying, edit /packages/digistump/hardware/oak/0.9.2/variants/oak/pins_arduino.h Insert the following anywhere after line 29, i just stuck it right at the end before the final #endif
This will let you compile, just not sure if it's a full fix though.
Hey @DarkLotus, I tried this - the code compiles and I have deployed OTA - something isn't right though - the serial output is:
ROM = 28 D9 14 B1 3 0 0 D5
Chip = DS18B20
Data = 1 FF 7 4B 46 7F FF 1 10 2F CRC=2F
Temperature = 127.94 Celsius, 262.29 Fahrenheit
No more addresses.
Certainly not 127°C here! But at least I am getting response from the device!
I will be out all day today - will take a deeper look tonight if not back too late.
Hey cool it sort of worked, I still cant find a DS18B20, so hopefully someone else can add some more insight. Can probably rule out timing, DHT library by adafruit uses the same delaymicroseconds call and works okay.
OK - looked at this again and found that wire connecting to the DS18B20 pin 3 (Vdd) wasn't making a good connection :disappointed: - replaced the wire and everything is working :grinning:
ROM = 28 D9 14 B1 3 0 0 D5
Chip = DS18B20
Data = 1 6F 1 4B 46 7F FF 1 10 67 CRC=67
Temperature = 22.94 Celsius, 73.29 Fahrenheit
No more addresses.
23°C is more like it for house with central heating on at the end of damp and windy day in England!
Closing - defining this (in next release) in pins_arduino.h so that it is present for all libraries - thank you both!
it was really simple just include the library of the sensor before onewire its fixed ...really stupid
C:/Users/<username>/Documents/Arduino/libraries
tools>manage libraries
When compiling code (modified form of supplied example code DS18x20_Temperature - changed to use Particle.delay() rather than delay()), I get the following error:
I have looked in the OneWire.h file and see the definitions just prior to line 119, but I do not know what the board is defined as...at a guess, I expect it will match, or be similar to, 'ARDUINO_ARCH_ESP8266'