A "Hello World" tutorial for Arduino and Android - android

A few days ago, Arduino just released a "start pack" for Android developers: http://arduino.cc/en/Main/ArduinoBoardADK
The Arduino ADK is a microcontroller board based on the ATmega2560
(datasheet). It has a USB host interface to connect with Android based
phones, based on the MAX3421e
I have been searching again and again for tutorials or something in order to begin Arduino programming, and I am looking for very good tutorials, maybe some kind of "hello light" that would make a light blink on the card with a button on my Android device.
Have you got some links, fan blogs, other information about that topic?
I, of course, know the Arduino website and Android developer documentation, but they are quite over-complicated...

You are asking a two part question: (1) How do I program Arduino? (2) How do I use the Android ADK to do stuff with Arduino.
For part one you're going to need to get hardware since the Arduino site is pretty straightforward about how to get started.
Arduino Tutorial
For part two you're going to have to have a ADK compatible Android device which as of July 2011 is either a Nexus One, Nexus S, or Motorola Xoom.
If you have one of these devices, you'll need an Arduino which can run the ADK (see your question). And of course the best documentation is still
ADK Documentation
Just realize that you'll be writing two programs, one that runs on the Arduino in C/C++, the other on Android in Java.
Update:
Since you were asking for blogs or how-tos, MAKE does have some tutorial which may be what you are looking for at Makezine.

To write programs for the arduino, you can use simple C language commands in a development environment that is deliberately simplified. To write programs for your Android phone, you must really learn Java and learn how to use a sophisticated development environment like Eclipse. These are two very different programming skill levels.

You have an arduino and you have an android. You need to make them communicate. I would make 2 experiment projects. One project would have communication from the arduino to the android. The other android to the arduino. Once you have established some sort of communication technique, you can mod it how ever you want to reach the desired.

Related

How can I create a OBD 2 Android application like torqe? Are there any software simulators available or I need a car to test application?

I want to create a OBD 2 android application like Torque. Are there any software simulators available for testing or I need a car with OLM adapter to test the application?
I got to know about the github library https://github.com/pires/android-obd-reader/releases/tag/2.0-RC4 , is there any other library/tool available or I can get all possible data from this?
I did run into a obd II simulator I found in the google app store which I installed on one of my development phones https://play.google.com/store/apps/details?id=com.beastovest.obd.simulator
On a second phone I installed the Car Scanner from the store (free)
https://play.google.com/store/apps/details?id=com.ovz.carscanner
The setup is pretty simple. Just pair the device from the simulator to the scanner.
In the simulator I can change engine values and I can see the commands and the changes in the scanner. You can see the rest of the communication as well. The simulator is $5. Very nice for that price. I can also see the complete communication which I need for my app development. I also speed up the understanding of the ELM327 commands. Here is the spec: https://www.elmelectronics.com/wp-content/uploads/2017/01/ELM327DS.pdf
Hope that helps anybody.
Yes, there is a free software simulator with simple GUI, called OBDSim. It works on Windows, Linux and OSX (among others).
There's also a hardware simulator ECUSim 2000, which isn't free and also isn't cheap.
That GitHub repo you linked to is actually an Android application, capable of acquiring OBD data from a car. It is not an OBD library, however it is based on one (by the same developer, pires).
Now to (partially) answer your second question: no, you can't get all the data OBD offers (PIDs on wiki, but there are more manufacturer specific ones) using this library. However you can get all the interesting data that you'll need if you won't be doing something really specific. I don't know if there are other similar libraries but I found this one well written, well documented and well performing.

Rhomobile, BLE112 Bluetooth device - iOS and android app

I have been searching for a while now and decided to post a question here to see if someone had already traveled down this specific road.
I am developing a bluetooth enabled device, using the Bluegiga BLE112 chip. They announce this chip to be easily used with iOS devices (and this was our main reason for choosing it)
The device will need to communicate with an App, that we need to be developed for iOS, Android, Windows Phone, and Blackberry. Due to this need, I've decided to use Rhomobile, as it seems to be the only one that supports developing BT apps for iOS without having to develop further plugins.
I only need to send small messages (like commands, small strings) and sometimes a bigger file to the device's internal memory.
On Rhomobile's BT documentation, they state that for iOS it is only possible to comunicate between iOS devices ( i'm thinking that they say this because of the MiFi limitations imposed by Apple, but that using Bluegigas chip are not a problem...)
My question is:
Since Bluegiga's documentation has examples of devices communicating with iOS using their chip, i should be able to develop using Rhomobile and not suffer from the limitation stated above. I wanted to be as sure as possible before making my company spend money ordering the chips and development board and what not..
Has anyone tried this, is my thinking missing something?
Thank you all for your time.
Daniel
Good Question, I think I can understand the reason for your confusion.
The main reason is many people/products/frameworks does not clearly mention if they are talking about Bluetooth Classic or Bluetooth Low Energy (BLE).
These are both 2 different things and even thougfh they are called "Bluetooth" one cannot talk to the other.
(Some devices can be both Classic and Bluetooth Low Energy, which allows it to connect to either types)
Ok now comming to your Question :
THE bluegiga dongle is BLE
The Rhomobile is refering to the Bluetooth Classic version of the API.
On iOS the BLE APIs are open to applications, but Classic is limited on iOS , one way for Apps to use Classic Bluetooth on iOS is via the Gamekit APIs but that is possible only when talking with iOS devices, so it wont connect to another Android or Win device that is also Classic.
Needless to say with BLE APIs you cannot connect to calssic anyways.
The bluegiga examples are BLE examples, and apple also has good documentation and examples / samples on how to use BLE so yes it is easy to build a device and app using BLE on iOS.
There is nothing special abut any particular chip yo ucan use any BLE chip - there are many vendors today.
BUT Android (and I guess Windows as well) does not yet have BLE APIs for applications to use :( (Bit I think is is comming soon :))
So I hope this clears things up a bit.

Android + Arduino project: should I have them talk via Bluetooth or USB?

I'm starting a project where I'm going to try to write a program for Android that will control and/or send/receive input to/from an Arduino gadget. Like, make an LED light blink, as the simplest example. I can either get a Bluetooth shield for the Arduino board and go the Bluetooth route, as per the example Androino! Control an Arduino from your Android device using a cheap Bluetooth module.
Or I can buy a USB host shield for the Arduino board and have the phone talk to the Arduino device via a USB connection, as per the example Adventures in Android ADK Development: Hardware.
Which implementation option is easier and more foolproof both from hardware setup (soldering? compatibility issues?) and programming perspectives (additional Python scripting required? 'listening' on Android for a Bluetooth device vs. a USB device and sending data back and forth?) I've been doing Android development for a couple of months, but I have NO experience with Arduino.
I don't mean this to be a lazy question - I'm able to do the research, but I'm inexperienced and am trying to choose my implementation right away so I can order the right hardware stuff in time for a deadline. I have to make sure I choose an implementation I can actually DO.
EDIT: Might it be easier still to use an ethernet shield on the Arduino board and have the Arduino gadget talk to the Android phone via TCP/IP? I don't know why this didn't occur to me from the beginning. But there seems to be far less in term of tutorials on this kind of implementation, for reasons I'm unsure of.
I am currently working on a project that interfaces an Arduino and an Android phone via bluetooth. And from my experience so far all I can say is STAY AWAY!
All the articles online about cheap bluetooth modules working perfectly are highly misleading to say the least. It might be easy and perfect if you buy an $80 shield, but not if you're on a budget. I bought a $30 shield and it only seems to work on one of the seven Android devices I have tried to use. Furthermore, it seems completely unresponsive to the standard bluetooth connection methodology and requires a host of workaround/hackish method calls that are all highly unsafe and unstable.
On the other hand a USB connection is far more reliable, better supported and of course has the inherent advantage of speed and since it is well supported does not suffer from all the pitfalls bluetooth connectivity does. It is just as easy to setup from a hardware perspective (no work required if you get a decent shield), reasonably priced compared to bluetooth shields and in my experience generally easier to code.
If you are on a budget and can do with a hardwired connection I highly recommend USB over bluetooth.
I don't know the details of either. But I would say if the phone is going to stay with the board then use USB. For lower latency and in general, I find a hardwired connection to be better for all applications.
I have no experience in Arduino and some decent experience in Android and I decided to get the usb connection to work from the phone to arduino to light up the led.
I used a Nexus One and an Arduino Mega ADK and I got the usb connection working in around 5 hours of tinkering and I was absolutely excited to get the led to light up when I clicked a button. But then I decided to go to the next level because bluetooth sounded way too cool to pass up.
Anyways around 30 hours later I FINALLY got it working and I can say it was COMPLETELY worth it. There was a TON I needed to learn, but once I got it working I can say it was not all in vain.
I bought the Bluetooth Itead V2.2 shield ($25 for me) then connected it to my arduino and used my Nexus One with Amarino to send a signal to my chip and turn off and on the led.
http://iteadstudio.com/store/index.php?main_page=product_info&products_id=468
From my experience it was definitely difficult, but the learning curve is what makes these projects so fun. So I would say GO FOR IT!
Good luck in your future works!

SmartCards And Android

I'm a C/C++ programmer with good windows and linux development experience and I also know a bit of java too. Recently, a client asked me to develop an Android app for him, wich, will most likely run on a Samsung Galaxy S or Galaxy S II, with Android 2.3, that basicaly consists in connecting a standard smartcard reader on the USB port of the device and using it to access the smartcard.
I have programmed smartcards before, but I have no experience with android. So my questions are:
Is it possible to do what I need in this hardware and O.S.?
Will I have to write my own driver to interface with the USB?
Going into more detail, I need to at least be able to execute APDU commands with the cards.
Something like the PC/SC standard. Are there any solutions in this subject already implemented?
Any ideas of where to begin?
Thanks in advance.
Short answer: not really.
Long answer: you might need to use custom firmware (Android build) to do this. Here's a project that does this, although their focus is on using embedded chips not external readers. They have a PC/SC implementation for Android.
Android has USB host support since 3.1, not sure if that is sufficient to implement a reader driver, so you can talk to your card: http://developer.android.com/guide/topics/usb/host.html
Even if you do though, you will need to somehow bridge it to your PC/SC stack.
Please open source it if you implement it :)
Did you test to connect a external smartcard reader to connect to a android device. What where results?
Greetings,
Wouter

Porting Android

i want to have some knowledge on porting android on linux devices. I am a web and android developer but now i want to port android on some hardware which you could suggest is easy for the beginners to start with.
I don't feel like buying a mobile phone this time i want to make a mobile phone :)
Please help me achieve this goal.
regards
Abhishek Talwar
Well, what you're asking is pretty complex.
Do you want to BUILD your own cellphone from scratch?
This would take a lot of knowledge and development time. You could get some GSM development boards to experiment with that. Something like these:
http://www.sparkfun.com/search/results?term=gsm&what=products
You could get an Arduino and use one of the arduino linux ports. The arduino could handle the gsm module and an lcd screen.
This is extremely complicated though.
If its android porting you're interested in, I suggest just getting a mobile phone and then porting android to it. It WILL be complicated and you better get something you can easily develop for. Windows Mobile phones would be my suggestion as there are a lot of active programs to port android to those.

Categories

Resources