ASURO - 69 -
C for ASURO
Example:
The string „Go Ahead“ should be received and we want to be sure all characters do have arrived
at the ASURO before we continue operation.
#include “asuro.h”
int main(void) {
char data[8];
// allocate storage
Init();
SerRead (data,8,0);
// Read data
MotorDir(FWD,FWD);
MotorSpeed(120,120);
while(1);
// Eternal loop
return 0;
}
.
.
.
9.2.10. void LineData(unsigned int *data)
This function has been developed to read the light intensity of both phototransistors at the
bottomside of ASURO. You will have to defi ne an address pointer to a dual integer location
in memory. The function will transfer the AD-converter values of measurement data by both
phototransistors. The fi rst integer value represents the converter value of the left (T9), the second
integer value represents the converter value of the right (T10) phototransistor. Maximum intensity
(brightness) is referenced by ’1023’, while total darkness
is referenced by ’0’. Normally these extreme values will not be found, and in practice measurement
values will be found in between.
Example:
Reading the light intensity of both phototransistors (T9, T10)
unsigned int data[2];
//Allocate storage
.
.
LineData(data);
data[0] contains the value measured by the left phototransistor (T9)
data[1] contains the value measured by the right phototransistor (T10)
Содержание DLR ASURO
Страница 36: ...ASURO 36 Software Now this screen will show up Click I Agree This screen appears Click Next...
Страница 37: ...ASURO 37 Software The next screen appears Click Install and the next screen appears Wait...
Страница 40: ...ASURO 40 Software Select on the rigth side C C C C is selected Click Add to insert a new tool...
Страница 45: ...ASURO 45 Software Just for try we will open the file C ASURO_src FirstTry test c Click Open...
Страница 74: ...ASURO 74 B ASURO DIAGRAM Appendices...
Страница 75: ...ASURO 75 Appendices C RS 232 Transceiver...
Страница 76: ...ASURO 76 D USB Transceiver Appendices...
Страница 77: ...ASURO 77 E Block diagram ASURO F Block diagram PIC processor Appendices...
Страница 78: ...ASURO 78 G Contents ASURO KIT Appendices...