 Thank you guys. So, first of all, the audio check. How was the audio? Is it high, low, or good? Okay, low. So, thanks for the introduction. So, as you said, I work as a research engineer in Yahoo Labs. And all this stuff, which I'm showing you, has nothing to do with my DJI. All these are just hobbies. And to explain all those and just one word, you have to read my T-shirt. I didn't even write it. Okay, so, let's start. And this is the editor. And as I said, let's start it again. So, I have this little button here. And I'm going to control that using my Android. Okay, so it's slightly difficult controlling it with one hand. Okay, let it take a left turn. Okay, come back. Let's leave it shy now. It's going towards that. See, hello. Okay, so I think you get that idea. So, if somebody wants to play like this, maybe just contact me after the talk. You can play around with us. You can control it and all that stuff. So, let's get into the talking. And let me just switch it off a bit. Just around a year back, I got fascinated by Arduino and then Android. And then I was trying to make them talk to each other and stuff like that. And so, the talk which I'm going to do today is mostly for an Android user perspective or an Android developer perspective. So, as I said, the talk which I'm going to give now is mostly for an Android developer. So, I'm not going to talk much about the hardware details. I'm just going to give you an overview of the hardware details. And provided that you already have them all, we're going to control that using Android. Also, I'm going to talk about different techniques which you can use to efficiently interact with the external world using your Android form. By external world, I need any device which you want to control. So, let's start. So, you already saw the demo. So, the entire source code for it, both the Android source code as well as the Arduino source code is there on GitHub. Maybe I can also post the schematic for it. The schematic is very simple. It's just that I'm too lazy to upload it there. So, I'll upload it pretty soon. And so, let's go ahead. So, if you take any robot, for instance, a robot could be something which is very complex or a very simple line-following robot or even an electronic arm or the ones which are used in the manufacturing plants. Any robot for you to take, for instance, it basically has this anatomy. So, you have a bunch of sensors and then you have a processor and then you have a model. So, what is going to happen is this robot, so the processor is like a brain of it. So, it's going to interact with the external world both by using the sensors as well as the models. The sensors are like input to your computer program. So, if you have any computer program, you're going to have an input which you're going to process and then you're going to give some output, the same thing for a robot. So, you have some sensors, you read state from an external world by reading those sensors and then you do some logic, you process it and then you control the external world using the models. So, as I said, android, you know, it's pretty simple. You have a very simple form but it's pretty powerful, right? So, you can act as a sensor. So, you already know about most of the sensors which are like an android, right? You have a camera, you have an axiometer, you have three axis, what is that? Three axis orientation meter, you have GPS which can pinpoint where exactly you are. You have GSM data which you can process and a whole lot of sensors which you can use. I think you also talked about, you know, I think you also talked about the new features in camera and stuff like that, right? So, you have a whole bunch of sensors which you can use. And for the processor part, you have, you can basically write your app in the native Java code if you are familiar with Java or if you just want to just control some stuff and you don't want to really get into android development, I think most of you would hear about android stripping there, right? So, you can use that as well. So, in android stripping, you can probably use Python, JavaScript, I guess you can use Lua that holds two of languages which you can use as well. So, when comparing with the previous slide, right? Of an anatomy app or robot. So, you have what? You have a sensor and the processor. So, the missing part is the motor and that's where Arduino comes in because Arduino is very good in dealing or in controlling different motors for you. And what is Arduino? So, how many of you have heard about Arduino before? Wow, that's really good. So, for the benefit of the people who don't know about Arduino, it's a combination of hardware and software which you can use to create hardware-based programs, okay? So, I think that most of you are pretty and so I'm not sure if you've known about visual basic. So, around maybe when I started my career, we had this program called visual basic which is supposed to be the most familiar or the most favorite language of idiots, I guess, in those days. That's how it was marketed. So, visual basic was a tool which enabled people to create desktop applications without actually getting into the event loop and stuff like that. So, all the hard part of desktop programming was abstracted out for you and you just have to drag and drop to create desktop applications. The same thing they have done for hardware program. So, you can consider Arduino as a visual basic for hardware program. So, it basically contains a small hole with a lot of input and output pins and a processor. And these input and output pins you can access from your program. So, you also have another language called Arduino which is very similar to C, okay? And you have a lot of library functions which you can use to read input, to write output and stuff like that. So, reading input, you can read sensor values and writing output, you can control motors, servo motors, DC motors and whole lot of stuff. Okay, so, now we have Android which has the sensor and the processor part and we have Arduino which is a motor part. And now what we are going to do? Just like make up talk and then you have your robot. So, I am just going to talk about different ways by which you can make both an Android and Arduino talk to each other. So, there is a whole lot of ways by which you can do. And throughout this presentation as I said before, I am going to concentrate mostly from Android perspective how you can talk. And believe me, I am not showing any code here. These are just techniques which are used and some advantages and disadvantages for each of those methods. So, basically each method is going to have its own advantages and disadvantages. And based on your case or use case, you can decide on which one to take out. Okay, so I am just going to talk about that. So, first is Globooth and this little body which I showed you is running on Globooth. So, what I am going to do is I have an Android phone and this has an Arduino board and two DC motors. The two DC motors are the ones which are controlling the wheels and then it has an Arduino board and then the battery which is the valid part of it. And then you have an H-bridge which is a small microcontroller which controls the two DC motors. So, all these are just like pre-built PCBs. I have done any PCB design and stuff like that. I have just connected wires. Just like how you connected the board. I have just connected all the wires. I have not done anything fancy with this. So, as I said, this is how this works. So, the Globooth part, what you will be is a Globooth shield. For those of you who have used Arduino, I think you know about the concept of shields. So, shield is an add-on for Arduino. And there are a variety of shields which are available and each shield provides a different functionality to Arduino. And in this case, you need a Globooth shield. And then there is an open source library called Ambrino which is a combination of Arduino library and Android library. And that is the same thing which I am using for this particular property as well. So, you can use that to connect both your Arduino and Android. So, the way it works is you have a jar file for your Android which you have to just drag and drop into your Android project. And for the Arduino site, you have a library which is put in the library folder. And then they give you a pre-handset of methods which you have to call to make to a start distribution. And believe me, just like three or four lines of code to set up a working Globooth connection. And you can also check out the code in my data. So, what are the advantages of using Globooth? So, first, you don't need a wired connection. So, here I was controlling the bot from my phone and it's not wired, right? So, it's easy for me to control it and stuff like that. So, first, advantage is it doesn't need a wired connection. The second is it can work from Android 1.5. So, there are other methods which doesn't work on the latest phones but which work only on the latest phones. So, this is one of the major advantages. So, the third advantage is it's a two-way communication. You can send data from, you know, back to Android as well as you can transmit data from Android to Android. You can do two-way communication as well. And a couple of disadvantages which are basically equivalent to any Globooth communication, right? So, you have power consumption which is pretty high for Globooth transaction. And it's slightly slower when you compare with other connection types. I'll show you other connection types where it's slightly faster but Globooth is generally very slow. And the range is also pretty limited. I can probably, when I tried outside auditorium, I was able to control my bots maybe for around 25 to 30 feet. Not beyond that. So, that's the range which you can expect for Globooth. And by the way, if you guys have any questions, just talk me right over there. Or you can also contact me after the talk. But if it's something which can be answered at that particular context, then do stop me. Yes. Yes, that's what I tried today. I haven't tried it before. I was just trying to see how long I can control it. So, with a new strip board, I was able to control it for 25 feet. That's what the spec said. That's what the spec said but I couldn't. I mean, till 25 feet, it was working without any package. Where do you get this audio board and the motors? Okay. So, all the stuff which I've used here, I got it from SP Road in Bangalore. And I can also give you the shop names if you want. So, the Arduino board, the original board cost around 1,400 bucks. And there is a shop called NSK which have original boards. And you can also get duplicate boards for 700 bucks. But the point is they clearly tell you that this is a duplicate board and this is an original board. So, you won't be ripped off that I can produce. That I'm pretty sure. The batteries I got from Ohm Electronics, I think this is 600 bucks. And the edge bridge and the case on the wheel and the DC motor, I got it from Ohm Electronics again. Yeah. And there's a whole lot of online shops from here. I think there's 9 circuits, there's technet, I don't know how you pronounce it. They also had a booth here. And they come up with a whole bunch of people from here you can buy it. But if you are one of those people who want to buy it, after seeing them, you can go to SP Road. And you can have a nice shopping on a Saturday evening or whatever. Yeah, you can also be there. Okay. So, moving on. So, the next way by which you can control or do the communication is using Wi-Fi. Okay. For Wi-Fi, again, you need something called a Wi-Fi Sheet which is available for RDA. And the other requirement obviously is that you should have a working Wi-Fi connection and both your Android as well as Arduino should be connected to the same Wi-Fi network. So, my initial plan was to make this board using Wi-Fi. Then I moved on to Bluetooth because using Wi-Fi is very difficult to give them, especially in a conference like this where, you know, there are like holds to of things which you have to take into account when you're connected to Wi-Fi and stuff like that. But Arduino as such has very good support for Wi-Fi as well as the internet connection. So, if you have some requirement regarding that, you can still use that. And so, the usual advantage is, so it's not wired and two-way communication is possible and it can work from any device which is running on one and not on the other side. Hello. Yes, here. Yes. Can you Wi-Fi direct for it? Without the access point? I need to know about Wi-Fi direct just a couple of hours before this. I will definitely check that and when it was given the talk about it, that's the same thing which I was running in my mind. So, I'm just definitely going to check it tonight when I go and I will, right now I don't have an answer for it but I can give an answer once I find out. Maybe next to yourself USB sheet but all these sheets are different or do we get everything in one sheet? No, all these are different sheets. You know is like your base or you call it base platform and these, so you can compare this with your Firefox, right? Firefox, you get a default browser and then for each functionality, you add and add on to it, right? Similarly, are you just comes up with a backboard and then for each of the functionality which you want, you can buy those sheets and then add them on top of that. I have a slide about that, so they have this concept of ADK, right? So, I'm also going to talk about that as well. So, any questions so far till now? Yes. Okay, so on the Arduino side, you have a pretty big library as well as a sheet which is all open source and in the Android side, it's just like, you know, you have to use it, use like a socket. So, you will have an ID and then you can open a socket and then start communicating with that. How many sheets can you put in? Sorry? Can you stack on top of each other? There's technically there's no limit. Unless and until two sheets are going to use the same thing. Even if they're going to use the same thing, there's another sheet which can prevent that. So, technically you don't have a limit. You can keep stacking stuff on top of each other. I've seen, personally I've tried around six sheets on top of each other, on top of Arduino. I've seen people who are using more than 10 sheets and they have their own web server running on top of Arduino with authentication and stuff like that. Okay, so next is using the USB cable. I think most of you would have seen the Google I-O presentation which happened last time, right? The last Google I-O. So, the new thing which really excited me personally was the introduction of ADK, the Accessory Development Kit which Google introduced. So, they have this concept where you can create your own accessories to Android phones and they can... So, I think in the demo video which they showed, they were talking about threadmills which can talk to Android and lighting systems which can talk to Android. They also have this concept of Android at home where you can control the whole slot of devices using Android. So, the patient ADK Kit which they showed the demo is running on Android. Sorry, it's Arduino. Both Android and Arduino, it already is confusing things there. Okay, so this Arduino or this ADK port which Google introduced is nothing but an Arduino port and a USB sheet combined together into a single port. And I think they cost around 7000 rupees or 8000 rupees if you actually want to try it out. Yeah, something around that. But you can buy your own Arduino and then you can also buy your own USB sheet and then use it as an ADK as well. Yes. So far I have tried only the ADK. So, you can use that as an ADK as well. So, you don't necessarily have to buy an ADK Kit. You can also use Arduino and USB sheet together. So, that's what I said. You either need an ADK Kit or you can buy an Arduino and use this port sheet and then use that as an ADK sheet. So, towards the end of the presentation I have a link where I explain to you how to use a normal standard Arduino and USB port sheet as ADK Kit as well. So, what are the advantages of this? It has native support in Android back by Google. So, you get all those framework advantages. It's not ACI, it's part of the framework and stuff like that. And it's pretty fast. The amount of data which you can transmit is also pretty high. I mean, the frequency which you can transmit the data is also pretty high and it's all tolerant and all that. So, because since it's part of the framework itself, you get a lot of advantages. And the other major advantage or the other common advantage is that it's a two-way communication. So, your Android phone can talk to your ADK and the ADK can talk back to your Android phone. But the major disadvantage which I personally feel is that it works only in Gingerbread and above. So, your phone, you have to have the latest phone. And obviously, you also need a wired connection for it. This is a slight variation. This is the second slight variation of using ADK. So, this also works by the USB cable. But the advantage in this is it can run from any phone from 1.5. This is very similar to ADK and this concept was done way before ADK was introduced. And if I'm not wrong, I think ADK was based on this. Not based on this, it was influenced by this. That's the reason why actually Ruby came up with the concept of ADK. So, there is this open source library called MicroBridge which allows you to talk between an Android phone and an Arduino. The way that you do this is pretty interesting. I think as an Android developer, most of you would have heard about LogCat, right? The default logging mechanism by which you do it. So, what they have done is they open a socket from the Arduino side and when you plug your Android device into it, you can read from the log files. So, if you have to communicate from your Android to Arduino, you just do log.d or whatever. Log.d or log.d or whatever. And then basically, until the Arduino can read it. And the same way, there's a socket which is open from Arduino side and Android can talk through that socket. Or you can write a file on the SD card which Android can read it. So, that's how this communication works. So, this library has completely abstracted it out for you. So, you just have to call two functions for reading and writing. And the main advantage is it works on older versions of Android as well. And as again, this has a two-way communication. But the slight disadvantage of this approach is that, which I think I have not put in the slide is that it's like slightly slower when you compare with other approaches because ADK has native support in Android, but this is through logcat and file access and stuff like that. So, if you want something, if you want a real-time update and real-time communication between Android and Arduino, then you can't use this approach. But if you're just going to try some, you know, as a hobby or something like which is not time critical, then you can use this approach. And you can also use it with older phones. And then this personally is my favorite. You can actually talk to an Arduino port from your Android using the audio jacket or the audio pin in your phone. So, I think both of you want to add an audio output, right? You can actually communicate from your Android to your Arduino or to any other device. You basically can send data out using your audio jacket. So, the way it works is every file, I think, for every minute or every second, it actually has 64-bit audio data represented in 64-bit. So, you can encode your data as a waveform and then play in your Android phone. And that is given as an output. And then you have an audio pin that reads that and then decodes it. If I'm not wrong, this is the same approach which is used by Tata and Nikon for their TataSky app. So, they give you this small connector which you plug into your audio output of your phone and then you can use your phone as a remote. So, what they have done is they have this miniature version of Arduino inside that and which reads the data out and then gives the data to an IR sensor, sorry, IR sensor. That IR sensor is actually acting as a remote. So, pretty interesting things can be done. There is also another company which has created an entire credit card processing system based on this approach. You can use your phone as a credit card standard and that's been done with this. And the main advantage is the size is very small. So, if you look at the device, it's just that the audio jacket with male pin, so that is the thing which is bigger than the entire package. So, that's something which you can try. But the one disadvantage is the one-way communication. It's very difficult for you to communicate back from Arduino into Android. And so, it has the user-issued advantage. It's very compact. The power consumption is very less and stuff like that. And one disadvantage, again, is like it's slightly difficult to work with because you have to encode your entire data in very format. So, again, the easy way to do it is for every command you can create a way files and store it in your SD card and make your Android app play it. Or the other option is you have to generate a dynamic which I think is slightly more complicated to do on an Android phone. But a lot of interesting stuff has been happening around this. You might probably not take that out as well. And then, this is actually no trainer. So, your phone is at the end of the day's phone. So, you can receive SMS and can receive calls. So, similarly, for Arduino, you have something called GSM Sheet, which is another sheet which is going to act as a... which basically acts as GSM capabilities. So, you can put a SIM card to it. And in your phone, you already have a SIM card. So, you do that answer using SMS. Or you can even make a call and then do that answer. So, if any time you want to send data from Arduino to Android or from Android to Arduino, you basically send SMS back. So, it's pretty simple. RAID is unlimited as long as you're willing to pay for SMS. And it's very simple to set up. You don't have much to do. And the other advantages, the main disadvantages is that there's a potential for views. Now, anybody who goes to number or all these banks call you up for free credit card and free SMSes and stuff like that can screw up yours over. That's the only disadvantage I can pick up. Yeah, so again, you cannot do real-time data transfers here, right? So, it has to be slightly slower. So, I've seen an interesting use case of this. There was this... I wouldn't call it a bot, but there was this project based on Arduino, which is like essentially... they have a small wire which is plugged into the soil of a flower pot. And whenever... and then they try to send a signal or send a voltage from one wire to the other and try to do something from the other wire. If the sand is wet, then it is transmitted. If it's not wet, it's not transmitted. So, what happens is, as soon as the signal breaks, the Arduino board sends it to it. So, it's basically for the plant pot over there. So, the idea is that the plant is going to tweet saying that I need water. So, yes. So, the other... apart from the hobby, the real use case is that whenever there's going to be landslides, they have these small, inexpensive sensors placed and whenever there's going to be any of these catastrophic events going to happen, you get signals or you get SMS as well. In some way, you get notified and stuff like that. Yes. Yeah. So, you would have probably seen the ads where you control your AC using SMS or whatever. So, you send an SMS and your AC or you can switch some stuff like that. Okay. So, moving on. I think yesterday there was this talk about cloud-to-device messaging, right? So, you can use that as well for communicating between a Arduino and Android. So, the way this works is on the Arduino side, you need a Wi-Fi signal or an internet signal. So, this can make a call to a server program. So, and this server program can initiate the C2DM messaging. So, you get the notification from your server to your device based on the C2DM framework. So, once you get the notification, you can decide on what to do and stuff like that. So, I actually included this just for the sake of completeness because this technique is, you know, it's really not very useful if you ask me in my opinion because there are a lot of additional setup which you have to do and it's not real-time and there are a lot of issues with this. First is you need, so your Arduino should be have the capability to ping a server, right? And after that you should have C2DM setup in your phone. And apart from that, the C2DM message cannot contain I think more than 1024 bytes or something like that. So, you can only send a notification but if you need to send a lot of data then you have a problem here. So, I just included this for the sake of completeness. If you don't want to try it out, you can try it out and maybe there's one use case for which this is an ID solution. So, you have the usual advantages and disadvantages. The main disadvantage is that you should have an Android phone which is prior and above because C2DM is supported only in those phones. So, these are some of the options which are available, yes? I have a question here. Or is it my voice which was echoing to the back to you? So, these are some of the other options which you have for communication. So, I think you also heard about NFC today. So, you can use NFC. So, I had an interesting conversation with the person who had the boot outside SNA. So, this NFC reader which they have is actually a USB device. At the end of the day, it's just a USB device which you can communicate over USB or serial or USB. And Arnav has another she will call USB or Sheet which can access a USB host. So, the person who was having the boot there he actually connected his NFC reader to a laptop. So, a cheap laptop would cost you around 30K but an Arduino with an SD card Sheet would cost you less than 2K. And if you add a USB host Sheet the cost would somewhere around 3,000 to 4,000. And using this combination you can do the entire stuff which he was doing using a laptop. So, that's a business idea if somebody want to pursue it you can pursue it. So, the basic idea is that you connect your any USB any USB device to Arduino and then you can still you can read private data or if you want to store data you can store it on an SD card and boost up the card. So, the second option is using a computer as an intermediate. So, Arduino can talk to a computer using a USB cable and then you can figure out how you want to communicate between your phone and your computer to do it wifi or you can also use a wired connection. So, these are not like very useful but maybe for debugging when you actually want to do debugging or if you want to do a prototype then probably try out these steps. The other third one is a pretty interesting thing I think the tablets which are running Anico have USB host support. So, in those cases what happens generally when you connect your android phone to any device your android phone is going to act as an accessory it's not the server so usually protocol has a server and a client concept. So, one is the host which is like the server the other one is the accessory or the client when you connect your android phone your android phone is going to act as an accessory and your keyboard mouse everything is a necessary your computer would act as a host right but starting on Anico android tablets have the capability of being a USB host. In those cases your Arduino board becomes a necessary. So, you can directly plug it and then start the communication. So, that's again one possibility which you can try. I will physically have an access to a tablet yet so I haven't tried it out but that's something which you can do. But I'm not sure what are the practical problems there but you can probably share that out as well. Sorry, somebody is here. You can try it using Android XS. Yes, you can try doing that as well. There's another interesting use case which you can do you know if you want to try out ADK ADK is an accessory development kit and you don't want to get messier with the hardware you can use your computer as an accessory because it's you have a USB connection so it can act both as a host as well as a client. Now what happens is you connect your form to your computer and your computer in the computer you can read using a serial or USB port so if you're using Python you can use pi serial or pi USB and then your entire computer itself can act as a accessory for your Android phone. So, I'm trying something around that once maybe if I have some updates I'll post it somewhere I think this is already done using C. I'm just trying to use Python and trying to see if I completely eliminate the hardware part for doing your accessory development. So, I think we are almost done with the presentation so the summary is this don't throw away your older Android phones so you can play around with it, you can do stuff like this you know you believe it or not any Android phone which you have has more capabilities than you know I'm not really sure I read it somewhere but I'm not sure how accurate it is when NASA launched the satellite or when they launched the three astronauts to the moon the entire computation power which they had was less than the one less than the Android phone which you have right now. I'm not sure if it's entirely true or not but it could be relatively true as well so you have so much potential in your hands and just like your imagination and you can do amazing stuff as well so that's almost done with the presentation so these are some of the links to the stuff which I talked about so links to the library you know the machines which I talked about and stuff like that so I think I'm done with the time so any questions it shows a previous slide sorry this is not running on you know this is the previous version the one which is previous but most of the versions of are that doesn't really matter because the only difference is the amount of memory which these boats have so as long as you're not looking at it which is really complex any of these boats should work but I personally tried Mega which is the one which is just before you know has the is it necessary to be an android phone technically no it can be any kind it can not even be a phone it can be even your TV remote it can be your wild V remote any device which is capable of sending an IOS or a Bluetooth signal whatever so the only reason why I concentrated mostly on the android side is that just for the reason that this is an android conference see the one more question I'm really interested are you know with any of the home appliances home appliances I've tried it out with my ceiling fan lights and stuff like that so there is this relay so you have the relay which basically all your lights are going to be on 230V and the audio is running on 5V so I have this 5V to 230V relay which can basically control my light and fan and stuff like that and to the to the Arduino side I interface it with my TV remote so normal TV remote I use it to control my fan light and one day my door probably turns sorry not yet I would probably upload it to youtube pretty soon I was not sure anybody would be interested in doing this but since there is interest now I would upload it to youtube I'll start uploading most of the demos on youtube now which audio would be used for home appliances the same one the same one the same one it doesn't really matter you can also use a duplicate one so you can find it in sql and there are some words which have additional functionalities for IR we don't need a shield per se you just need the IR receiver and the IR receiver is just about 5 rupees or something just need the IR receiver and then you can come through it basically you can take it off but it's pretty easy to do that's just 3 lines and when you connect it you can read it and do whatever IR the TV remote which I use as a range of around maybe like from 20 feet 20 to 25 feet but it reads line of sight we are done with our time of questions if you have more questions you can take it offline so let's give a round of applause for this project thank you guys and I am just going to have my buddy outside so if somebody want to play with it we can still do it we are going to come now