Battery
Smart CarMeasures the battery’s voltage, which drops as the battery empties.
How you reach it
Section titled “How you reach it”The Battery class is reached through this attribute of robot.
robot.battery
Section titled “robot.battery”Can be None.
All the attributes of robot are in its table. Read Attributes that can be None to see when a part is None.
Methods
Section titled “Methods”voltage()
Section titled “voltage()”The battery’s voltage in volts, measured now (through a 20k/10k divider on the board).
voltage() -> floatUsed in examples: Sensor check