-
Notifications
You must be signed in to change notification settings - Fork 82
Too many blocking code:( #2
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
Comments
Hi Pascal, Thanks for your interest in LIDAR-Lite! The purpose of this library is to help people get started using the sensor with an easy to understand interface. It is written for the Arduino platform because many people are already familiar with it, and it is intentionally as simple as possible. User AlexisTM has written a robust LIDAR-Lite library for Arduino that uses a non-blocking interface. This may be useful for your project. Regards, Neil Severson |
Amazing !!! Thanks a lot for the AlexisTM information !!! (I not found with my google request) |
Indeed, I am actually the last library from the search "lidarlite" :( |
AlexisTM, a minimalist example is required inside your lib. Because no one can buy 5 or more Lidars to test it:) I open a doc issue when I make my first one lidar sample:) |
Here it is : https://github.com/AlexisTM/LIDAREnhanced/blob/master/example/OneLaser/OneLaser.ino I never tried on other chips... and I include Arduino.h to make continuous integration easier. |
Very easy to integrate this lib inside my projet:) thanks a lot. |
I am happy it worked so well :D Anf that's a funny project (I just checked it) |
// Trigger pin, can be unplugged Why you assign useless pin ? How I can get sure they are never used (if use near all I/O on my PIC32MX in future) ? Your lib is energy efficient for my battery (you use the "Enable" pin this is a very good idea) How to sleep it ? If I stop to call the Controller ? Edit : C++ code is well documented and answer all |
Hi, indeed, there are missing documentation as I am currently the only one using it, I have no feedback yet.
NOTE : The Trigger pin & Mode pin are not yet used. It could be useful for someone who wants to take measurements with PWM. Plus, I tried taking measurements with the "continuous" mode of the lasers (with trigger & mode pin), but it was strangely slower. Therefore, the mode pin & trigger pin are never used. |
At this time I get a spinOnce freeze with wire on PIC32 last chipkit Core. Debug enabled : setup() |
Same problem with a new 5V 1A Tracopower DC-DC. The stock lidar lib (this one) work.
|
Now it work !!!
I make a mistake I swapped uint8_t(2) and uint8_t(1) for readWord() / readByte() when I solved a requestFrom compatibility problem lol |
It work for a time and freeze:( EDIT : To solve the problem I must comment the servo lib. There is a conflict with I2C and servo lib on chipKIT Core API !!! EDIT2 : But I found a random performance drop with the lib, I call the spin each millisec. :( |
I agree for Wire ... Especially for the Arduino Due.
There are probably already Wire replacement libraries for your chip! (Note:
did you tested with 100kHz I2C instead of 400kHz?)
If you need to modify I2C functions, almost all are in the I2CFunctions
file and there is one occurrence in Controller::begin, which start Wire.
https://github.com/AlexisTM/LIDAREnhanced/blob/master/I2CFunctions.h
Le dim. 4 déc. 2016 01:15, Pascal <[email protected]> a écrit :
… It work for a time and freeze:(
Wire is unreliable
I must rewrite this directly in PIC32 DTWI to bypass the crap wire wrapper
from chipKIT:'(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGp06Lv2Q9BBDHGQekUdWEUIZEh47lynks5rEgYagaJpZM4LAqwY>
.
|
Yes I run I2C @ 400KHz I already commented out the low level configuration line inside your code. Because I have a define in my Digilent DTWI header. There is a I2C vs another library conflict and a timer/interrupt problem. |
I opened an issue on chipKIT Core API |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
Very good spec sensor but the lib is useless for serious application.
There is too many blocking code inside it :
while(busyFlag != 0) // Loop until device is not busy
{
... update busyFlag ...
}
delay(1); // 1 ms delay for robustness with successive reads and writes
You can't do this on a microcontroller 1ms is a huge waste like many years lol.
My project need a serious non blocking code, I must rewrite this unusable lib :(
Pascal
The text was updated successfully, but these errors were encountered: