Programming Arduino Yun to connect Android phone

Guys, I am building a tri-copter with a WI-Fi connectivity in which I dont know how to connect my Arduino Yun board to the Android or iOS phone. Which programming language do I need to learn for that? Is it C+, JavaScript, or any other language? Please do reply, I cant work further on my project without knowing the answer!

harshhirani94123:
Guys, I am building a tri-copter with a WI-Fi connectivity in which I dont know how to connect my Arduino Yun board to the Android or iOS phone. Which programming language do I need to learn for that? Is it C+, JavaScript, or any other language? Please do reply, I cant work further on my project without knowing the answer!

Wow, there’s so many options to connect the Yun to a cellphone via wifi, I’ll mention 2 ways I’ve done:

  1. Configure Yun as a REST API, then build your own cellphone app to send REST commands, the language for doing this is arduino (C/Wiring). Then you have to build the app. There are many languages to build an app nowadays, you can use java for building native android, swift to build IOS, or you can use html/javascript/css using phonegap to do a multi-platform app (works on android or ios).

  2. Configure Yun as a web-server, then you open the html interface in your cellphone as a client, and send request to the server. The languages required for the interface are html, javascript and css, and for the server there are many options (php, python, ruby), but python is the best imo for the yun. Then connect the webserver to the arduino side using the bridge library.

harshhirani94123: Guys, I am building a tri-copter with a WI-Fi connectivity in which I dont know how to connect my Arduino Yun board to the Android or iOS phone. Which programming language do I need to learn for that? Is it C+, JavaScript, or any other language? Please do reply, I cant work further on my project without knowing the answer!

sonnyyu: The list of programming language Yun/Yun Shield supports:

  • Erlang (a general-purpose concurrent, garbage-collected programming language and runtime system)
  • Java
  • JavaScript
  • Lua
  • PHP
  • Perl
  • Python
  • Ruby
  • 4th (an imperative stack-based computer programming language and programming environment)
  • eggdrop (Eggdrop is a popular IRC bot and the oldest still in active development)
  • sigscheme (SigScheme is a R5RS Scheme interpreter for embedded use.)
  • slsh (Interpreter for S-Lang scripts)
  • tcl (Tool Command Language)
  • vala (C-sharp like language for the GObje)
  • C
  • C++
  • MIPS Assembly Language
  • Shell Scripts
  • Fortran

As Android programmer Java will make him/her back home.

harshhirani94123: Guys, I am building a tri-copter with a WI-Fi connectivity in which I dont know how to connect my Arduino Yun board to the Android or iOS phone. Which programming language do I need to learn for that? Is it C+, JavaScript, or any other language? Please do reply, I cant work further on my project without knowing the answer!

@harshhirani94123,

There are three parts to what you will need to learn. The mobile phone part, and the Arduino Yun has two sides; the Arduino side and a Linux side, which runs the wifi.

On the Mobile Part This is the easiest, but most challenging part. The best way is to use a framework, like Ionic, Senca Touch or Phonegap. Phonegap is the best choice for embedded system, however, Ionic is the easiest to learn, and Sencha Touch has the best commercial support.

I personally use Phonegap, but I recommend Ionic for people new to mobile development.

You will need to learn HTML5, CSS3, and Javascript. All three frameworks work this way. They are all in a class called Hybrid frameworks.

You can download all the tools for free. However, if you develop for iOS you will need to buy an Apple device; I use a iPodTouch (~$200). In addition for iOS you will need to signup as a developer and pay Apple $100.

You can also build your entire App in the cloud with a free service by Adobe - called Phonegap Build

I should also repeat - programming for mobile device (smart phones) is a challenge - regardless of what tools you use.

These two articles will also help: Explanation of PhoneGap/Cordova for the Layman Which programming language should I learn to make apps?

On the Linux Side This is easy, if you know how to use the Command Line. If not, it will be a challenge. This side talks to Arduino via a Bridge Library that can be used transparently via the web. This means you can control your copter via a REST API (which is directly connected to the web). However, the Bridge can be sluggish, but you can disable the Bridge and talk directly to the Arduino.

On the Arduino Side If you have programmed the Arduino before, then this will be trivial in comparison to the rest. If not, I recommend you tackle this part first.

That's it. I'm sure others will have more.

Best of Luck Jesse

thank you guys for your reply! I got the knowledge about which programming languages to learn and how to proceed! If any queries further, I will let you know..Thank you very much ;)

Can you guys tell me what further improvements I can bring as per the latest technology available with us within my Tri-copter project?

Guys, To build a tri-copter project, will I need an accelerometer and a gyroscope or any one of two to attain a balance flight?

harshhirani94123: Guys, To build a tri-copter project, will I need an accelerometer and a gyroscope or any one of two to attain a balance flight?

Yes, 3D robotics has found that two accelerometers work best with the larger drones. And they do use a gyroscope.

Jesse

Okay, thanks for the reply

harshhirani94123: Guys, To build a tri-copter project, will I need an accelerometer and a gyroscope or any one of two to attain a balance flight?

@harshhirani94123, you can build those parts, but the drones from 3D robotics already has it.

https://store.3dr.com/

If you insist on building it from scratch, you will need both to obtain balanced flight. You may need two (2) accelerometer, but this is what I've heard. I have not implemented.

Best of Luck, Jesse