Skip to content

Non-blocking drop-in replacement for read() function#28

Open
RedshiftVelocities wants to merge 7 commits intobluerobotics:masterfrom
Team1157:master
Open

Non-blocking drop-in replacement for read() function#28
RedshiftVelocities wants to merge 7 commits intobluerobotics:masterfrom
Team1157:master

Conversation

@RedshiftVelocities
Copy link

The read() function now no longer locks up the Arduino for 40ms. It can be run every main loop, but only communicates with the sensor within the timing spec in the datasheet. The example sketch has also been updated to demonstrate this. These changes are a drop-in replacement for the existing read() function.

Note that I haven't been able to test the code on a real sensor; I've just used another Arduino pretending to be one.

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.

1 participant