Download NQC Programmer`s Guide

Transcript
3
2.5.2
#define....................................................................................................... 22
2.5.3
Conditional Compilation........................................................................... 22
2.5.4
Program Initialization ............................................................................... 23
2.5.5
Reserving Storage ..................................................................................... 23
NQC API................................................................................................................... 25
3.1
Sensors .............................................................................................................. 25
3.1.1
Types and Modes RCX, CyberMaster ...................................................... 25
3.1.2
Sensor Information.................................................................................... 28
3.1.3
Scout Light Sensor Scout.......................................................................... 29
3.1.4
Spybotics Sensors Spy .............................................................................. 30
3.2
Outputs.............................................................................................................. 30
3.2.1
Primitive Calls .......................................................................................... 30
3.2.2
Convenience Calls .................................................................................... 32
3.2.3
Global Control RCX2, Scout .................................................................... 34
3.2.4
Spybotics Outputs ..................................................................................... 35
3.3
Sound ................................................................................................................ 35
3.4
LCD Display RCX............................................................................................ 36
3.5
Communication................................................................................................. 38
3.5.1
Messages RCX, Scout............................................................................... 38
3.5.2
Serial RCX2 .............................................................................................. 39
3.5.3
VLL Scout................................................................................................. 41
3.6
Timers ............................................................................................................... 41
3.7
Counters RCX2, Scout, Spy.............................................................................. 42
3.8
Access Control RCX2, Scout, Spy ................................................................... 43
Page ii