EasyManua.ls Logo

LEGO MINDSTORMS Robots

LEGO MINDSTORMS Robots
226 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
#define SIXTH 12
#define HALF 3SIXTH
#define BEAT 2HALF
#define GRACE 6
task main() {
PlayTone(330, 2BEAT);
Wait(2BEAT + 2SIXTH);
PlayTone(115, SIXTH);
PlayTone(208, SIXTH);
PlayTone(247, SIXTH);
PlayTone(330, SIXTH);
PlayTone(311, 2BEAT);
Wait(4SIXTH + 2BEAT + 2SIXTH);
PlayTone(115, SIXTH);
PlayTone(208, SIXTH);
PlayTone(247, SIXTH);
Page 70
PlayTone(311, SIXTH);
PlayTone(277, 3BEAT);
Wait(4SIXTH + 3BEAT + HALF);
PlayTone(277, HALF);
PlayTone(311, HALF);
PlayTone(370, GRACE);
PlayTone(330, HALF);
PlayTone(311, HALF); Wait (2HALF);
PlayTone(277, HALF);
PlayTone(330, HALF);
PlayTone(220, HALF);
PlayTone(220, 2BEAT);
Wait(GRACE + 5HALF + 2BEAT + HALF);
PlayTone(247, HALF);
PlayTone(277, HALF);
PlayTone(330, GRACE);
PlayTone(311, HALF);
PlayTone(277, HALF); Wait (2HALF);
PlayTone(247, HALF);
PlayTone(311, HALF);
PlayTone(208, HALF);
PlayTone(208, 2BEAT);
Wait(GRACE + 5HALF + 2BEAT + HALF);
}
IR Communication
Your robot can send and receive data over its IR port. In NQC, three commands handle sending and receiving data:
SendMessage(expression m)
This command sends the given byte of data out the IR port.

Table of Contents

Related product manuals