Go Down

Topic: Communicate with YUN using WIFI with Android phone (Read 18799 times) previous topic - next topic


Dec 13, 2013, 02:57 pm Last Edit: Dec 13, 2013, 02:59 pm by Vadorequest Reason: 1

Some news and updates right now ;)
We successfully reached the 2.0 version!

New video, test #2,( some troubles with youtube, I don't understand the format, on my computer it's fine!), explanation about the functionalities: https://www.youtube.com/watch?v=amPQWXRpA-A

New video, real test (#3): https://www.youtube.com/watch?v=Vfax7QpjkhE

Car controlled in a real environment, with two batteries (9V each), one for the YUN + camera and the big one for the motor.
The little battery is connected to a 9V->5V regulator.

Documentation updated!
UML pictures: https://github.com/Vadorequest/AAD1/tree/master/Design/UML
Reports: https://github.com/Vadorequest/AAD1/tree/master/Design/Documentation
(Word and PDF formats!)

The documentation will probably be updated again, but now there are a lot of information inside.
Still some bugs/issues with Android application when the car is out of Wi-Fi range. (Video stream/car control)

Hope it will help people!

PS: We give back all reports, documentation and source code to our teachers today, end of the project.
We will add powerpoint/prezzi next week and a better video! ^^
Probably some photos too ;)


yeah! this rocks! did you power the yun using the car own batteries?


No, I use two different batteries here, but I could use only one later.


Very nice project!

I would be very interested for the socket part tutorial   XD


About the socket I followed this tutorial and I customized the source code for my application.


But it's a really good tuto to start!


New video, a better one ^^



Jan 29, 2014, 08:54 pm Last Edit: Jan 29, 2014, 08:59 pm by ember Reason: 1
Great project !
Could you please share some info about socket communication ? Did you test for maximum speed you can send data without worrying about YUN durability ?
In my project, I need to send a lot of data with the fastest possible speed  and for a long period, and I'm wondering if YUN is the right choice.
Could you update the Arduino code ? Unfortunatelly, I cannot find the code responsible for streaming.
Thanks !


Jan 29, 2014, 09:01 pm Last Edit: Jan 29, 2014, 09:04 pm by Vadorequest Reason: 1
What do you mean by durability?

You should take a look to the documentation to learn more about the socket communication:
Page 8 (and more!)


Pictures about design:

The code for streaming isn't on the arduino but on the Android application!
Actually, the arduino was configured to use the camera and the stream was readable from http localhost, the Android app just read the stream on the arduino localhost. That's the way we did it.


Thanks for the reply.
By durability, I mean what is the minimum delay in main loop (the one that waits for incoming requests), that doesn't cause YUN to overheat.
Am I understanding correctly, that camera has its own WiFi module, that streams the video directly to Android? What is the way of sending those video stream? ( sending, not recieving)


No, the camera must be plugged using a cable (USB for us) to the YUN to send the stream to the YUN that makes it available at the loacalhost, but there is a tutorial about that. But I don't find the link so far. It's on this forum.
Please see the camera documentation to know more about that, all your questions (so far) could be answered if you took (a good) look to the doc, I know it's big, but you would learn plenty of things. And I guess the link is inside! Somewhere (cam part)

About overheat, I'm not a YUN pro but so far I never see this problem happens or be discussed here. But about the delay, it's just fucking fast with sockets! Too fast to count it "by head", maybe 100ms, maybe less/more.

I mean, I press a button and it's like instantaneous.


So I guess I will have deeper look into  docs  :)
Thanks for answer!


If you have more questions once you have read the doc, don't hesitate to ask!
You're welcome.


I have a similar project and right now I'm trying to get the yun to communicate with Android through wifi.
At this point I don't quit understand the concept of socket. Any links or short statement on that?


Jan 02, 2015, 03:13 am Last Edit: Jan 02, 2015, 03:15 am by mart256
Thanks for sharing this proyect, I could compile the app doing some minor changes (I'm on Android Studio 1.0.1 and the code is one year old).

The app works on my tablet with android 4.0.3 (API 15). I can see streaming fine with my HD 3000. I'm still new at android so I'll try to figure out the code, I'm planning on doing a similar app for my wifi remote control car.

I have a question though, on the code there is a MainActivity.java and a activity_main.xml but I didn't see those implementations on the app. Are they for future implementation?

Thanks again for sharing your work!

Go Up