Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){switch (mode){ case 0 : read_sensors(); read_commands(); follow_heading(); sendSensorData(); time_left = 100000 - (clockGetus() - loopStart); // take up the rest of the time in the 10Hz rate rprintf(" %ld, %ld, %ld \n", (clockGetus() / 1000), (loopStart / 1000), (time_left / 1000)); //cpu_load = ((time_left / (float)100000) * 100); break;}return time_left; // wait for 1 second before calling me again. 1000000us = 1 second}
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){TICK_COUNT start = clockGetus();switch (mode){ case 0 : read_sensors(); read_commands(); follow_heading(); sendSensorData(); time_left = 100000 - (clockGetus() - loopStart); // take up the rest of the time in the 10Hz rate rprintf(" %ld, %ld, %ld \n", (clockGetus() / 1000), (loopStart / 1000), (time_left / 1000)); //cpu_load = ((time_left / (float)100000) * 100); break;}TICK_COUNT end = clockGetus();rprintf("Start %ld, End %ld,\n", (start / 1000), (end / 1000) );return 100000; // wait for 1 second before calling me again. 1000000us = 1 second}