/****************************** Main function ***************************/ void main() { init_devices(); rangoli_reset(); rangoli(); //i = 0; while(1) { //botMove = 5; rangoli_I_IS_DRAW(ISDRAW); rangoli_I_MOTOR_SHAFT_LEFT(MOTOR_SHAFT_L); rangoli_I_MAX_ROW(MAXROW); rangoli_I_MAX_COLUMN(MAXCOLUMN); rangoli_I_GET_COLOR(GETCOLOR); rangoli_I_GET_LENGTH(GETLENGTH); rangoli_I_IS_FWD(ISFWD); rangoli_I_BOT_MOVE(BOTMOVE); rangoli_I_MOVEMENT_STATE(MOVEMENTSTATE); // if (i==0) help(); // if(i == 1) help2(); rangoli(); } }
int main() { char *palabra = (char *)malloc(15 * sizeof(char)); printf("\n Ingrese la palabra:\n >> "); fgets(palabra, 16 * sizeof(char), stdin); if (palabra[strlen(palabra)-1] == '\n' ) palabra[strlen(palabra)-1] = '\0'; else vaciar_buffer(); rangoli(palabra); return 0; }