Hey i am pretty new to arduino but really learning a lot! This might be a little ambitious but i am looking to access navigation data on a android phone with arduino and then use this data for a output.
E.g when the google navigation says i am 100m from a left turn, i want to set an LED to high.
I assume i need a bluetooth shield to connect to the phone but i am unclear as to what else i would need to make this possible.
Any help would be a great help, i am at the deep end here so a little direction would be awesome.
Bluetooth would be great, yes. Making an Arduino and an Android communicate with BT is pretty easy. You can get really chez BT chips on eBay that works like a charm (I do that for my project).
Then you need to know exactly what kind of data you could get from the Android and how it is formated (JSON, XML, raw coordinates, something else?).
Do you know if you can get the data from directly from the Google Maps App on the phone?
What I would do (if it's possible, I'm not sure): rebuild some kind of GPS application which sends "markers" to the Arduino via bluetooth, i.e. when you're less than 100 meters away, it tells the Arduino to blink faster, if you took the wrong exit, it starts recalculating and tells the Arduino to blink red, something like that.
Is that what you intend to do? Or am I totally wrong? :)
Related
Skip the first two paragraphs if your not interested in why I'm asking this question.
Here is the situation: I'm using a Moto Z Play with the Projector Modification, the mod is really cool and allows me to literally project my phone screen onto the wall. I've been writing a personal assistant program that helps me with my daily life I.E. Sorting gmails, reminding me of calendar events, keeping track of anything I want it to remember and reminding me of those things when I've asked it to, and much more. Its basically a personal secretary.
One new feature I just added was a habit tracker. I created a small graphical interface on my phone using Tasker that would email my "assistant" who would then record the habit and create a really cool graph that shows my past habit record as well as using a neural network to predict the next days habit. Only problem is, the graph got really intricate really fast. I want to show a months worth of habits (16 total habits), creating what can be up to a 16 x 31 floating point graph with labels. My laptop screen is just not big enough to display all of that without it just being a mess! I really want to display the graph from my projector mod, the entire wall will definitely be big enough to show all that data.
Ok, now my question (thanks for hanging in there I know that was a lot):
Is there any way that I can display an image on my phone from a Python program without creating a standalone app? Even if my phone needs to be plugged into my computer to stream the data through a cable.
I would use a service like Kivy to create a standalone app, but then it wouldn't be hooked up to my assistant, completely defeating the purpose.
I'm not looking for anything similar to a notification, I really want to draw over the entire screen of my phone. This is something I did with Processing (Java library) a while back, but now I'm using Python because it's more machine learning friendly.
I've looked into a lot of services but nothing seems to be able to do this. Remember that I dont need to send anything back from my phone, simply display an image on the screen until the desktop side program tells it to stop.
Not my expertise but if I would need to do something like that I would make a web-service of the python app using django and go to the url with my phone. Don't know if it help....
Regardless of "how" or "what", the answer is, you will always need some software running on the Android to capture the stream of data (images) and display it in the screen.
The point is, you don't have to write this software yourself. The obvious example that come to mind is use any DLNA compatible software, VLC for example, and have your python to generate a h264 stream and point VLC to it. Another way would be use some http service from your python and simply load it in the browser.
hope it helps.
I would like to figure out how to locate a device by its connection strenght(dBm). Even if this don't give me a direct location, it could give me a radius of the device to the phone or the other way around. So far i've been able to gather the device name and RSSI "strenght" however, its a dynamic data i'm getting. I would like an continuously update of how good the strenght is. So the part I'm stuck on is getting the correct values(ive got -72dbm and -342654dbm form the tests) and i need updates every 3 second.
What you should really do is use the Android Beacon Library, it will work the distance out for you.
The actual calculation is very complex and this Library has been used by a lot of people since Radius Networks created it. The link is for the website downloads, but you can use gradle too.
It's easy to use and probably exactly what you're looking for
I'm trying to calculate the distance between and android device and the HC-05 bluetooth module (connected to an arduino module: the MEGA 2560), using an android app created using appinventor.
For example I'd like to know if the devices are 4 meters from each other so I can turn on an alarm.
After doing some research it seems that is almost imposible to do, it seems that the most that can be done is estimate that distance constantly sensing the RSSI indicator.
Is this possible? if not ,what could I use?
Are the elements of my project (HC05,arduino, appinventor) the ones I should be using?
Is this the only way?
If the two points are within line of sight, then you can use a laser based rangefinder system, or something that uses "Time of flight" using a sound wave or a light wave. Here's one that I found with a quick google: http://hackaday.com/2014/07/01/pew-pew-an-arduino-based-laser-rangefinder/
We run into an issue with omni-directionality though,
If they don't have line of sight, you're going to have to think about how the signal is attenuated with whatever is in the way, because the difference in attenuation between a brick wall, and a gypsum(drywall) wall is great.
I want to be able to push a button in an app running on my Android phone and have a power switch on a real circuit literally attached to the phone be turned on/off. I'm having trouble thinking of a good way to do it. So far I've thought of:
1) Using an Arduino
The biggest problem with this is that the Arduino needs to be loaded with a sketch in order to work, and I can't use a PC to do the job. I've seen Arduino Commander but it's freemium and not open source, and I need to write my own custom app. It seems that I would have to find a way to load sketches and also write my own driver. This is not a pleasing course of action.
2) Playing an audio tone from the earphone jack
The idea is to play a tone that can then be converted into a small DC voltage. That DC voltage will then be used as the gate voltage to a MOSFET, which will act as the switch. The problem with this is that undesired audio can unexpectedly turn on the switch. For my application, even a small chance of this is unacceptable. Even filtering doesn't eliminate interference completely. Can I some how exclude all other sources of sound and only have an audio tone as output? If not over the headphone jack itself, over Bluetooth?
If anyone has any helpful thoughts, please share them.
You could try the second method with a specific audio to be played with some intervals which only triggers the switch instead of any audio being able to change the switch state, It does contain a little latency to be triggered but if its okay then it may work for you.
To clarify some miss information, the Arduino IDE is available at no charge for use on Windows, Mac OS, Linux, Raspberry pi and maybe others. With the IDE you can write, download your code to the Arduino and debut it.
I want to hook a camera up to an arduino which will send images to an android over bluetooth. I don't mind a delay in image transfer (once it's not to large). I then will process the images on the android (probably with the OpenCV library, motion tracking). This is a pan/tilt camera set up, the arduino will tell two motors how to behave based on the the images. How can I send this data over bluetooth or other wireless means? What type of camera is best for this situation?
Do you have to use an Arduino? I do not know if it will have the processing power needed for image processing. Have you looked into using a Raspberry Pi? You can install Java on it, and use the Pi4J library to access its GPIO. The people from Raspberry Pi recently created a camera module for easier integration with the main board.
Simply said, no, I don't think you can use an arduino for that:
the problem you will encounter is that the image capturing library you may find added to the bluetooth (or wifi) library (and the whole network stack) will fill your arduino up! Remember that you have only 32k of flash to put everything in, it's less than an Atari 2600. So you'll need a bigger arduino (like the arduino mega) which is close to the price of a beaglebone or a rasppi.
So to sum up, same conclusion as the others: just use a bone or a rasppi.
Though, here's one hack though that could help you doing what you want:
http://www.ladyada.net/make/IoTcamera/
it's a hack, because the arduino only copies the image over the eyefi, and the eyefi does not need to be handled by the arduino like a bluetooth/wifi shield.