102 int32_t left_motor_counts = 0;
103 int32_t right_motor_counts = 0;
104 int log_file_number = 0;
105 char log_file_name[16];
107 while(flag ==
true) {
108 sprintf(log_file_name,
"%s%d%s",
"/Log/log", log_file_number,
".csv");
110 file = fopen(log_file_name,
"r");
113 file = fopen(log_file_name,
"a");
114 fprintf(file,
"Time(msec), Voltage, Ampere, leftMotorCounts, rightMotorCounts\n");
121 ev3_speaker_play_tone(NOTE_FS6, 200);
123 if(ev3_button_is_pressed(BACK_BUTTON)) {
124 ev3_speaker_play_tone(NOTE_FS6, 500);
130 volt = ev3_battery_voltage_mV();
131 amp = ev3_battery_current_mA();
134 fprintf(file,
"%d,%d,%d,%ld,%ld\n", time_now, volt, amp, left_motor_counts, right_motor_counts);
void printDisplay(int8_t row, const char *format,...)
int32_t getCount(void) const