I'm making a proyect which envolves bluetooth communication between a phone with Android and a little robot with Arduino. I want to send commands to the robot from the phone and I wanna recieve some status information like temperature, battery remaining charge and the robot will be integrated with a webcam... so I wanna send this images from the webcam to the phone. Is it possible???? Or I'm just like crazy and need another microcontroller (by the way I'm using the Atmega328p-pu that comes with the duemilanove) or another way to communicate them to handle all this "channels" of information. Could I multiplex it or decode it??????
No it's not possible with Arduino because data transfer is too slow
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1226951266
I'd look at http://beagleboard.org/ which is a low-cost, fan-less single-board computer or what they use in robots like this one: http://www.bilibot.com/node/36
I guess it is possible, but I'm not sure if Arduino can actually handle a Serial camera inbound data and the bluetooth serial outbound data with acceptable performance..
As "webcam" you would need something like this: http://www.sparkfun.com/products/10061
Since you will need a Bluetooth module, you will use two serial ports, one for camera input, and other for Bluetooth communication, therefore check if your Arduino do have at least two serial inputs.
Here you can find the sensor shield and the Bluetooth module (ps. you may find on eBay for half the price):
http://www.dfrobot.com/index.php?route=product/product&path=45&product_id=360
http://www.dfrobot.com/index.php?route=product/product&filter_name=V5&product_id=264
Take some time to read the data sheet and documentation from all these modules and good luck.
Related
I am trying to find a way to send measurements from a digital device (as the blood pressure device) to a mobile application that can analyse these data ..... How to send these measurements wireless efficiently?
Please use a simple language
You need to make sure your digital device has an embedded Bluetooth adapter so that it can broadcast either BLE with standardized payloads for medical industry like. Your other option, if the data is larger, or streaming or secure, is to use standard traditional Bluetooth.
For this scenario your embedded code would create a server socket.
your mobile would create a client socket and a pairing request would occur.
You can either programmatically handle the pairing or allow the user to do it. Once the devices are paired, you can send bytes directly to and from the device to the mobile phone. Parsing these bytes into the object models that represent the data you are displaying or analyzing.
If you need a Bluetooth Manager Class example for Android I can supply that, but your embedded C code for the digital device is not something i have an immediate sample to provide.
Hope that helps. Let me know if you meant something else.
I had been wondering how wireless earbuds work and came across this image. I do not know how to replicate what is shown in the following image and would like to learn how to do it.
My end goal is to be able to have the smartphone connect to a device, while still being able to play music to a Bluetooth Headphone. I read into BLE 4.1 mesh and I am not sure if that would help either.
I have made images for the possible ways the multiple devices could communicate but I don't have enough reputation to attach the xD. I will try my best to describe them.
1) All devices manage to simultaneously communication with the smartphone.
2) All devices connect to a hub which relays data to the smartphone.
3) One device is the hub itself and relays data for all other devices while sending its own data.
4) The devices relay information for each other till the smartphone receives the data it called for.
5) Another possibility is to have a mesh structure where the devices relay all messages broadcast-ed over the network until the device for which the message is meant for, receives it.
I hope to make a project where a Bluetooth device I make does not hinder the user from connecting and using other Bluetooth devices simultaneously.
Thanks for reading and I look forward to any and all responses.
IMAGE 1:
IMAGE 2:
IMAGE 3:
IMAGE 4:
You need to consider few things first.
Since version 4.0 Bluetooth specification contains "Classic
Bluetooth, Bluetooth high speed and Bluetooth low energy (BLE)
protocols."
Bluetooth Classic provides profiles like A2DP, AVRCP that
are usually implemented by Bluetooth earbuds or speakers.
BLE on the other hand communicates using GATT (a general specification for
sending and receiving short pieces of data known as attributes over a
low energy link).
BLE is not designed to handle high bandwidth scenarios like Audio.
Now getting to a point
You can have a smartphone connected to your earbuds with A2DP profile
and simultaneously connected to several BLE devices.
One or more of these BLE devices can realize mesh connectivity
I want to build a simple challenge response protocol in order to authenticate a user to an Arduino via the smartphone (Android and iOS) using BLE. I'm having problems seeing how this would be implemented with BLE. What I want to do:
Arduino sends/broadcasts a challenge
Smartphone receives challenge and computes response
Smarpthone sends response to Arduino
The way I thought about implementing this is to have the Arduino (peripheral and server) start advertising when a button is pressed. Ideally an event would be triggered on the smartphone (central and client) when a certain service shows up. Then the smartphone connects to Arduino, reads the challenge characteristic and writes the response to it. Is this a good approach?
It appears though that it is not possible to trigger an event when a BLE service appears and I would continuously need to scan with the smartphone which is very battery intensive. Not sure how to get around this? Geofencing is not really an option since it can be inside. Maybe detecting if the user is walking, biking, standing still? Any suggestions are greatly appreciated =).
On iOS BLE connectivity looks like this:
initialize CBluetoothManager,
start discovering devices through bluetooth.
when found particular peripheral that u're intrested in, connect to it via core manager and store this peripheral variable in ur Class,
then.. u should STOP discovering cuz it's terrible for batteries ;) (as u said),
after device's found, you can search through services, characteristic and at the end through descriptors <-- IN THIS ORDER otherwise u won't get any of these,
ofc, from now on you're able to store each of these vars in your Class and work with them as you wish to. BLE on iOS's based on delegates and it's own lifecycle, each time when there will be something to read the event will trigger. When you will want to send some msg to Arduino back it shouldn't be a problem. In the partial answer for your question about
'when a certain service shows up. THEN the smarphone connects to
Arduino.'
you have to make steps ABOVE in order to read services. Hope that helps.
I like to do a project based on android.I like to create an application for controlling lights in a room.My doubt is whether I can control those lights from anywhere using the androiod phone or it can only be controlled through USB cable or via bluetooth.If it can be controlled from anywhere how does the ADK board works,specifically how it transmits he data to the phone?
If the controller has a bluetooth radio SPP module (like a connectblue bluetooth to serial adapter) on it, then you can connect your phone's bluetooth to it, open a communication socket and send serial data between the phone and the controller board. No internet and no web server needed. Of course, this only works if your phone is in range of the controller (say, less than 10 to 30m)
To control the light from far away, then you need to connect each device (controller and phone) to the internet. You do not need to do it with a web server (though you could if you wanted) You can communicate data across the internet however you want, using whatever transport protocol best suits your purpose.
You could make it with a Arduino Board. Its Developt with C/C++. It's perfect for Android you will found many Tutorials
Everything communicates through a web server, somewhere. You'll have to have your hardware connected to the internet somehow, and your custom device can communicate with a phone through C2DM, or maybe a REST API or something. Bottom line is, you'll need a web component.
I'm trying to think of a way to do a simple home automation project that involves an Arduino, a Bluetooth module and an Android phone. The idea is that I have two Arduino boards in different parts of my home. And if I walk into a room then a LED lights up on the board that has discovered my phone. If I walk out of the Bluetooth range, the LED should turn off.
I have tried the DomoticHome project with a router, but it's only for manual on/off and it's based on the Ethernet module.
I don't want to make an Android application from scratch, but I would like to take some existing open-source application that I could extend to use Bluetooth and/or turn on the LED automatically.
Actually, you might skip that Android application requirement. Just make the Arduino board l2ping your phone by Bluetooth periodically and switch your LED based on success or fail.
As a side effect, you could automate with just any phone, that supports Bluetooth. But the devil is in the detail. It might be necessary to pair boards and phone initially.
Additionally, most Android phones switch off visibility after a minute or two. So you will have to check, whether a ping will work then. (I don't know whether l2ping is available on Arduino out of the box, but it should be portable easily.) Trying to open a Bluetooth port on your mobile device may be an alternative to l2ping. So a no-application-solution should be possible.
Best way to do this would be using a handshake signal every 1 second or 2 seconds.. the bluetooth module should send HI if mobile receives that i should reply with HI.. Once the mobile does not reply it should turn the lights off.. If it receives the HI it should turn the light back on..I have a code that can connect to these bluetooth modules using serial communication..its very simple to use..i will check and send you the code.. All the best..