Thanks so much for the help!

On Thursday, March 3, 2016 at 12:46:02 PM UTC-5, William Hermans wrote:
>
> *I'm still a bit confused about while loops vs setInterval() though. Like 
>> I vaguely get that there is a difference between the two but I don't really 
>> understand javascript all that well. *
>>
>> *Why does setInterval() work while the while loop does not? What is the 
>> code if I wanted to implement my own setInterval() function?*
>>
>
> Here: http://stackoverflow.com/questions/729921/settimeout-or-setinterval 
> is a good explanation of what setInterval(), and setTimeout() *are*. But 
> again, Javascript is an event driven language, which in this context is an 
> incredible strength. setInterval(), and setTimeout() are events( or 
> callbacks if you prefer ). They're meant to "fire" when  a certain 
> condition has been met, and execute a callback function. These are all but 
> guaranteed to execute.
>
> On the opposite side of things. while is just a loop. A loop which may 
> repeat so often is actually overwhelms the code that is meant to run . . 
> .But in fact I'm not 100% sure what the problem may be. I have not looked 
> through every bit of related code, and quite honestly I won't either. My 
> instinct does tell me that there is a glitch in the bonescript code, and 
> just willy nilly running that code in a loop is the root cause. 
>
> On Thu, Mar 3, 2016 at 5:56 AM, Dennis Lee Bieber <[email protected] 
> <javascript:>> wrote:
>
>> On Wed, 2 Mar 2016 21:02:38 -0800 (PST), Audrey
>> <[email protected] <javascript:>> declaimed the following:
>>
>> >Hi sorry, yeah no I did actually use
>> >
>> >b.analogRead('P9_36', printStatus);
>> >
>> >although I did write it here as just analogRead('P9_36', printStatus);
>> >
>> >So I don't think that's the issue, although good point.
>> >
>>
>>         As gets pointed out in comp.lang.python quite often:
>>
>>         Always use cut&paste to avoid transcription errors that cause 
>> others to
>> go off in the wrong direction...        <G>
>> --
>>         Wulfraed                 Dennis Lee Bieber         AF6VN
>>     [email protected] <javascript:>    HTTP://wlfraed.home.netcom.com/
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to