![Arexx DLR ASURO Скачать руководство пользователя страница 64](http://html.mh-extra.com/html/arexx/dlr-asuro/dlr-asuro_assembly-and-operation-manual_2967241064.webp)
ASURO - 64 -
C for ASURO
9.1.7. Pointers and vectors
Pointers and vectors will be described to an extent, needed for the ASURO-operations.
If we need to track data from the line tracing sensors or odometric sensors we will need vectors.
Their declaration is rather simple:
int lineData[2];
int odometrieData[2];
As you will recognize we will create two vectors (lData, oData) with 2 elements for linetracing and
for odometrics. By calling ASURO Function (LineData(), OdometrieData ()) element [0] receives
the value of the left sensor and element [1] receives the value of the right sensor.
We will demonstrate this method in an example:
If the right sensor receives more light than the left sensor, command1 should be executed
otherwise command2.
int lData[2];
// Provide memory space for measurement results
LineData(lData);
// Reading measurement data
if (lData[1] > lData[0])
command1;
else
command2;
To use the serial interface functions (
SerWrite ()
,
SerRead ()
) we need character strings. These
will be declared as follows:
char message[] = “This is a text string”
In order to send a text string in ASURO, a function SerWrite() is called with appropriate
parameters. The fi rst parameter contains the text string or the variable containing the text string,
the second variable describes the number of characters to be sent, eg.:
SerWrite(message,20);
respectively
SerWrite(„This is a text“,14);
will transmit a message “This is a text” over the IR-Interface.
Содержание 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...