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.
Related
I'm trying to use an android app to do the processing of a path finding algorithm for a robot using Bluetooth. But currently, it takes 1 or 2 seconds for the transfer to complete, so that there is an output in the Arduino. Is there a way to minimise this to make the transfer-output instant?
This kind of delay is causing problems such as stopping instantly when an obstacle is detected. Is there any better way of doing this?
Thanks in advance!
You didn't mention which device you are using. I assume that you connected the Bluetooth chip set to UART port(As in arduino Uno), In that case the slowest part in whole communication is the serial interface between Arduino and Bluetooth chip set. Check what baud rate you are using and can it increase further. I think default will be 9600 which is only around 960 bytes per second. Set the maximum baud rate supported by your device and the Bluetooth chip.
Simple answer: You can't, bluetooth is laggy like that. If you instead had your path finding algorithm on the arduino board itself, you could avoid the issue. You can also try adding a delay to your arduino code, because it is possible that the arduino is sending messages repeatedly without taking into account the lag that bluetooth has.
Two simple solutions worked for me:-
Increase the delay to 50 - 100 milliseconds.
Add this after the Serial.begin(9600) in setup();
Serial.setTimeout(50);
Step two is the most important. It worked for me only after I added the above code. This is not mentioned very often in many other forums that I have looked when I had the exact same problem.
I'm working right now on a openCV project, that does some video processing.
I have a C++ program that runs on a PC, with some cameras connected, and it does the calculation and stuff and an Android app that controls the C++ program (something like aperture settings and starting some special calculations etc) and has a livestream of one camera.
The question is: How can these apps communicate.
I thought about two TCP sockets.
one for the LiveStream
one for the control
What do you think?
Will this work or is the a better way to implement this.
Thank you very much.
You've got a good guess.
Sockets is a good solution for you.
But TCP socket for video stream is really bad practice. In case of minor network issues you'll get annoying hangs, etc.
Use UDP socket for LiveStream. Just be ready, that some of packets can be missed if WiFi signal is low or smth.
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.
Hi everbody!
I would build a drone with a ip camera to stream video to an android app with (if possible) http protocol (as in webpage) and the camera should be must small (and light) is possible . So, which ip camera you advice me?
Thank you guys!
If it was up to me to decide, (keeping in mind that I don't know the exact size of the drone),
I would say that you can't go wrong with a Raspberry Pi and the Pi Face camera. It offers HD quality with is vital if you want to see clearly while the wind is blowing it side to side.
It is soon available in infrared so there is an add on to look forward to!!!
It is lightweight and can be mounted anywhere because it isn't restricted to a housing.
I have used the cam for many projects from motion detection to security cams.
It is a Must Have, it is inexpensive and great for these projects, plus they can be programmed to do so much more.
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? :)