• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: How do I detect if the USB cable is plugged in? and charging?  (Read 2100 times)

RodrigoCard (OP)

  • Posts: 314
    • Mac Joystick Apps
How do I detect if the USB cable is plugged in? and charging?
« on: December 25, 2010, 12:48:18 am »
That is it!

I want to detect if the USB cable is plugged in and if it is charging the batteries.
Is there any way to acomplish this?

thanks!  :)
« Last Edit: January 05, 2011, 11:03:31 pm by RodrigoCard »

RodrigoCard (OP)

  • Posts: 314
    • Mac Joystick Apps
Re: How do I detect if the USB cable is plugged in? and charging?
« Reply #1 on: January 05, 2011, 11:04:22 pm »
Well... may I have to look for some GPIO or something like that? How can I read a GPIO pin?

darfgarf

  • Guest
Re: How do I detect if the USB cable is plugged in? and charging?
« Reply #2 on: January 06, 2011, 07:16:11 am »
The gpio pins aren't hard to read, mapped to /sys/jz somewhere, someone in the inc channel will know off the top of their head.  Gpio documentation is on the dingoo-linux googlecode wiki, think I saw something about usb, though there's probably a better way of seeing, could just ping 10.1.0.1 or whatever the computers up is over the usb

 

Post a new topic