-
Ahhhhh, we are on to something.
Yes. 0.003 is a value that represents msec. But the
setInterval()
function needs a value that * IS * the number of msec. So a value of 3 would be needed.Experience tells me though, as you approach below 20 for instance, that the time to interpret
and execute a Javascirpt statement (remember we have an interpreter, not compiled 'C' as in Arduino) then print out usingconsole.log()
will start to bog down depending on the actual lines of code.EDIT:
getTime()
returns a value in secondssetInterval()
requires a value in msecCheck out the link in #29
Inline 'C' will speed things up. But I don't know if it will solve your specific issue.
Yes, you are correct, our edits are stomping on each other. Maybe I'll slow down on the Bourbon. . . . . Not!
As your tests show, a data fetch over SPI is taking 0.003+ sec, so that confirms your preference won't be possible.
Are you attempting something like the Wii controller would need as real-time input? Just trying to get an idea of why so much data in such as short period of time is required.