Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove arduino dependency #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

luar123
Copy link

@luar123 luar123 commented Nov 14, 2024

Remove Arduino dependency and add an example for platformio with espidf.
Without Arduino the I2C or SPI read and write functions need to be supplied together with delayus and millis.
Tested with and without Arduino framework.

This needs boschsensortec/Bosch-BME68x-Library#8

Library versions/locations in the example platformio.ini file should be updated when releasing.

Related: #47 #6

@TCB13
Copy link

TCB13 commented Dec 1, 2024

How does this handle sleep scenarios on those boards? millis() are a controversial topic because they aren't kept between sleep in most sleep modes, however they do work in SLEEP_MODE_IDLE and the sensor doesn't work properly without correct timming.

@luar123
Copy link
Author

luar123 commented Dec 1, 2024

Short answer: not at all
For arduino-framework there is no change, it will us arduinos implementation of millis().
On other platforms the user has to provide it. With esp-idf for example you can use esp_timer_get_time()which should keep the time in light sleep if I remember correctly. In deep sleep everything in ram is lost including the state, so this needs to be handled by the user anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants