... | ... | @@ -171,7 +171,7 @@ |
|
|
> }
|
|
|
> });
|
|
|
> ```
|
|
|
>
|
|
|
> ##### Fig. 6: ButtonListener code example.
|
|
|
>
|
|
|
> In order to make the program terminate we use the System.exit(int code) method with the int code being 0. At first
|
|
|
> we did not know what the ‘int code’ does, and the API gives no answer. We solved the problem by looking at other
|
... | ... | @@ -183,7 +183,7 @@ |
|
|
>
|
|
|
> #### Task
|
|
|
>
|
|
|
> Sivan Toledo, [3], has investigated how the sound sensor can be used to detect claps. Through an investigation of a
|
|
|
> Sivan Toledo, [5], has investigated how the sound sensor can be used to detect claps. Through an investigation of a
|
|
|
> sequence of sound sensor readings during a clap he suggest the following method to detect a clap:
|
|
|
>
|
|
|
> A clap is a pattern that starts with a low-amplitude sample (say below 50), followed by a very-high amplitude
|
... | ... | @@ -289,6 +289,9 @@ |
|
|
> Code:
|
|
|
> https://drive.google.com/folderview?id=0B7MCCWb4fFztfkhLdElnem8xclFsLWp1WnVhRGdGU25CbHRUTVRIUDFaSG5tVDdLUXNSQ2M&usp=sharing
|
|
|
>
|
|
|
> [3] - [link til leJos tutorial:] (http://www.lejos.org/nxt/nxj/tutorial/ListenersAndEvents/Listeners_Events.htm)
|
|
|
> [3] [link til leJos tutorial:] (http://www.lejos.org/nxt/nxj/tutorial/ListenersAndEvents/Listeners_Events.htm)
|
|
|
>
|
|
|
> [4] [leJos terminate program example:](http://lejos.sourceforge.net/forum/viewtopic.php?t=3267)
|
|
|
>
|
|
|
> [4] [leJos terminate program example:](http://lejos.sourceforge.net/forum/viewtopic.php?t=3267) |
|
|
\ No newline at end of file |
|
|
> [5] [Sivan Toledo](http://www.tau.ac.il/~stoledo/lego/ClapCounter/)
|
|
|
> |
|
|
\ No newline at end of file |