add sending battery charge indication
This commit is contained in:
parent
6892e0d3bc
commit
df39bd642c
@ -2,8 +2,8 @@
|
||||
"status_led_pin": 22,
|
||||
"battery_coeff": 2.25,
|
||||
"sumo_id": "xxxxxxxx",
|
||||
"firmware_timestamp": "2019.04.07 14:44:00",
|
||||
"firmware_version": "0.4.1",
|
||||
"firmware_timestamp": "2019.04.14 16:34:00",
|
||||
"firmware_version": "0.4.2",
|
||||
"left_servo_tuning": 33,
|
||||
"right_servo_tuning": 33,
|
||||
"ultrasonic_distance": 40,
|
||||
|
2
hal.py
2
hal.py
@ -57,6 +57,7 @@ class Sumorobot(object):
|
||||
self.bat_status = 4.3
|
||||
self.move_counter = 0
|
||||
self.adc_battery = ADC(Pin(32))
|
||||
self.bat_charge = Pin(25, Pin.IN)
|
||||
|
||||
# The pullups for the phototransistors
|
||||
Pin(19, Pin.IN, Pin.PULL_UP)
|
||||
@ -282,6 +283,7 @@ class Sumorobot(object):
|
||||
left_line = self.get_line(LEFT),
|
||||
right_line = self.get_line(RIGHT),
|
||||
opponent = self.get_opponent_distance(),
|
||||
battery_charge = self.bat_charge.value(),
|
||||
battery_voltage = self.get_battery_voltage()
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user