bot = Robot() dist = VL6180() bot.SetPower(100, 100) bot.SetMaxSpeed(256, 256) bot.MotorStatus(1) if do_log == 1: f = open("/sd/log.csv", "w") pyb.delay(5) dist.start_cont_range() bot.Lights(1) bot.FWD(500) bot.TRN(0, 180) bot.FWD(500) if do_log == 1: f.close() print("Acc its: ", acc_it_count) print("Range its: ", range_it_count) bot.Lights(0) bot.MotorStatus(0) acc.it_off() dist.stop_cont_range()