Download NQC Programmer`s Guide

Transcript
3
2.5.2
#define........................................................................................................21
2.5.3
Conditional Compilation............................................................................22
2.5.4
Program Initialization ................................................................................22
2.5.5
Reserving Storage ......................................................................................22
NQC API....................................................................................................................24
3.1
Sensors ...............................................................................................................24
3.1.1
Types and Modes RCX, CyberMaster .......................................................24
3.1.2
Sensor Information.....................................................................................27
3.1.3
Scout Light Sensor Scout...........................................................................28
3.2
Outputs...............................................................................................................29
3.2.1
Primitive Calls............................................................................................29
3.2.2
Convenience Calls......................................................................................31
3.2.3
Global Control RCX2, Scout .....................................................................32
3.3
Sound .................................................................................................................33
3.4
LCD Display RCX.............................................................................................34
3.5
Communication..................................................................................................36
3.5.1
Messages RCX, Scout................................................................................36
3.5.2
Serial RCX2 ...............................................................................................37
3.5.3
VLL Scout..................................................................................................39
3.6
Timers ................................................................................................................39
3.7
Counters RCX2, Scout.......................................................................................40
3.8
Access Control RCX2, Scout.............................................................................41
3.9
Events RCX2, Scout ..........................................................................................42
3.9.1
RCX2 Events RCX2 ..................................................................................42
Page ii