#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
#else
#include <unistd.h>
#define Sleep( msec ) usleep(( msec ) * 1000 )
#endif
int main( void )
{
int i;
uint8_t sn;
FLAGS_T state;
char s[ 256 ];
#ifndef __ARM_ARCH_4T__
ev3_brick_addr = "192.168.0.204";
#endif
#ifndef __ARM_ARCH_4T__
printf( "The EV3 brick auto-detection is DISABLED,\nwaiting %s online with plugged tacho...\n", ev3_brick_addr );
#else
printf( "Waiting tacho is plugged...\n" );
#endif
printf( "*** ( EV3 ) Hello! ***\n" );
printf( "Found tacho motors:\n" );
for ( i = 0; i < DESC_LIMIT; i++ ) {
if ( ev3_tacho[ i ].type_inx != TACHO_TYPE__NONE_ ) {
}
}
int max_speed;
printf( "LEGO_EV3_M_MOTOR is found, run for 5 sec...\n" );
printf(" max_speed = %d\n", max_speed );
Sleep( 100 );
do {
} while ( state );
printf( "run to relative position...\n" );
for ( i = 0; i < 8; i++ ) {
Sleep( 500 );
}
} else {
printf( "LEGO_EV3_M_MOTOR is NOT found\n" );
}
printf( "*** ( EV3 ) Bye! ***\n" );
return ( 0 );
}