This isn't a highly technical (or specific) question. I just want to know if it is possible to use an android app to control 12V relays.
I want to use this running android:
http://www.mini-box.com/pico-SAM9G45-X
with this touchscreen attached:
http://www.mini-box.com/INNOLUX-7-TFT-with-touchscreen
I want to mount this in my car and write a simple android application that can be used to control my lighting in the car (via several 12V relays). I have a lot of background programming in many different languages, so I am not worried about the application part. However, I have very little experience using software to control hardware.
Any ideas for this would be great. Thanks!
First you'll need to get Android running on your Pico board. There are several releases of Android ported to Pico for you to play with here: http://arm.mini-box.com/index.php?title=Releases
Once you accomplish this, I recommend wiring up an ADK board to the pico and using that to interface with your relays. http://developer.android.com/guide/topics/usb/adk.html The most popular and widely documented ADK board designs are based on Arduino or PIC chips so if you have experience with either I don't think it will be too much trouble. Writing the application would entail writing a program on the ADK which listens for input from an Android app which you also create and reacts accordingly. There's a handful of good information you can find with google searches to help you out and also some dedicated discussion groups.
Alternatively, it may be possible to use the remaining unused pins on the Pico to talk to your relays. I don't know for certain though if the Android ports support this or not.
It should be a fun project to keep you busy for a couple weeks. Good luck, and be sure to write up some information on it if you get it working!
you can find so many relay boards which come with wifi and they have their own app. which you can install in your Android phone or PC or iphone(you can find a ios app for same board). and you can also modify apps according to your choice and there are products which come with input pins also so you can control lights or anything else using those input. you can check this product check this Android control realy and there are so many products available.
Related
I'm stuck at home with a rather bad webcam. I was considering upgrading, but then it struck me: phones these days have really good cameras embedded in them. So why not use it as a webcam?
However, as I was researching this further I was really disappointed with the available apps for this. As far as I was able to find, we have Android apps that work roughly as follows:
Present phone camera as a network attached camera. Then you can use local software to use that feed as a webcam. See e.g., IP Webcam. This may be sufficient, but it's a complicated setup, and network latency makes this far from ideal.
The Android app sends the camera feed to an custom host application that in turn creates a virtual web camera. See e.g., DroidCam. This mostly solves the latency problem, but it is still rather complicated, and requiring us to install a specific third party application is troublesome in regard to user privacy. Especially since the applications are closed source.
So, I took the engineering approach and tried to see if it was even possible to improve the situation. As far as I was able to find, Android supports being used as a custom USB accessory. And looking over the USB video class documentation, it strikes me that it should be possible to create an Android app that presents the phone as a generic UVC webcam, such that we do not have to resort to tricks such as the ones above.
Ideally, I would have liked Android to add another USB device option ("Use USB connection as webcam") in addition to debug mode, file-transfer, etc. This seems quite unlikely to happen in the short term however.
So, my question is this: Does an application that does the above already exist? My searching thus far haven't yielded any results, but I might be missing something as googling for this turned out a bit harder than I expected.
Alternatively, am I wrong in my assumption above, such that there is some fundamental issue why an Android application cannot be made to work in that way?
There does not seem to be any complete app yet as of 2020-10, but the parts are mostly there:
https://github.com/tejado/android-usb-gadget has code to switch the Android device into gadget mode (but no UVC yet)
https://git.ideasonboard.org/uvc-gadget.git feeds v4l2 into the uvc gadget output
Sources:
http://www.davidhunt.ie/raspberry-pi-zero-with-pi-camera-as-usb-webcam/
https://www.raspberrypi.org/forums/viewtopic.php?t=148361
https://www.reddit.com/r/androiddev/comments/iabc2o/can_i_use_my_android_as_wired_camera_ie_as_a/g1nrijl/
It appears Google has started to take notice on this issue and are currently working on a "DeviceAsWebcam" service, which is exactly the solution to this problem, as seen in the Android review below:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/2410788
Naturally though, this is a Android 14 feature, so it will like take a while before this is usable on a lot of devices. Hopefully, someone is able to backport this feature to older versions of Android.
If android / the version of Android that comes on your target phone provides / permits use of the USB gadget driver, then libguvc,
https://developer.ridgerun.com/wiki/index.php?title=USB_Video_Class_Gadget_Library_-_libguvc
can be used to "make an application appear as a USB webcam".
Potentially relevant to get you started would be https://stackoverflow.com/search?q=Android+USB+gadget (other SO references to the use of the USB gadget driver on Android).
Basically, I've had to come up with a 9-month project for my final year at university, and I've wanted to do something that incorporates the use of NFC and most likely Android devices. The project itself doesn't require to be entirely completed in the time, with good reasoning.
The concept I have thought of is to produce two seperate pieces of software, a Windows-based C++ application and a paired Android application which communicate via an NFC connection, using a USB NFC device.
The purpose of this would be to act as a form of remote for the PC, such as media controls, sleeping and waking the PC etc.
I would use something such as this: http://www.amazon.co.uk/Andoer-ACR122U-Contactless-Reader-Writer/dp/B00KX00WLE/ref=sr_1_1?ie=UTF8&qid=1441900306&sr=8-1&keywords=ACR122U for the connection, and the SDK provided by the developers https://www.dropbox.com/s/i3g3az3e7k1kfpo/H10391.zip
My question is just whether anyone, preferrably with some experience in at least a related area, would be able to enlighten me as to whether they think this would be possible?
Thanks for any help in advance,
Stephen
Please don't tell me what a bad idea this is. I am not using it as an Android tablet. It is the interface for a propitiatory medical system my company is designing. It's only function ever will be to control the system we are building.
That being said, how can I remove everything from the tablet and only run my app until the tablet dies or the standard firmware is reinstalled?
The tablet is being used exclusively as an interface control panel and CPU to my program which controls the medical equipment externally. I don't want anything else on the tablet. I don't want the users to do anything other than run my program on my equipment.
How can I lock the users into only using my program for the life of the tablet?
(I am building a system that happens to use an Android tablet to control it. Basically, I thought it would be easier to use a tablet, rather than design from scratch a system based on one or more microprocessors and which uses a custom designed and built color interface panel. If the doctors want to use an Android tablet for their offices, they are welcome to buy one.)
Thank you in advance.
Thank you all for your advice.
You will have to build your own version of Android if you wish to do this. For several reasons it is not possible to make an application that will do what you want and have it work on consumer devices.
Exactly how you need to go about customizing the OS build is going to depend on your exact hardware. But the simplest modifications will be removing the unneeded apk files from system/app/ and data/app/
AOSP and XDA-Developers are two great resources for learning the ins and outs of building a custom ROM.
If the device has reasonable power to it, you shouldn't need to worry about background processes.
If this is a consumer product, then it probably has the Google Apps suite and other related items, in which case rooting it and not installing those would be the best route. AOSP only runs processes that it needs to run Android out of the box.
Edit: You might just write the apps a Launcher and not allow opening other apps as the best route to accomplishing your goals.
You might need a custom ROM. It really depends on what version of Android your device supports. Check out the last in the list below.
http://www.redmondpie.com/best-most-popular-custom-roms-for-android-and-why-you-should-try-them-out/
I'm facing similar obstacles utilizing my business tablets. I want to restrict all the pre-loaded applications & only allow the tablet to be utilized for certain applications. White listed websites & such. I wonder if a 3rd party service such as ZENPRISE might offer a mobile management system that would take care of this for me?
zenprise
what do you think about using android in an industrial embedded environment?
I'm thinking, for example, about a vending machine with a touch screen monitor. I can think about many advantages:
It would increase the ease of making an advanced user interface
Android provides tuned libraries to handle task like low power internet connection or encrypted connections
Thanks to dalvik VM, it is easier to run on different HW platform (Arm9 - Arm11 - ....)
but there are also some cons like:
Android is not thought for a mission critical environment (like a device handling money)... at least not to some extent.
If not kept up to date, the software may have some bugs that compromise safety. Issue is worsen by widespread adoption.
Someone might regard Android as resource hungry compared to a real time implementation of linux, with code written in C rather than java.
On the internet you can find some resource on the subject, but most is out of date:
http://www.hsc.com/Portals/0/Uploads/Articles/Android-Porting-on-Embedded-Platform_v2_0633850602027036930.pdf
http://www.androidforembedded.com/whitepaper/android-for-embedded.pdf
anyone has direct experience on the matter or can link me to some resource? What do you think about it guys?
Cheers,
I know of a Swiss company - Noser Engineering AG, which provides development of Android Software for embedded devices. Also check-out their showcase android to market
Android can definitely be used in a non-cell phone device. There will be pros and cons that you can find all around the web, which could be discussed during weeks.
On our side, we have been playing with Android for a while now (from the port of the OS on custom ARM board to app dev) and we see real interest from customers. Regarding reliability, as in any embedded device, it is important to validate it by yourself against the use cases that your system will have to deal with.
Eventually, if cons make you decide not to move to Android, you can have other ways to develop interesting HMI such as QT which runs efficiently great HMIs.
Anyway, you can check out our website (http://www.adeneo-embedded.com) and contact us if you need some help.
Touch screens in anything industrial is pretty much out of the question, believe me. You'd just get laughed at and wouldn't be able to sell it. Luckily, a vending machine isn't an industrial application and there a touch screen would be more suitable.
If you just want a touch screen with some GUI pre-made, there are probably 1000 companies already making such products, no need to re-invent the wheel. It would need to be > IPx5 classed too, if you want to put it outdoors in the rain and snow.
The main challenge for this kind of application is the money transactions, not the user interface. You should start there. What good money transaction software is there already available on the market, and what hardware is most suitable for it? To handle the transactions will be the real software problem for this application. Anyone can make some GUI touch screen fluff and have it toggle some relays or drive a stepper motor.
Also, I reckon the market for this application will mainly need 1) reliability 2) reliability and 3) reliability. The design, user-friendliness, visual appeal and fluffiness may let you sell one machine to a customer, but reliability will make you sell several.
Does anyone know of a cheap Android or programmable device that has wifi?
I need it for a project for a company that needs a Wi-Fi handheld device for the shop floor.
I'm not too fussed about the language the device uses though I'm not really interested in the iTouch as there's no intention to release the app in the app store and I don`t really want to jail break everybody's iTouch.
Ideally it would be small, iTouch size for example and relatively cheap $100 or less. Nothing fancy, just ability to write a simple UI and have Wi-Fi. Voice is not needed.
Not too fussed about touch or qwerty keyboard either.
How cheap is cheap? On the weekend I searched eBay for "android slate" and found a bunch at US $99. I bought one immediately. It may not have the world's fastest CPU or a heap o' RAM, but at that price, how can I complain?
Like you, I want to develop apps for use in an industrial situation. I'll list voice as a feature if I use handphones, but don't really need it.
Would you please publish your final purchase decision here and I will likewise if I find a "better" option.
Bear in mind that it's not all about the cheapness of the device and consider the development effort.
Android has at least 2 good things going for it.
1) Generally programmed in Java (although you can use C & C++ if you jump through a few hoops). I may be wrong but it seems that new grads these days only know java (no offence intended to anyone reading this) and even "old hands" with C++ can quickly pick it up.
2) Android was designed from the start for developers and has an excellent development environment and good tools.
I bought a bunch of Android books and really liked Unlocking Android: A Developer's Guide, but you might want to check Amazon for readers 5 star votes.
And I have just noticed Android Wireless Application Development which I will have to buy; I think that you might benefit from it too.
Oh, and if you want to outsource any development at competitive rates ... ;-)
There were some cheap Android devices at http://dealextreme.com