[DEV Help] USB Gamepad + Arduino - Eee Pad Transformer General

Hi,
Need some help from dev's here, as I am new to android development and don't know where to start.
So, basically I am building a quadrotor helicopter from scratch, and since I was trying to avoid costs as much as possible. I was taking analog stick data from a USB PS2 gamepad onto my computer and writing it via serial port to an arduino which broadcasts the values over wireless to the quadrotor
ie
Gamepad->Laptop->Arduino->Wireless
Now recently I randomly connected my controller to my tablet and the analog sticks actually work for left/right movement etc!
And well not Im excited as this would mean I wouldnt have to lug my laptop around!
It would be great if someone could give me tips on where to start looking as searching didn't get me anywhere on how I could not use the gamepad as an input but just read its analog values.
and also how I could write to via serial to a usb connected arduino
I have 1 rooted Transformer
Heres a picture of what Im building
imageshack.us/photo/my-images/580/img20110708183153.jpg/
[Wont let me post links :/]
Thanks a ton.

Related

OFF-TOPIC PS/2 to USB convertor?

Hi all,
Apologies if this is not allowed on this forum, I've had great help from you guys in the past and I thought here would perhaps be a good place to try for help now, even though it's not HTC related! If it's not allowed please close this thread and accept my apologies.
I have just been given a new work laptop and went to hook it up to my KVM at home when I discovered that it didn't have any PS/2 ports for keyboard or mouse (yes yes I know I'm not "up with the times" and using USB!) so I went out and bought from Maplin a PS/2 to USB convertor cable - you know the type, 2x PS/2 sockets to 1x USB plug. I hooked it all up and keyboard is working but mouse isn't!
I've played around and played around trying 3 or 4 different mice and can't get the mouse to work at the same time as the keyboard :-(
Has anyone got any experience of this and have any idea how to fix it? It's really annoying not being able to use a proper keyboard and mouse, especially when trying to play Total Annihilation.
Many thanks in advance
G
get your adaptor replaced

[Q] Hook up to a network projector

Hi everyone, I was wondering if any of you know if it's possible to hook up to a networked projector and if so, how?
It has it's own ip address but do I have to install the software which if course would not be compatible with android.
The other thing is that the projector is hanging from the ceiling so hooking up an hdmi cable is out of the question.
Thanks
Option for your projector
I use a HP hdmi to vga adapter (about $30 US) for powerpoint presentations and it works great. If your network projector has vga input, that is a pretty easy way to go with no software to install.
thanks for the reply, but as I said the projector is up at the ceiling. I would need a long cord for it. We have it on the network to make it easier to hook up to.
I don't think it would be possible this way but I figured I would ask.

[GUIDE] USB Gaming on Nexus S

Greetings,
The purpose of this post/thread is to describe how to use a USB gaming controller on the Nexus S, which is now possible thanks to the work of fellow XDA member sztupy. Before proceeding, I highly recommend that you read his Galaxy S thread, especially the first few posts (http://forum.xda-developers.com/showthread.php?t=1450298).
First, some demonstrations:
Using USB Host Controller app and Super Mario 64
Batman: Arkham City
Metro 2033
Dirt 3
DISCLAIMER: I take no responsibility for any damage you do to your phone.
1.) FLASH KERNEL AND DOWNLOAD APP
First things first, you will need ICS and to flash a kernel that has USB OTG support in it. At the time of this posting, some kernels with USB OTG are:
-steve.garon’s kernel (http://forum.xda-developers.com/showthread.php?t=1427352)
-mathkid95’s Matr1x kernel (http://forum.xda-developers.com/showthread.php?t=1361477)
-Ezekeel's GLaDoS kernel (http://forum.xda-developers.com/showthread.php?t=1336529)
If you do not know how to flash a kernel, please Google it. You will also need to download sztupy’s app “USB Host Controller” (https://market.android.com/details?id=hu.sztupy.android.usbhostcontroller).
2.) ACQUIRE USB CONTROLLER
Next, you will need a supported USB controller. The following should work:
-wired Xbox 360 controller
-Logitech DualAction controller
-Logitech WingMan RumblePad
-wireless Xbox 360 controller WITH wireless receiver
-wired Sony Playstation 3 controller (not yet tested)
...probably many others
3.) OTG SET UP
Thirdly, you’ll need a working USB OTG set up. Sztupy’s thread shows you a few ways of accomplishing this. Below is a (crappy) diagram of MY current working set up.
http://dl.dropbox.com/u/15806590/diagram2.png
I think this is the best set up because you don't have to buy any fancy OTG cables or USB hubs. But that's just my opinion.
In terms of the order for connecting things, I find it works best if you connect the phone LAST.
4.) FINAL STEPS
Once everything is connected, open up the “USB Host Controller” app, select the “Settings” pane, and set the Operation Mode to “Auto-host” (if you are using a set up that involves an OTG connector/cable, then you'll likely need to select OTG mode instead). If everything went right, the app will close automatically and you should be able to navigate your phone with the controller. You are now ready to game!
Just a note with the 360 controller. The middle button will always flash on and off, and will not stay lit on one quarter of the circle as on an actual Xbox. AFAIK there's no way to fix this (unless you use tape heh).
Games/Apps TESTED & WORKING: (This list is not meant to be comprehensive, and will be occasionally updated)
Note: Pretty much any app/game that supports button remapping (such as emulators) should work
Emulators
-nes.emu
-SNES 9X EX
-N64oid (the right analog stick is not functional)
-Mame4droid
-FrodoC64USB
-Mupen64Plus AE
-FPse
Native/Regular Android Games
-Shadowgun
-Grand Theft Auto 3
-Samurai II: Vengeance
-Riptide GP
-Meganoid
-Reckless Getaway
-Cordy
-EVAC HD
-Radiant HD
-Muffin Knight
Some (not all) of the Xperia Play compatible games will work too. See here for a comprehensive list of Xperia Play titles: http://forum.xda-developers.com/showthread.php?t=1217060
Other
-OnLive (!!! This means you can play the majority of onlive games that are game pad compatible)
thanks man i was thinking of a way to do this.
This is amazing !
I tested the Logitech Dual Action controller yesterday, it works also fine.
Hi! May I use your first diagram in my post too?
Sure! Be my guest.
Cool! 10 chars
3 new gameplay videos added.
nice. any idea if this works with the controllers for the original Xbox? I have a modded Duke I use on the computer, just replaced the Xbox!usb male with a regular usb male, and would love to be able to use it on my Cappy. I know it works perfectly on the mainline Linux kernel, but I'm having no luck finding how the drivers were implemented in ICS. I can't test myself just yet, still waiting for the otg cable and download mode jig to come in.
neoman4426 said:
nice. any idea if this works with the controllers for the original Xbox? I have a modded Duke I use on the computer, just replaced the Xbox!usb male with a regular usb male, and would love to be able to use it on my Cappy. I know it works perfectly on the mainline Linux kernel, but I'm having no luck finding how the drivers were implemented in ICS. I can't test myself just yet, still waiting for the otg cable and download mode jig to come in.
Click to expand...
Click to collapse
I can't say for certain, but I think it should work. I found another thread here: http://www.acertabletforum.com/forum/acer-iconia-tab-accessories/1014-what-game-controllers-work.html for the Acer Iconia tablet, and one user claims their original xbox controller works.
I suppose the only way to know for sure is to try it out yourself. Once you get your OTG set up and running, let us know how that works out for you.
Nice thread, very useful for me, I sold my wired 360 controller, and i thought i will buy a new one when i asked at sztupy's thread if the 360 controller would work with this method, he mentioned me about this thread, and i saw on the 1st page that a wireless controller would work with the receiver...luckily i have one of those but on the op says only it was not tested...so could anyone give me some info about that?
Szighy said:
Nice thread, very useful for me, I sold my wired 360 controller, and i thought i will buy a new one when i asked at sztupy's thread if the 360 controller would work with this method, he mentioned me about this thread, and i saw on the 1st page that a wireless controller would work with the receiver...luckily i have one of those but on the op says only it was not tested...so could anyone give me some info about that?
Click to expand...
Click to collapse
Well the reason I suspect that it will work is because I saw this video www.youtube.com/watch?v=TrTmsZIb0a8&feature=related. Since we now have OTG it is reasonable to assume this would work for us as well.
I tried looking around for a wireless receiver to test but unfortunately all stores near my area only seem to sell it with the controller.
Sent from my Nexus S using XDA App
developersdevelopers said:
Well the reason I suspect that it will work is because I saw this video www.youtube.com/watch?v=TrTmsZIb0a8&feature=related. Since we now have OTG it is reasonable to assume this would work for us as well.
I tried looking around for a wireless receiver to test but unfortunately all stores near my area only seem to sell it with the controller.
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
hm...i'm gonna try it, so, i didn't understand the diagram show in the OP (from the dropbox link, i'm not too good in this), but would it work, if i use a USB Hub, connect the hub to the phone, a usb charger to the hub, and also the receiver?
Szighy said:
hm...i'm gonna try it, so, i didn't understand the diagram show in the OP (from the dropbox link, i'm not too good in this), but would it work, if i use a USB Hub, connect the hub to the phone, a usb charger to the hub, and also the receiver?
Click to expand...
Click to collapse
Read sztupy's post here for some ways you can connect a hub: http://forum.xda-developers.com/showpost.php?p=21503413&postcount=2. As you can see, it is indeed possible to power the controller/receiver from the hub if you have things connected properly.
When you're setting up USB OTG/host for the first time, use a simple device like a USB flash/thumb drive to verify that your connections and everything else are working properly. Then you can try hooking up other peripherals like the 360 wireless receiver.
To be honest, I haven't had much luck getting USB OTG/host to work with a hub, which is why I went and created my own 'Y' cable. It really isn't that difficult to make, and it's cheaper than using a hub, provided that you have soldering equipment already.
developersdevelopers said:
To be honest, I haven't had much luck getting USB OTG/host to work with a hub, which is why I went and created my own 'Y' cable. It really isn't that difficult to make, and it's cheaper than using a hub, provided that you have soldering equipment already.
Click to expand...
Click to collapse
you don't even need soldering equipment. I twisted and taped the wires and it worked fine.
Epic_VS said:
you don't even need soldering equipment. I twisted and taped the wires and it worked fine.
Click to expand...
Click to collapse
Nice lol.
Sent from my Nexus S using XDA App
Word of caution, the 360 controller wireless adapter draws a lot of power, i recall there being high incidences of it dropping out when plugged into PCs, so be sure to power it adequately.
tiuk said:
Word of caution, the 360 controller wireless adapter draws a lot of power, i recall there being high incidences of it dropping out when plugged into PCs, so be sure to power it adequately.
Click to expand...
Click to collapse
woah...i really don't know anything about this electronic thing how should i do?
Just look at your charger and check the output rating. It should say something like: 5.0 V, 0.75 A. Ideally you'll want the second number to be higher (like 1 A for example).
As a point of reference, my wired 360 controller works fine on 0.7 A. But as tiuk pointed out, the wireless receiver may be more demanding.
But really I think you should be okay if you stick with the standard Samsung Nexus S charger. If you need more current for your peripheral, you can simply disable the current draw of your phone with the USB Host Controller app. This way, all of the current from the charger will be directed to the device instead of being split between the device and your phone.

[Troubleshooting] Nexus 6P - Latest MM - Universal USB Controller Support (NOT!)

Hello guys,
recently I've got a fully working usb otg cable and I've tried random devices on it, everything worked (like mouse and keyboard) or usb stick, except the Speedlink cheap controller I've got ... here is the question.
Does anyone knows if there are any mods tweaking it and allowing us to connect a usb controller too?
It will be nice if I could fix it because it will get me out of buying a bluetooth controller.
Have a nice day, George.
Worth the bump,
Can someone please direct me on how can I code it myself or at least discuss with me if it is possible?
It will be wise for the sake of my programming skills to get into it.
Have a nice day, George.
Bump, Im about to start the attemp of creating my own thing about this. Let me known about your useful knownledge about this thing!
EDIT:
I've already found out that it is possible to connect my controller.

Looking for ideas to make Z3 Compact with a broken touch screen usefull again

Hi,
I have a Z3 Compact with a broken screen. It displays everything all right, but the touch is pretty much dead. Shame, I loved that phone.
Thus I am looking for interesting ways to make it useful again. It runs Android 6.0.1 right now.
I have an OTG connector, so I am still able to use the device with an USB mouse - BT controller is an option as well. My most basic options are:
- emulation-handheld for old consoles like PSX and SNES
- PC Camera (with apps like DroidCam, IP Webcam)
But before that my most basic question would be:
Will I be able to use the mouse after reseting the device to factory settings? Seems like the easiest way to clear all the data.
Also, I know there are unofficial Android ROMs available - is it possible to install and use them without the touchscreen, only with USB mouse?
And now to some wishful thinking...
Are there any Linux roms for Z3C akin to Raspbian for Raspberry Pie? Z3C most likely has enough power to act as a simple desktop PC for internet and youtube, it also has peripherals (was it called MHL?) to connect it to a monitor via HDMI that should be dirt cheap by now (the question is, is it still possible to connect K&M at the same time? Is USB-hub enough?), so... maybe?
Any other ideas are welcome!
*useful, my bad
A handy accessory
torrentius said:
Hi,
I have a Z3 Compact with a broken screen. It displays everything all right, but the touch is pretty much dead. Shame, I loved that phone.
Thus I am looking for interesting ways to make it useful again. It runs Android 6.0.1 right now.
I have an OTG connector, so I am still able to use the device with an USB mouse - BT controller is an option as well. My most basic options are:
- emulation-handheld for old consoles like PSX and SNES
- PC Camera (with apps like DroidCam, IP Webcam)
But before that my most basic question would be:
Will I be able to use the mouse after reseting the device to factory settings? Seems like the easiest way to clear all the data.
Also, I know there are unofficial Android ROMs available - is it possible to install and use them without the touchscreen, only with USB mouse?
And now to some wishful thinking...
Are there any Linux roms for Z3C akin to Raspbian for Raspberry Pie? Z3C most likely has enough power to act as a simple desktop PC for internet and youtube, it also has peripherals (was it called MHL?) to connect it to a monitor via HDMI that should be dirt cheap by now (the question is, is it still possible to connect K&M at the same time? Is USB-hub enough?), so... maybe?
Any other ideas are welcome!
*useful, my bad
Click to expand...
Click to collapse
Make sure you have one of the magnetic charging cables so you can at least keep the mouse plugged in at all times AND keep the battery charged Keyboard & mouse possible IF you use something like the OLDER Logitech models with the proprietary dongle. The newer "unified" stuff won't work. BT keyboard / mouse too sluggish in my experience. If you are feeling courageous, and especially if you don't need it as a daily driver, a replacement screen is something like 25 dollars USD on eBay - get the one with a frame unless you are experienced in replacing screens - the replacement screen only units are somewhat FRAGILE.
nezlek said:
Make sure you have one of the magnetic charging cables so you can at least keep the mouse plugged in at all times AND keep the battery charged Keyboard & mouse possible IF you use something like the OLDER Logitech models with the proprietary dongle. The newer "unified" stuff won't work. BT keyboard / mouse too sluggish in my experience. If you are feeling courageous, and especially if you don't need it as a daily driver, a replacement screen is something like 25 dollars USD on eBay - get the one with a frame unless you are experienced in replacing screens - the replacement screen only units are somewhat FRAGILE.
Click to expand...
Click to collapse
Thanks, Nezlek! [I pozdrawiam współ-Warszawiaka! ]
Fortunately I have the magnetic cable, so no worries there. I wasn't planning on replacing the screen, definitely not that courageous. I loved that phone, but I am just not good with tinkering inside of small electronic devices. That is why I was thinking about ways of using it with other input tools like OTG mouse or BT controler. Right now I am thinking about getting a MHL cable for HDMI output and giving it with a BT gamepad to my friends kids with some games loaded. I have no other ideas, sadly.
Do you happen to know if OTG works right away after full-reseting the devicse? This is my main concern now.
Good Question ......
torrentius said:
Thanks, Nezlek! [I pozdrawiam współ-Warszawiaka! ]
Fortunately I have the magnetic cable, so no worries there. I wasn't planning on replacing the screen, definitely not that courageous. I loved that phone, but I am just not good with tinkering inside of small electronic devices. That is why I was thinking about ways of using it with other input tools like OTG mouse or BT controler. Right now I am thinking about getting a MHL cable for HDMI output and giving it with a BT gamepad to my friends kids with some games loaded. I have no other ideas, sadly.
Do you happen to know if OTG works right away after full-reseting the devicse? This is my main concern now.
Click to expand...
Click to collapse
I assume that OTG would work right after a re-set. Why not? The support is built into the ROM. As for the MHL cable, another good idea, but you could just as easily screen cast, no? But, for 5 U$D, or 18 zł PLN (take your pick) an MHL cable is a "worth it" experiment. And, if you're feeling adventurous
https://www.ifixit.com/Guide/Sony+Xperia+Z3+Compact+LCD+Screen+Replacement/35488
From personal experience, the only real issues with the Z3C are that the LCD panel is held in place by adhesive, so you have to position those templates rather precisely, OR use glue :crying: OR double-sided tape AND, you have to be CAREFUL re-positioning the speaker. Caution and patience is all you need.
raz kozie śmierć

Categories

Resources