#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
#else
#include <unistd.h>
#define Sleep( msec ) usleep(( msec ) * 1000 )
#endif
int main( void )
{
char s[ 256 ], name_port[ 16 ];
uint8_t sn_port;
uint8_t val = 0;
printf( "Waiting the EV3 brick online...\n" );
printf( "*** ( EV3 ) Hello! ***\n" );
printf(
"Set mode of the EV3 output port (%s)...\n",
ev3_port_name( OUTPUT_C, EXT_PORT__NONE_, 0, name_port ));
printf( "%s: %s\n", name_port, s );
}
printf( "max_brightness: %d\n", val );
}
Sleep( 2000 );
printf( "trigger: %s\n", s );
}
Sleep( 5000 );
printf( "Reset mode of the EV3 output port...\n" );
printf( "%s: %s\n", name_port, s );
}
printf( "*** ( EV3 ) Bye! ***\n" );
return ( 0 );
}