Communication between Android phone and Arduino - Page 1
Forum section: electronics / general

author: pascal_sweden
author_rank: Super Contributor
timestamp: December 01, 2015, 03:18:58 pm
content: This thread is closed. I found a solution using Google Protocol Buffers.

author: Neverther
author_rank: Regular Contributor
timestamp: December 04, 2015, 06:47:46 pm
content: Sounds like a wierd idea. Might work, but the implementation would be way too platform specific to be viable and automatic code generation will have some overhead. The implementation behind it would need arduino scale abstraction (see Arduino Total Control On google play).I'd imagine they just pass the data with UART based on the datatype lenghts on the function definitions plus some glued on flow control. Passing pointers, maybe not so robust.For actual C to programs it would need its own IDE to separate the code segments and automate communication. As far as I understood, you want the "C" source to generate the code handling communication on the android application (java?) and generate/compile avr application that work together (see above, arduino abstraction from HW simplifies it).Just looking for something that will generate serial comm for the android side and implement the avr code yourself as by the specifications in the proto? Possibly borrow it from stuff like shown above if it is open source?(not even a user here, for avr+android only modified a bootloader to work with watchdog reset so I could update over bluetooth)

author: Neverther
author_rank: Regular Contributor
timestamp: December 04, 2015, 10:51:39 pm
content: No, I just did quick search if there was anything like it.Google bring up this:https://github.com/JuanLuisGonzalez/ATC-Release-Codes?files=1No android side code as it is not free?Seems like the datasets on total control are fixed and on android side the created layout just tapes together desired I/O to the receiving end.Sending data from micro is the smaeBack on track.So basically when prototype C function is called on tablet/micro, it pulls up the interface to communicate with the micro/tablet to run a function and returns the result for the tablet/micro to process. So at minimum function ID, parameters and their count/type upstream and result/type downstream.Automating the code generation for the communication on micro and android when a function prototype is defined is the goal?I might have missed it a bit as I assumed there was a need to generate one application with all code, where some code was defined to be ran on the micro only and some on androind only, my train of thought littlebit too complex...

author: amyk
author_rank: Super Contributor
timestamp: December 10, 2015, 10:48:15 am
content: You are making things more complicated than necessary. You already have a bidirectional serial link, just make your own simple protocol.Regarding "frameworks":http://discuss.joelonsoftware.com/?joel.3.219431.12

author: miguelvp
author_rank: Super Contributor
timestamp: December 11, 2015, 01:14:23 am
content: I was going to suggest looking at the video from Shahriar linked in the following thread:https://www.eevblog.com/forum/projects/tutorial-esp8266-soc-blynk-app-arduino-and-internet-of-things/msg816090/#msg816090But the OP deleted the question and found a solution, so now we don't know what the question really was (other than the subject).Even if the question and the idea was complicated and/or weird it might have been interesting but now we wont know.