User manual

ASURO - 67
-
C for ASURO
9.2.3. void FrontLED (unsigned char status)
The Front-LED (D11) will be switched ON or OFF. Valid parameters are ON respectively OFF
Example:
The front-LED will be switched on by:
FrontLED(ON);
9.2.4. void BackLED (unsigned char left, unsigned char right)
The Back-LEDs (D15 and D16) will be switched ON or OFF. The  rst parameter describes the
state of the left back-LED (D15) while the second parameter describes the state of the back-LED
at the right side (D16). Valid parameters are ON respectively OFF
Example:
The back-LED at the right side (D16) will be switched ON and the back-LED at the left side (D15)
will be switched OFF by:
BackLED(OFF,ON);
9.2.5. void Sleep (unsigned char time72kHz)
This function will command the processor to wait some time. The waiting period may be de ned
by a parameter (unsigned char)
4
., containing a number of maximal 255 and counting cycles from a
72kHz-timer.
Example:
0,003s
The processor should sleep for ca. 3ms. ==>
1
= 216.
72KHz
The function sleep (216); will force the processor to wait for 3ms.
Sleep (216) ;
9.2.6. void MotorDir (unsigned char left_dir, unsigned char right_dir)
This function controls the direction of both engines and should be called before calling speed
controls. Valid parameters are
FWD (Forward), RWD (Backward), BREAK (
Brake or sudden stop,
by short circuiting the motors in a transistor bridge) and FREE (Freewheeling).
Example:
The left motor should be moving forward, while the right motor is halted.
MotorDir(FWD,BREAK);
4
The authors have chosen this method deliberately, just to train the readers brains.