File: test.nqc

package info (click to toggle)
nqc 2.3.r1-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,452 kB
  • ctags: 2,325
  • sloc: cpp: 14,379; lex: 304; yacc: 259; makefile: 126; ansic: 25
file content (17 lines) | stat: -rw-r--r-- 245 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define BUTTON	SENSOR_1
#define MOTOR	OUT_A

task main()
{
#ifdef __RCX
	// RCX needs to be told what kind of sensor is used
	SetSensor(BUTTON, SENSOR_TOUCH);
#endif

	On(MOTOR);
		
	until(BUTTON == 1);

	PlaySound(SOUND_CLICK);
	Off(MOTOR);	
}