• Yes, you are correct, our edits are stomping on each other. Maybe I'll slow down on the Bourbon. . . . . Not!

    'So I would prefer to integrate every set of data at every 833Hz = 0.0012s'

    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.

  • 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 using console.log() will start to bog down depending on the actual lines of code.

    EDIT:
    getTime() returns a value in seconds

    http://www.espruino.com/Reference#l__glo­bal_getTime

    setInterval() requires a value in msec

    http://www.espruino.com/Reference#l__glo­bal_setInterval

    Check out the link in #29

    Inline 'C' will speed things up. But I don't know if it will solve your specific issue.

About

Avatar for user101931 @user101931 started