0

I would like to use a microUSB port to receive trigger signals and for each trigger a part of a code should start. I don't know if it is possible to do if the +5V source would receive the trigger (see USB specifications here: https://en.wikipedia.org/wiki/USB#Pinouts ). So the trigger would be the change from 0V to 5V. Is it possible, or this pin is on +5V level constantly, provided by the computer/tablet/phone? Or is it easier to achieve all this on the Data pins?

lazarea
  • 531
  • 5
  • 17
  • By default an app can only access the data available via Android API and may be some data provided by the sysfs file-system (a lot of them require root permissions). I am not sure but I doubt that your "trigger" is accessible through that API. – Robert Jun 26 '17 at 13:49
  • You can use an USB-2-serial OTG connector (see [this question](https://stackoverflow.com/questions/21800932/comunicating-with-serial-usb-device-over-android)). Alternatively some people misuse the analog headphone/microphone jacket as input device... – Robert Jun 26 '17 at 14:19
  • Ah yeah but sorry, my mistake, the final result is still USB which is apparently not accessible :/ – lazarea Jun 26 '17 at 14:21
  • Maybe using this? What do you think? Or is it purely for devices that are precisely designed for Android use? https://developer.android.com/about/versions/android-3.1.html – lazarea Jun 26 '17 at 18:54

0 Answers0