Fun Projects for your LEGO® MINDSTORMS® NXT! |
Music Scale Player |
|
This first program uses color sensor events to play
different notes in a major scale in the simplest possible way. Because
there are only 7 unique colors, the scale can only have 7 different
notes. Also, you will notice a few problems with how it works, which the
more advanced program below tries to fix.
This more advanced program plays an 8-note major scale, with the top C (black) an octave higher than the bottom C (also black). It will switch to a minor scale if you hold down the right arrow button on the hub while playing.
In addition, this program uses various logic techniques to address several problems with the simpler program above, including:
|
Copyright
©
2007-2021 by Dave Parker. All rights reserved. |