lego_ev3_battery.txt 719 B

123456789101112131415161718192021
  1. LEGO MINDSTORMS EV3 Battery
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery.
  4. It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is
  5. detected by a key switch in the battery compartment.
  6. Required properties:
  7. - compatible: Must be "lego,ev3-battery"
  8. - io-channels: phandles to analog inputs for reading voltage and current
  9. - io-channel-names: Must be "voltage", "current"
  10. - rechargeable-gpios: phandle to the rechargeable battery indication gpio
  11. Example:
  12. battery {
  13. compatible = "lego,ev3-battery";
  14. io-channels = <&adc 4>, <&adc 3>;
  15. io-channel-names = "voltage", "current";
  16. rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>;
  17. };