Comments (4)
Hi,
I did have the same issue and tried so many options to get this working.
The library just works fine with my esp8266 but not with my esp32.
Error was always:
error: call to non-constexpr function 'uint32_t getCpuFrequencyMhz()'
So looking into
\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32\Arduino.h
and comparing to
\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\Arduino.h
I found the difference in the following line
esp8266:
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
esp32:
#define clockCyclesPerMicrosecond() ( (long int)getCpuFrequencyMhz() )
and here is the SOLUTION:
Open File:
\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32\Arduino.h
change
#define clockCyclesPerMicrosecond() ( (long int)getCpuFrequencyMhz() )
to
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
Thats it now it compiles without errors.
-e
from onewirehub.
Relying on the fact that the GPIO_DEBUG_PIN
should go low for 1ms upon bootup I experimented with changing VALUE_IPL
and found that by changing from the default of 39
to 51
I was able to dial the pulse width to 1.0ms:
The code is now working as expected on this old ESP32_DEVKIT_V1 module with flash frequency set to 80MHz and CPU frequency set to 240MHz in the Arduino IDE.
from onewirehub.
I ran into this problem trying to get OneWireHub running on a ESP32. Although the change mentioned does allow the code to compile I cannot get it to work on a ESP32 (2 different boards). If I switch to an old Arduino board the code and hardware works as expected but I need OneWireHub running on a ESP32 for it's WiFi.
The Readme says this works with ESP32 but perhaps some changes have broken that ability?
from onewirehub.
In the readme I saw this comment:
during hub-startup it issues a 1ms long high-state (you can check the instruction-per-loop-value for your architecture with this)
So I hooked up a scope and checked and I'm measuring a pulse at boot up of 1.3ms instead of 1ms with a ESP32 Dev Module:
I tried to run the calibration but that just kept throwing panic errors.
I have this hooked up to a master and I was under the impression that I should get more pulses but that's not happening, only the initial one during boot up.
from onewirehub.
Related Issues (20)
- ZONT controller HOT 4
- Possible 24B33 support ?
- error:first bit of byte timeout HOT 1
- Issue on ESP32. Missing bit because interrupts executed
- Why DS2506_EEPROM.ino can't emulate more than 574 bytes of data? HOT 1
- Build issues on PlatformIO (for Arduino Uno)
- Stability / timing issue HOT 1
- Non-Volatile Memory / Save Page Data to EPROM
- Would it be possible to adapt this project with ATtiny85 for 1-wire + I2C? HOT 1
- ESPHome , Home Assistant HOT 1
- Need solution for ESPHome HOT 1
- Support for Raspberry RP2040 HOT 3
- Supported and tested Hardware: Attiny84 - Global variables use 574 bytes (112%) of dynamic memory HOT 17
- samd51 m4
- Instability when connected with several real slaves HOT 2
- Support for ATtiny816 / 1-series ATtiny HOT 1
- Not Run Correctly on STACK-M5 ATOM-U (ESP32) HOT 4
- DS2431 wrong answer (0x55) at Copy Scratchpad Command
- DS2430 is not included in keywords.txt.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onewirehub.