• pedro posted an update 1 year, 1 month ago

    http://stackoverflow.com/questions/16380394/getting-battery-capacity-windows-with-python

    im using linux so dooing a script will not help u, try see this post

    • upower -i $(upower -e | grep BAT) | grep –color=never -E ‘state|to\ full|to\ empty|percentage’ if u do this on cmd u will get what u want but couldnt link that yet to the purpose u want, dont know if this can help

      • ok just uploaded my gestures, in git from pyrobotlab, go check the one called battery! enjoy

    • i still cant understand git very well so the correct file is in scripts/zorba/gestures/battery.py

      • Thanks Pedro,
        I added the “battery gesture”, and modified my gesture .aiml as well to get it in account. But I get this error:
        IOError: (2, ‘No such file or directory’, ‘/sys/class/power_supply/BAT0/energy_now’)
        So I suspect “energy_now” is in a different directory than yours.

        • upower -i /org/freedesktop/UPower/devices/battery_BAT0 if u run this on cmd does it work?
          try use this path, or do a search for BAT0! Btw, change to linux! You will be surprise how much easy it is than windows

          • Thanks Pedro, linux upower software won’t work with Windows (as far as I know). I am searching on the net to use powercfg -energy and powercfg -battery.

            I have been using Linux for years, it is one of the reasons I opened my design.
            Even though, I love Linux, there is still many things that need to be fixed for to have a simple OS working. InMoov is designed to be accessible for beginners and kids, with that perspective, I choosed Window as a starter OS for the robot but selected MyRobotLab because it can be run on Mac, Windows and Linux.
            Building a robot is already a hard task, so if you first need to learn how to configure and solve your OS before starting, it’s a bit discouraging.
            :)

            • you are right, and is mooving to know why you choose windows, i all my life used windows but when started with linux have fall in love! I guess the script i put on git will still work if u know the correct path, can u try do search for BAT0 and see if the pc find it, if i can i will try test it n a windows laptop and see how can u configure it! Best luck