-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fast Pulse #19
Comments
You actually just need to export the header once. In the ready callback, run dq.set(0, function(){ dq.set(1, function(){ cb(dq.value); }); }); I'm on my iPad so it's a bit hard to type, hope that makes sense. |
Most browsers (including Chrome) has a minimum countdown around 5-8ms with I don't know if V8 has fixed this, better use the internal I have a fork that takes an array of @EnotionZ Do you think µs preciseness can be done in javascript? |
@vicary the bottleneck is probably the fact that we're using node's filesystem to write header values. I bet if we wrote a node c++ module that wraps the wiringPi library, we'd get faster timing. As @kilianc said, we can take a high resolution (nanosecond) timestamp with |
I am not very sure about how |
Hi;
Using a scope to monitor the pin, I seem to be unable to get a pulse faster than 10ms using the following code, but I really need the pulse width to be in microseconds rather than milliseconds, hence the setTimeout value of 0, which I was hoping would last a few clock cycles. Even if I remove the SetTimeout() function, the pulse width is still 10ms.
there is a 1K pullup on gpio.4.
The following code is intended to pull gpio4 low for 500us, then release it and then read whether the connected device has pulled the line low (presence) and log the result to the console, however I am unable to get a pulse width less than 10ms, any ideas why ??
The text was updated successfully, but these errors were encountered: