{"id":146,"date":"2013-08-22T03:02:50","date_gmt":"2013-08-22T03:02:50","guid":{"rendered":"http:\/\/jeffcardillo.com\/blog\/?p=146"},"modified":"2025-04-21T05:11:01","modified_gmt":"2025-04-21T05:11:01","slug":"146","status":"publish","type":"post","link":"http:\/\/jeffcardillo.com\/blog\/2013\/08\/22\/146\/","title":{"rendered":"Android talking with Arduino &#8211; over the internet!"},"content":{"rendered":"<p>I apologize that the videos start with the phrase &#8220;hey Jerry&#8221;; I was never expecting to release these videos to the public. This is a project I worked on for my brother and\u00a0his kids.<\/p>\n<p>The purpose of the project was\u00a0to create a robot that could be\u00a0driven over the internet. The approach\u00a0is pretty simple:<\/p>\n<ol>\n<li>Use arduino hardware to control a platform with motors and wheels.<\/li>\n<li>Talk to the arduino with an android phone over bluetooth using a bluetooth arduino shield.<\/li>\n<li>Talk to the\u00a0android phone on the robot over the internet with a socket connection from a 2nd android phone.<\/li>\n<\/ol>\n<p><!--more--><\/p>\n<p>My brother was in charge of getting the robot platform and I created the software to run it all. Here are a couple videos showing my progress. I use LEDs to show outputs changing, but the final project will actually be turning on motors to drive the robot.<\/p>\n<p>The first video shows a simple android app that I built to talk to an arduino board over bluetooth. I demonstrate the pairing procedure, and then show that I can turn LEDs on and off from the phone. I&#8217;m serializing data over the bluetooth connection and the arduino program (that I also wrote) parses it and change the voltage on the output wires.<\/p>\n<p>https:\/\/www.youtube.com\/watch?v=xHrhAjsnuP4<\/p>\n<p>This next\u00a0video demonstrates the same thing working, however, the device that is sending the signals\u00a0to change the LEDs is a 2nd android phone. There is a socket connection between the two phones which allows me to send data between them. This means that the arduino board and 1st phone can be anywhere in the world, and I can still send commands to it from a 2nd android phone over the internet.<\/p>\n<p>https:\/\/www.youtube.com\/watch?v=H9ccoTCuT4A<\/p>\n<p>With these pieces working we were able to wire the arduino up to the robot platform and drive it around! My brother lives in Massachusetts and I live in New Jersey, and I drove around his house using my android phone!<\/p>\n<p>Our goal was to bring video over from the android phone into the app I built as well, but I never had time to finish that piece. My brother used a video app that broadcasts the video from the phone through a web server, and this\u00a0allowed me to connect to a live video feed through my computer&#8217;s web browser while I drove the robot from my phone.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I apologize that the videos start with the phrase &#8220;hey Jerry&#8221;; I was never expecting to release these videos to the public. This is a project I worked on for my brother and\u00a0his kids. The purpose of the project was\u00a0to create a robot that could be\u00a0driven over the internet. The approach\u00a0is pretty simple: Use arduino hardware to control a platform with motors and wheels. Talk to the arduino with an android phone over bluetooth using a bluetooth arduino shield. Talk&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"http:\/\/jeffcardillo.com\/blog\/2013\/08\/22\/146\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9,12,13,11,2,39],"tags":[3,15,14,4],"class_list":["post-146","post","type-post","status-publish","format-standard","hentry","category-android","category-arduino","category-c","category-java","category-programming","category-project","tag-android","tag-arduino","tag-c","tag-java"],"_links":{"self":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":7,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":153,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions\/153"}],"wp:attachment":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/categories?post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/tags?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}