Hello,
i try to use A Onewire DS2408
A sujet was started by Janosik @Janosik , but the sujet was close. and when i tried to compile then crash.
i try also to use A Onewire DS2408 exemple and compilation crash also.
je want just interrupt on the ds2408.
I'm french then sypa with my english
i use a esp32 with ds2408?
can you help me ?
thanks
#include <DS2408.h>
#include <OneWire.h>
DS2408 ds(34);
Devices devices;
void setup(){
ds.find(&devices);
}
void loop(){
uint8_t readByte=ds.get_state(devices[0]);
int pins=0;
for(int i=0;i<4;i++){
int readBit=bitRead(readByte,i);
bitWrite(pins,i,1);
bitWrite(pins,i+4,readBit);
}
ds.set_state(devices[0],pins);
delay(100);
}
and the error message:
Arduino : 1.8.12 (Windows 10), Carte : "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, Core 1, Core 1, None, Disabled"
In file included from C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub.h:22,
from C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireItem.h:4,
from C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\DS18B20.h:11,
from C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\DS18B20.cpp:1:
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h: At global scope:
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:27:59: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_TIMEOUT = { 5000_us }; // for not hanging to long in reset-detection, lower value is better for more responsive applications, but can miss resets
^~~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:28:60: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MIN[2] = { 430_us, 48_us }; // should be 480
^~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:28:68: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MIN[2] = { 430_us, 48_us }; // should be 480
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:29:60: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MAX[2] = { 960_us, 80_us }; // from ds2413
^~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:29:68: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MAX[2] = { 960_us, 80_us }; // from ds2413
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:32:61: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_TIMEOUT = { 20_us }; // probe measures 25us, duration of high state between reset and presence
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:33:60: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MIN[2] = { 160_us, 8_us }; // was 125
^~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:33:69: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MIN[2] = { 160_us, 8_us }; // was 125
^~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:34:60: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MAX[2] = { 480_us, 32_us }; // should be 280, was 480
^~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:34:68: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MAX[2] = { 480_us, 32_us }; // should be 280, was 480
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:37:58: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_MSG_HIGH_TIMEOUT = { 15000_us }; // there can be these inactive / high timeperiods after reset / presence, this value defines the timeout for these
^~~~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:38:60: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_SLOT_MAX[2] = { 135_us, 30_us }; // should be 120, measured from falling edge to next falling edge
^~~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:38:68: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_SLOT_MAX[2] = { 135_us, 30_us }; // should be 120, measured from falling edge to next falling edge
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:41:61: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MIN[2] = { 20_us, 4_us }; // should be 15, was 30, says when it is safe to read a valid bit
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:41:69: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MIN[2] = { 20_us, 4_us }; // should be 15, was 30, says when it is safe to read a valid bit
^~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:42:61: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MAX[2] = { 60_us, 10_us }; // low states (zeros) of a master should not exceed this time in a slot
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:42:68: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MAX[2] = { 60_us, 10_us }; // low states (zeros) of a master should not exceed this time in a slot
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:43:61: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_WRITE_ZERO[2] = { 30_us, 8_us }; // the hub holds a zero for this long
^~~~~
C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub\src\OneWireHub_config.h:43:69: error: 'constexpr timeOW_t operator""_us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_WRITE_ZERO[2] = { 30_us, 8_us }; // the hub holds a zero for this long
^~~~
Utilisation de la bibliothèque OneWireHub version 2.2.3 dans le dossier: C:\Users\Didier SSD\Documents\Arduino\libraries\OneWireHub
Utilisation de la bibliothèque OneWire version 2.3.7 dans le dossier: C:\Users\Didier SSD\Documents\Arduino\libraries\OneWire
exit status 1
Erreur de compilation pour la carte ESP32 Dev Module
and the source : GitHub - orgua/OneWireHub: OneWire slave device emulator
thanks
Didier