{"id":8983,"date":"2020-10-16T11:13:58","date_gmt":"2020-10-16T11:13:58","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/controlling-arduino-boards-with-your-smartphone"},"modified":"2024-08-18T21:09:21","modified_gmt":"2024-08-18T21:09:21","slug":"controlling-arduino-boards-with-your-smartphone","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone","title":{"rendered":"Controlling Arduino boards with your smartphone"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"uber-den-beitrag\">About the post<\/h2>\n\n<p>In the <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/hc-05-and-hc-06-bluetooth-modules\">last post<\/a> I showed how to configure Bluetooth modules and use them to communicate from Arduino to Arduino. This article is now about the exciting topic of how to control Arduino boards with your smartphone. It is very easy to even implement voice control.<\/p>\r\n<p>The article is divided into the following sections:<\/p>\r\n<ul>\r\n<li>&#8220;Finished solutions&#8221; using the example of the Ardroid app<\/li>\r\n<li><a href=\"#BT_Terminal\">Communication via Bluetooth Terminal software<\/a><\/li>\r\n<li><a href=\"#MIT_App_Inventor\">Develop your own (Android) app with MIT App Inventor<\/a><\/li>\r\n<\/ul>\r\n\n<strong>Update 2024: Unfortunately, the Ardroid app is no longer available on Google Play. I used an APK extractor app to restore an APK file from the version on my smartphone.\u00a0You can download it <a href=\"https:\/\/github.com\/wollewald\/BlogStuff\/tree\/main\/ardroid\" target=\"_blank\" rel=\"noopener\">here<\/a> and install the app manually. To do this, you must allow your smartphone to install APKs from the download folder. I tried it and it worked. But no guarantee that it will work on all Android smartphones.\r\n<\/strong>\n\n<h2 class=\"wp-block-heading\" id=\"ardroid-eine-fertige-losung\">Ardroid &#8211; a ready-made solution<\/h2>\n\nThere are a number of apps with which you can control your Arduino quite conveniently<span style=\"display: inline !important; float: none; background-color: #ffffff; color: #191e23; cursor: text; font-family: 'Noto Serif'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">.<\/span> The corresponding sketches are included and must or can usually be adapted a little. As an example, I present the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.thechampanurag.arduino\">Ardroid app,<\/a> which you can download from Google Play. The app can control the Arduino digital and analog pins as well as send or receive text:\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-1024x643.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"643\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-1024x643.webp\" alt=\"\" class=\"wp-image-19573\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-1024x643.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-300x188.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-768x482.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-1536x964.webp 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-542x340.webp 542w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots-1320x828.webp 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid_screenshots.webp 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The three screens of Ardroid<\/figcaption><\/figure>\n\n<h3 class=\"wp-block-heading\" id=\"vorbereitungen\">Preparations<\/h3>\n\n<p>On the Arduino side I use an HC-05 Bluetooth module, which must be configured as a slave. The default baud rate on the HC-05 is 38400. Accordingly, the baud rate in the sketch and on the serial monitor must be adjusted. Or you can change the baud rate of the HC-05 as described in my<a href=\"https:\/\/wolles-elektronikkiste.de\/hc-05-and-hc-06-bluetooth-modules?lang=en\"> previous post.<\/a><\/p>\r\n<p>Since I am a comfortable person, I tested the Ardroid app with only two LEDs on pin 5 and 6. The circuit for this looks like this: <\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-Schaltung-1024x870.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"870\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-Schaltung-1024x870.webp\" alt=\"\" class=\"wp-image-19575\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-Schaltung-1024x870.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-Schaltung-300x255.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-Schaltung-768x653.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-Schaltung.webp 1046w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>The voltage divider (1 k \/ 2 k<span style=\"display: inline !important; float: none; background-color: #ffffff; color: #191e23; cursor: text; font-family: 'Noto Serif'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">\u03a9<\/span>) I have added for correctness, because the RX pin on the HC-05 officially only tolerates 3.3 V. &nbsp;  So far, however, I have consistently ignored this and have never had any problems with 5 V.<\/p>\r\n<p>The 3.3 V connected to A0 only serve to read out a defined value at this input. &nbsp;<\/p>\r\n<p>Pairing the HC-05 with your smartphone works like any other Bluetooth device. The pin must be entered once (default: 1234). Then you can connect to your module in the Ardroid app (Settings &#8211; &gt;  Paired Devices).&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\" id=\"der-ardroid-sketch\">The Ardroid sketch <\/h3>\n\n<p>On Google Play (or <a href=\"https:\/\/goo.gl\/iRPKWP\">here<\/a>) you can get the corresponding sketch via a link. You only have to adjust the baud rate if necessary.&nbsp; When uploading the sketch, you will probably get an error message if the HC-05 is already connected to the RX Pin of the Arduino. Disconnect when uploading, then it works. Here&#8217;s what the included sketch looks like:<\/p>\r\n\n<div class=\"scroll-paragraph\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"Ardroid.ino\" data-enlighter-title=\"Ardroid.ino\">\/*\r\n PROJECT: Ardroid\r\n CODED BY: Anurag Goel\r\n PUBLIC Licence Free To Modify\r\n*\/\r\n\r\n#define START_CMD_CHAR '*'\r\n#define END_CMD_CHAR '#'\r\n#define DIV_CMD_CHAR '|'\r\n#define CMD_DIGITALWRITE 10\r\n#define CMD_ANALOGWRITE 11\r\n#define CMD_TEXT 12\r\n#define CMD_READ_ARDROID 13\r\n#define MAX_COMMAND 20  \r\n#define MIN_COMMAND 10  \r\n#define IN_STRING_LENGHT 40\r\n#define MAX_ANALOGWRITE 255\r\n#define PIN_HIGH 3\r\n#define PIN_LOW 2\r\n\r\nString inText;\r\n\r\nvoid setup() {\r\n  Serial.begin(38400);\r\n  Serial.println(\"Ardroid By : Anurag Goel\");\r\n  Serial.flush();\r\n}\r\n\r\nvoid loop()\r\n{\r\n  Serial.flush();\r\n  int ard_command = 0;\r\n  int pin_num = 0;\r\n  int pin_value = 0;\r\n\r\n  char get_char = ' ';  \/\/read serial\r\n\r\n  \/\/ wait for incoming data\r\n  if (Serial.available() &lt; 1) return; \/\/ if serial empty, return to loop().\r\n\r\n  \/\/ parse incoming command start flag \r\n  get_char = Serial.read();\r\n  if (get_char != START_CMD_CHAR) return; \/\/ if no command start flag, return to loop().\r\n\r\n  \/\/ parse incoming command type\r\n  ard_command = Serial.parseInt(); \/\/ read the command\r\n  \/\/ parse incoming pin# and value  \r\n  pin_num = Serial.parseInt(); \/\/ read the pin\r\n  pin_value = Serial.parseInt();  \/\/ read the value\r\n  \/\/ 1) GET TEXT COMMAND FROM ARDROID\r\n  if (ard_command == CMD_TEXT){   \r\n    inText =\"\"; \/\/clears variable for new input   \r\n    while (Serial.available())  {\r\n   char c = Serial.read();\r\n  \r\n     \/\/gets one byte from serial buffer\r\n      delay(5);\r\n      if (c == END_CMD_CHAR) { \/\/ if we the complete string has been read\r\n        \/\/ add your code here\r\n        Serial.println(inText);\r\n        break;\r\n      }              \r\n      else {\r\n        if (c !=  DIV_CMD_CHAR) {\r\n          inText += c; \r\n          delay(5);\r\n        }\r\n      }\r\n    }\r\n  }\r\n\r\n  \/\/ 2) GET digitalWrite DATA FROM ARDROID\r\n  if (ard_command == CMD_DIGITALWRITE){  \r\n    if (pin_value == PIN_LOW) pin_value = LOW;\r\n    else if (pin_value == PIN_HIGH) pin_value = HIGH;\r\n    else return; \/\/ error in pin value. return. \r\n    set_digitalwrite( pin_num,  pin_value);  \r\n    return;  \/\/ return from start of loop()\r\n  }\r\n\r\n  \/\/ 3) GET analogWrite DATA FROM ARDROID\r\n  if (ard_command == CMD_ANALOGWRITE) {  \r\n    analogWrite(  pin_num, pin_value ); \r\n    \/\/ add your code here\r\n    return;  \/\/ Done. return to loop();\r\n  }\r\n\r\n  \/\/ 4) SEND DATA TO ARDROID\r\n  if (ard_command == CMD_READ_ARDROID) { \r\n\/\/    char send_to_android[] = \"Place your text here.\" ;\r\n\/\/    Serial.println(send_to_android);   \/\/ Example: Sending text\r\n    Serial.print(\" Analog 0 = \"); \r\n    Serial.println(analogRead(A0));  \/\/ Example: Read and send Analog pin value to Arduino\r\n    return;  \/\/ Done. return to loop();\r\n  }\r\n}\r\n\r\n\/\/ 2a) select the requested pin# for DigitalWrite action\r\nvoid set_digitalwrite(int pin_num, int pin_value)\r\n{\r\n  switch (pin_num) {\r\n  case 13:\r\n    pinMode(13, OUTPUT);\r\n    digitalWrite(13, pin_value);  \r\n    \/\/ add your code here      \r\n    break;\r\n  case 12:\r\n    pinMode(12, OUTPUT);\r\n    digitalWrite(12, pin_value);   \r\n    \/\/ add your code here       \r\n    break;\r\n  case 11:\r\n    pinMode(11, OUTPUT);\r\n    digitalWrite(11, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 10:\r\n    pinMode(10, OUTPUT);\r\n    digitalWrite(10, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 9:\r\n    pinMode(9, OUTPUT);\r\n    digitalWrite(9, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 8:\r\n    pinMode(8, OUTPUT);\r\n    digitalWrite(8, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 7:\r\n    pinMode(7, OUTPUT);\r\n    digitalWrite(7, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 6:\r\n    pinMode(6, OUTPUT);\r\n    digitalWrite(6, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 5:\r\n    pinMode(5, OUTPUT);\r\n    digitalWrite(5, pin_value); \r\n    \/\/ add your code here       \r\n    break;\r\n  case 4:\r\n    pinMode(4, OUTPUT);\r\n    digitalWrite(4, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 3:\r\n    pinMode(3, OUTPUT);\r\n    digitalWrite(3, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 2:\r\n    pinMode(2, OUTPUT);\r\n    digitalWrite(2, pin_value); \r\n    \/\/ add your code here       \r\n    break;      \r\n  \r\n  } \r\n}<\/pre>\r\n<\/div>\r\n\nThe commands from the Ardroid app are sent to the Arduino as a string via the serial input. The string starts with a start tag (&#8220;*&#8221;). Hereinafter, the string contains three numbers that encode the command, the pin, and value. The numbers are extracted from the string via <code>parseInt()<\/code> commands, which is a very convenient method.\r\n\r\nThere are four commands: one for digitalWrite, one for analogWrite, one for sending text and one &#8220;multi-purpose&#8221; (CMD_READ_ARDROID), which is used here to read A0 by an analogRead command.\r\n\r\nSwitching and dimming the LEDs (= &gt; sections &#8220;DIGITAL&#8221; and &#8220;ANALOG&#8221; in the Ardroid app) works very well. However, section \u00a0 &#8220;DATA&#8221; is apparently not quite mature yet. It is necessary to precede the text to be sent with a <code>*any_number*any_number<\/code>. So e.g.:\r\n\r\n<code>*1*1Text<\/code> \u00a0\u00a0 returns the output &#8220;Text&#8221; on the serial monitor\r\n\r\nThe function for reading A0 is apparently not working. This can be &#8220;repaired&#8221;, and will come to that soon. In addition, this part of the article serves anyway primarily as an introduction to the development of our own app which enables full control. \u00a0<a id=\"BT_Terminal\"><\/a>\n\n<h2 class=\"wp-block-heading\" id=\"bluetooth-terminal\">Bluetooth terminal<\/h2>\n\n<p>In the next step, I leave the Arduino page with the Ardroid Sketch unchanged, but replace the Ardroid app with the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=Qwerty.BluetoothTerminal\">Bluetooth Terminal<\/a>app. With this very simple app you can easily understand how the Ardroid app works behind the scenes. Of course, a connection to the HC-05 must first be established in this app (setting &#8211; &gt;  Connect a device &#8211; Secure or &#8211; Insecure). In order to get rid of the blank lines when output in the serial monitor, you can deactivate  &nbsp; &#8220;Append newline (\\r\\n)&#8221; in the app settings.<\/p>\r\n<p>For example, to switch on the LED connected to pin 5, you send:<\/p>\r\n<p><code>*10bla5blabla3<\/code> or &nbsp; more simple: <code>*10*5*3<\/code> (encoding: see <code>#define<\/code> definitions in the sketch)<\/p>\r\n<p>Important is the first character &#8220;*&#8221; and that three numbers are included. The characters in between are ignored. For example, to make the LED at pin 6 to the faintly low, you send:<\/p>\r\n<p><code>*11*6*30<\/code> &nbsp;<\/p>\r\n<p>To get text to the serial monitor:<\/p>\r\n<p><code>*12*9*9Gru\u00df vom Smartphone#<\/code><\/p>\r\n<p>So you have to enter three numbers here as well because the sketch uses three  <code>parseInt()<\/code> commands. However, in this case the value of the back two numbers doesn&#8217;t matter. Again, the final hash is important because this is the cancellation condition for reading the string.<\/p>\r\n<p>For triggering the analogRead function, a simple<\/p>\r\n<p><code>*13<\/code><\/p>\r\n<p>is sufficient.&nbsp;<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Bluetooth-Terminal_Ardroid_sketch.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"496\" height=\"1020\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Bluetooth-Terminal_Ardroid_sketch.jpg\" alt=\"The Bluetooth Terminal app\" class=\"wp-image-926\" style=\"width:248px;height:510px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Bluetooth-Terminal_Ardroid_sketch.jpg 496w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Bluetooth-Terminal_Ardroid_sketch-146x300.jpg 146w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/a><figcaption class=\"wp-element-caption\">Bluetooth Terminal app in action <\/figcaption><\/figure>\n<\/div>\n<h3 class=\"wp-block-heading\" id=\"ardroid-sketch-reparieren\">&#8220;Repair&#8221; of the Ardroid sketch<\/h3>\n<p>With this knowledge, the Ardroid sketch can also be modified (see below), so that you can send texts as well as read A0 in the section &#8220;DATA&#8221; of the Ardroid app. Or you can add other functions. When using this sketch, you set a <code>*1*1<\/code> in the DATA app area before the text to be sent or a <code>*2*1<\/code> if you want to read A0. I do not want to make the post too long, so I do not discuss this in detail. If you have any questions: ask!<\/p>\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ardroid_repaired.ino\" data-enlighter-title=\"ardroid_repaired.ino\">\/*\r\n PROJECT: Ardroid\r\n CODED BY: Anurag Goel\r\n PUBLIC Licence Free To Modify\r\n\r\n Modified by Wolfgang Ewald\r\n*\/\r\n\r\n#define START_CMD_CHAR '*'\r\n#define END_CMD_CHAR '#'\r\n#define DIV_CMD_CHAR '|'\r\n#define CMD_DIGITALWRITE 10\r\n#define CMD_ANALOGWRITE 11\r\n#define CMD_TEXT 12\r\n#define CMD_READ_ARDROID 13\r\n#define MAX_COMMAND 20  \r\n#define MIN_COMMAND 10  \r\n#define IN_STRING_LENGHT 40\r\n#define MAX_ANALOGWRITE 255\r\n#define PIN_HIGH 3\r\n#define PIN_LOW 2\r\n\r\nString inText;\r\n\r\nvoid setup() {\r\n  Serial.begin(38400);\r\n  Serial.println(\"Ardroid By : Anurag Goel\");\r\n  Serial.flush();\r\n}\r\n\r\nvoid loop()\r\n{\r\n  Serial.flush();\r\n  int ard_command = 0;\r\n  int pin_num = 0;\r\n  int pin_value = 0;\r\n\r\n  char get_char = ' ';  \/\/read serial\r\n\r\n  \/\/ wait for incoming data\r\n  if (Serial.available() &lt; 1) return; \/\/ if serial empty, return to loop().\r\n\r\n  \/\/ parse incoming command start flag \r\n  get_char = Serial.read();\r\n  if (get_char != START_CMD_CHAR) return; \/\/ if no command start flag, return to loop().\r\n\r\n  \/\/ parse incoming command type\r\n  ard_command = Serial.parseInt(); \/\/ read the command\r\n  \/\/ parse incoming pin# and value  \r\n  pin_num = Serial.parseInt(); \/\/ read the pin\r\n  pin_value = Serial.parseInt();  \/\/ read the value\r\n  \/\/ 1) GET TEXT COMMAND FROM ARDROID\r\n  if (ard_command == CMD_TEXT){   \r\n    if(pin_num == 1){\r\n      inText =\"\"; \/\/clears variable for new input   \r\n      while (Serial.available())  {\r\n      char c = Serial.read();\r\n    \r\n       \/\/gets one byte from serial buffer\r\n        delay(5);\r\n        if (c == END_CMD_CHAR) { \/\/ if we the complete string has been read\r\n          \/\/ add your code here\r\n          Serial.println(inText);\r\n          break;\r\n        }              \r\n        else {\r\n          if (c !=  DIV_CMD_CHAR) {\r\n            inText += c; \r\n            delay(5);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    if(pin_num == 2){\r\n      char send_to_android[] = \"Hello\" ;\r\n      Serial.println(send_to_android);   \/\/ Example: Sending text\r\n      Serial.print(\" Analog 0 = \"); \r\n      Serial.println(analogRead(A0));  \/\/ Example: Read and send Analog pin value to Arduino\r\n      return; \r\n    }\r\n  }\r\n\r\n  \/\/ 2) GET digitalWrite DATA FROM ARDROID\r\n  if (ard_command == CMD_DIGITALWRITE){  \r\n    if (pin_value == PIN_LOW) pin_value = LOW;\r\n    else if (pin_value == PIN_HIGH) pin_value = HIGH;\r\n    else return; \/\/ error in pin value. return.\r\n    set_digitalwrite( pin_num,  pin_value);  \r\n    return;  \/\/ return from start of loop()\r\n  }\r\n\r\n  \/\/ 3) GET analogWrite DATA FROM ARDROID\r\n  if (ard_command == CMD_ANALOGWRITE) {  \r\n    analogWrite(  pin_num, pin_value ); \r\n    \/\/ add your code here\r\n    return;  \/\/ Done. return to loop();\r\n  }\r\n}\r\n\r\n\/\/ 2a) select the requested pin# for DigitalWrite action\r\nvoid set_digitalwrite(int pin_num, int pin_value)\r\n{\r\n  switch (pin_num) {\r\n  case 13:\r\n    pinMode(13, OUTPUT);\r\n    digitalWrite(13, pin_value);  \r\n    \/\/ add your code here      \r\n    break;\r\n  case 12:\r\n    pinMode(12, OUTPUT);\r\n    digitalWrite(12, pin_value);   \r\n    \/\/ add your code here       \r\n    break;\r\n  case 11:\r\n    pinMode(11, OUTPUT);\r\n    digitalWrite(11, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 10:\r\n    pinMode(10, OUTPUT);\r\n    digitalWrite(10, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 9:\r\n    pinMode(9, OUTPUT);\r\n    digitalWrite(9, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 8:\r\n    pinMode(8, OUTPUT);\r\n    digitalWrite(8, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 7:\r\n    pinMode(7, OUTPUT);\r\n    digitalWrite(7, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 6:\r\n    pinMode(6, OUTPUT);\r\n    digitalWrite(6, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 5:\r\n    pinMode(5, OUTPUT);\r\n    digitalWrite(5, pin_value); \r\n    \/\/ add your code here       \r\n    break;\r\n  case 4:\r\n    pinMode(4, OUTPUT);\r\n    digitalWrite(4, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 3:\r\n    pinMode(3, OUTPUT);\r\n    digitalWrite(3, pin_value);         \r\n    \/\/ add your code here \r\n    break;\r\n  case 2:\r\n    pinMode(2, OUTPUT);\r\n    digitalWrite(2, pin_value); \r\n    \/\/ add your code here       \r\n    break;      \r\n  \r\n  } \r\n}<\/pre>\r\n<p>\u00a0<\/p>\r\n<\/div>\r\n\n<h3 class=\"wp-block-heading\" id=\"steuerung-uber-den-pc\">Control via PC <\/h3>\n\n<p>You can also control it via the PC. For this purpose, for example, you can use the freeware<a href=\"https:\/\/www.microsoft.com\/de-de\/p\/bluetooth-serial-terminal\/9wzdncrdfst8?activetab=pivot:overviewtab\">Bluetooth Serial Terminal<\/a>, which is very similar to the previously discussed smartphone app. You need a Bluetooth adapter, you have to activate it in the Windows settings, make the pairing and finally connect the PC to the module in the program. The rest works as described above for the smartphone.<a id=\"MIT_App_Inventor\"><\/a>&nbsp;<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Bluetooth_Terminal.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"793\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Bluetooth_Terminal-1024x793.png\" alt=\"Bluetooth Serial Terminal in action.\" class=\"wp-image-927\" style=\"width:512px;height:397px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Bluetooth_Terminal-1024x793.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Bluetooth_Terminal-300x232.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Bluetooth_Terminal-768x594.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Bluetooth_Terminal.png 1204w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\"><br\/><\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"eine-app-mit-mit-app-inventor-entwickeln\">Develop an app with MIT App Inventor<\/h2>\n\n<h3 class=\"wp-block-heading\" id=\"vorbereitung-auf-der-arduinoseite\">Preparation on the Arduino side <\/h3>\n\n<p>I modified the Ardroid sketch for the development of my own app, shortened it and called it &#8220;bt_receiver.ino&#8221;. Among other things, I have changed:<\/p>\r\n<ul>\r\n<li>SoftwareSerial replaces hardware serial (avoids upload issues described above)<\/li>\r\n<li>the commands I have defined as enum<\/li>\r\n<li>the reading of a text message is done via a simple <code>readString()<\/code><\/li>\r\n<li>I have removed the long case construct<\/li>\r\n<li> &#8220;High&#8221; and &#8220;Low&#8221; statements are transmitted directly and not encoded<\/li>\r\n<\/ul>\r\n<p><span style=\"display: inline !important; float: none; background-color: #ffffff; color: #191e23; cursor: text; font-family: 'Noto Serif'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">Apart from that, the sketch should be self-explanatory. <\/span>The strings to be transmitted look a little different, here are a few examples: <\/p>\r\n<p><code>*1*5*1<\/code> &#8211;&gt; Pin 5 HIGH<\/p>\r\n<p><code>*2*6*100<\/code> &#8211;&gt; analogWrite PIN 6, value 100 <\/p>\r\n<p><code>*3Hallo<\/code> &#8212; &gt;  outputs &#8220;Hallo&#8221; on the serial monitor<\/p>\r\n<p><code>*4<\/code> &#8212; &gt;  analogRead of PIN 0 and send the result <\/p>\r\n<p>It should also be noted that the baud rate on the serial monitor must be set to 9600 and that RX and TX of the Arduino are now pin 10 and 11. <\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"730\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid.webp\" alt=\"\" class=\"wp-image-19577\" style=\"width:447px;height:365px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid.webp 894w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-300x245.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Ardroid-768x627.webp 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/a><figcaption class=\"wp-element-caption\">Controlling Arduino with your smartphone &#8211; with SoftwareSerial<\/figcaption><\/figure>\n<\/div>\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"bt_receiver.ino\" data-enlighter-title=\"bt_receiver.ino\">#include &lt;SoftwareSerial.h&gt;\r\n#define START_CMD_CHAR '*'\r\n\r\nSoftwareSerial mySerial(10, 11);\r\nenum command {DIGITALWRITE=1, ANALOGWRITE, DISPL_TXT_MSG, EXEC_TASK};\r\n\r\nvoid setup() {\r\n  Serial.begin(9600);\r\n  mySerial.begin(38400);\r\n  Serial.println(\"Bluetooth Empf\u00e4nger bereit\");\r\n}\r\n\r\nvoid loop(){\r\n  \r\n  if(mySerial.available()){\r\n    analyzeMsg();\r\n  }\r\n}\r\n\r\nvoid analyzeMsg(){\r\n  int cmdType;\r\n  int pinNum, pinValue = 0;\r\n  char getChar = ' ';  \/\/read serial\r\n\r\n  getChar = mySerial.read();\r\n  if(getChar != START_CMD_CHAR) return; \r\n  cmdType = mySerial.parseInt(); \/\/ read the command\r\n  \r\n  if(cmdType==DIGITALWRITE){\r\n    pinNum = mySerial.parseInt();\r\n    pinValue = mySerial.parseInt();\r\n    pinMode(pinNum, OUTPUT);\r\n    digitalWrite(pinNum, pinValue);\r\n  }\r\n\r\n  if(cmdType==ANALOGWRITE){\r\n    pinNum = mySerial.parseInt();\r\n    pinValue = mySerial.parseInt();\r\n    pinMode(pinNum, OUTPUT);\r\n    analogWrite(pinNum, pinValue);\r\n  }\r\n  \r\n  if(cmdType==DISPL_TXT_MSG){\r\n    String msg = mySerial.readString();\r\n    Serial.println(msg);\r\n  }\r\n\r\n  if(cmdType==EXEC_TASK){\r\n    execTask();\r\n  }\r\n}      \r\n    \r\nvoid execTask(){\r\n  int value = analogRead(A0);\r\n  mySerial.print(\"Analog 0 = \");\r\n  mySerial.println(value);\r\n} <\/pre>\r\n<p>\u00a0<\/p>\r\n<\/div>\r\n\n<h3 class=\"wp-block-heading\" id=\"smartphone-apps-schreiben\">Developing smartphone apps<\/h3>\n\n<p>Programming smartphone apps is nothing you can learn by the way. If you really want to deep-dive into this topic, you should learn Java and deal with development environments like Eclipse or Android Studio. The good news is that there is a simple alternative that is completely sufficient for our purposes and that is called MIT App Inventor. If you follow this <a href=\"http:\/\/appinventor.mit.edu\/explore\/\">link,<\/a> you will get a lot of information about who is behind this project, how it works, which tutorials tare available (highly recommended as an introduction) and much more. A step-by-step guide would go beyond the scope of this post, but I will try to convey the essential points to you.&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\" id=\"das-ziel-eine-eigene-app-zur-arduino-steuerung\">The goal: your own app for Arduino control<\/h3>\n\n<p>I&#8217;ll just start with the result to hopefully arouse your interest. I have developed a small app called &#8220;Arduino BT Control&#8221; that includes all the functions of the Ardroid app and also includes voice control (!). Since I am &#8211; as already mentioned &#8211; comfortable, I have limited myself to two pins regarding the pin control. But you can easily expand that. So, this is what the app looks like:&nbsp;<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Arduino_BT_Control.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"493\" height=\"1013\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Arduino_BT_Control.jpg\" alt=\"Controlling Arduino with your smartphone - The interface of the Arduino BT Control app\" class=\"wp-image-951\" style=\"width:123px;height:253px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Arduino_BT_Control.jpg 493w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Screenshot_Arduino_BT_Control-146x300.jpg 146w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/a><figcaption class=\"wp-element-caption\">Arduino BT Control &#8211; a self-developed app<\/figcaption><\/figure>\n<\/div>\n<p>The large button &#8220;Connect HC-05&#8221; connects to the HC-05. &#8220;Analog Control&#8221; and &#8220;Digital Control&#8221; are self-self-explanatory. &#8220;Talk2Me&#8221; starts the voice control, e.g. you can turn on an LED with a spoken &#8220;pin f\u00fcnf an&#8221; (sorry &#8211; it speaks German). &#8220;SendTxt&#8221; sends text to the serial monitor, &#8220;Analogread&#8221; queries pin A0.<\/p>\r\n<p>On the Arduino side, as already mentioned, the bt_receiver.ino Sketch is used (see above). &nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\" id=\"wie-funktioniert-mit-app-inventor\">How does MIT App Inventor work?<\/h3>\n\n<p>First of all, MIT App Inventor is an online solution, i.e. no program installation is required on your PC. One does not write a single program line during app development, but constructs program blocks visually from prefabricated individual parts. If you&#8217;ve ever worked with <a href=\"https:\/\/scratch.mit.edu\/\">Scratch,<\/a> you&#8217;ll find yourself here quickly.<\/p>\r\n<p>What is particularly cool is that you can follow the creation of your apps in real time on your smartphone. This applies to both design and functionality. It is not necessary to compile code in between and beam apk files to the smartphone. You don&#8217;t do that until you&#8217;re satisfied with your result and the app is supposed to run independently of the development environment.<\/p>\r\n<p>To connect the smartphone to MIT App Inventor, you must first install the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=edu.mit.appinventor.aicompanion3&amp;hl=en_US\">APP MIT AI2 Companion.<\/a> MIT App Inventor then provides a number or QR code for the connection. Very convenient! I had some problems using Edge, but Chrome worked well.&nbsp;<\/p>\r\n<p>Click on this <a href=\"http:\/\/ai2.appinventor.mit.edu\">link<\/a> to get to the programming interface and log in with your Google Account.&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\" id=\"der-designer-bildschirm\">The Designer Screen<\/h3>\n\n<p>As mentioned, I can&#8217;t provide step-by-step instructions here, and just explain the concept. Essentially, the app development consists of two steps, namely the design and the definition of the functions behind the design. For this purpose there are two screens between which you can switch, namely &#8220;Designer&#8221; and &#8220;Blocks&#8221;.&nbsp; The Designer screen looks like this for the Arduino BT Control app:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Designer-1024x801.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"801\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Designer-1024x801.webp\" alt=\"\" class=\"wp-image-19579\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Designer-1024x801.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Designer-300x235.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Designer-768x601.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Designer.webp 1293w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The Designer screen<\/figcaption><\/figure>\n\n<p>On the left side you see the menu for the different elements that can be inserted. In the submenu &#8220;User Interface&#8221; you find buttons, checkboxes, sliders, etc. Under &#8220;Layout&#8221; you find elements such as horizontal and vertical arrangements. Bluetooth can be found under Connectivity. Just take a look.&nbsp;<\/p>\r\n<p>The Components window reflects the structure of the components. Here you can also rename components, which is absolutely advisable, so as not to lose track. For example, &#8220;Pin5_Slider&#8221; makes more sense than the pre-set &#8220;Slider1&#8221;.&nbsp;<\/p>\r\n<p>In the &#8220;Properties&#8221; window you can define the properties of the components, e.g. shape, color or which values are displayed for the sliders. For example, for an analogRead slider, you might want to specify a range from 0 to 255. &nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\" id=\"der-blocks-bildschirm\">The Blocks screen<\/h3>\n\n<p>The components assembled in the Designer screen can&#8217;t do anything at first. What they trigger and under what conditions or how they should change is specified in the Blocks screen:&nbsp;<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-1024x584.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"584\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-1024x584.webp\" alt=\"\" class=\"wp-image-19581\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-1024x584.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-300x171.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-768x438.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-1536x876.webp 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks-1320x753.webp 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/App_Inventor_Blocks.webp 1750w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The Blocks screen<\/figcaption><\/figure>\n\n<p>In the &#8220;Blocks&#8221; window, you can click on one of the components to get a selection of different blocks to choose from. The selected block will be transferred into the viewer window where it can be moved freely. For example, because a slider can only do certain things, only the corresponding blocks are suggested. This allows you to work quite intuitively and quickly. In addition, under &#8220;Built-In&#8221; there are general blocks e.g. for text, if-then-else constructs and much more.&nbsp;<\/p>\r\n<p>Another help is that the blocks are shaped like puzzle pieces. As a result, only certain components fit together and everything must be completed. This avoids syntax errors, but you have to pay attention to the logic errors yourself.&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\" id=\"die-entwickelte-app-installieren\">Install the developed app<\/h3>\n\n<p>Finally, you can generate an apk file under the menu item &#8220;Build&#8221;, which can be conveniently transferred to the smartphone via a QR code.<\/p>\r\n<p>The project is stored online. You can also export it as an &#8220;.aia&#8221; file, save it to your PC, share it with others, and then import it again. You can download the &#8220;.aia&#8221; file for the Arduino BT Control app presented <a href=\"https:\/\/github.com\/wollewald\/BlogStuff\/blob\/main\/arduino_bt_control\/Arduino_BT_Control.aia\" target=\"_blank\" rel=\"noopener\">here<\/a> (follow the link and then click on the download icon on the right) and customize it to your liking. Alternatively, you can find the project in the gallery of MIT App Inventor if you click on this <a href=\"https:\/\/gallery.appinventor.mit.edu\/?galleryid=5800205027508224\" target=\"_blank\" rel=\"noopener noreferrer\">Link<\/a>\r\n.<\/p>\r\n<p>After a short period of getting used to it, you will quickly become familiar with MIT App Inventor. I think it&#8217;s a brilliant invention and hope you enjoy it as much as I do.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arduino boards (or other MCUs) can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.<\/p>\n","protected":false},"author":1,"featured_media":7907,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[568,548],"tags":[618,616,556,614,615,596,619],"class_list":["post-8983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bluetooth-en","category-wireless","tag-app-inventor-en","tag-ardroid-en","tag-arduino-en-2","tag-bluetooth-en","tag-control-with-smartphone","tag-hc-05-en","tag-voice-control"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Controlling Arduino boards with your smartphone &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"The Arduino can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Controlling Arduino boards with your smartphone &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"The Arduino can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-16T11:13:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-18T21:09:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/BT_Smartphone_Beitragsbild.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"510\" \/>\n\t<meta property=\"og:image:height\" content=\"510\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"Controlling Arduino boards with your smartphone\",\"datePublished\":\"2020-10-16T11:13:58+00:00\",\"dateModified\":\"2024-08-18T21:09:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone\"},\"wordCount\":2137,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/BT_Smartphone_Beitragsbild.jpg\",\"keywords\":[\"App Inventor\",\"Ardroid\",\"Arduino\",\"Bluetooth\",\"control with smartphone\",\"HC-05\",\"voice control\"],\"articleSection\":[\"Bluetooth\",\"Wireless\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone\",\"name\":\"Controlling Arduino boards with your smartphone &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/BT_Smartphone_Beitragsbild.jpg\",\"datePublished\":\"2020-10-16T11:13:58+00:00\",\"dateModified\":\"2024-08-18T21:09:21+00:00\",\"description\":\"The Arduino can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/BT_Smartphone_Beitragsbild.jpg\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/BT_Smartphone_Beitragsbild.jpg\",\"width\":510,\"height\":510,\"caption\":\"Controlling Arduino with your smartphone\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/controlling-arduino-boards-with-your-smartphone#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Controlling Arduino boards with your smartphone\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Controlling Arduino boards with your smartphone &#8226; Wolles Elektronikkiste","description":"The Arduino can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone","og_locale":"en_US","og_type":"article","og_title":"Controlling Arduino boards with your smartphone &#8226; Wolles Elektronikkiste","og_description":"The Arduino can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone","og_site_name":"Wolles Elektronikkiste","article_published_time":"2020-10-16T11:13:58+00:00","article_modified_time":"2024-08-18T21:09:21+00:00","og_image":[{"width":510,"height":510,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/BT_Smartphone_Beitragsbild.jpg","type":"image\/jpeg"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"Controlling Arduino boards with your smartphone","datePublished":"2020-10-16T11:13:58+00:00","dateModified":"2024-08-18T21:09:21+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone"},"wordCount":2137,"commentCount":0,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/BT_Smartphone_Beitragsbild.jpg","keywords":["App Inventor","Ardroid","Arduino","Bluetooth","control with smartphone","HC-05","voice control"],"articleSection":["Bluetooth","Wireless"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone","url":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone","name":"Controlling Arduino boards with your smartphone &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/BT_Smartphone_Beitragsbild.jpg","datePublished":"2020-10-16T11:13:58+00:00","dateModified":"2024-08-18T21:09:21+00:00","description":"The Arduino can be controlled via Bluetooth with your smartphone. There are pre-built apps for this or you can develop them yourself with MIT App Inventor.","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/BT_Smartphone_Beitragsbild.jpg","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/BT_Smartphone_Beitragsbild.jpg","width":510,"height":510,"caption":"Controlling Arduino with your smartphone"},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/controlling-arduino-boards-with-your-smartphone#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"Controlling Arduino boards with your smartphone"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/8983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=8983"}],"version-history":[{"count":0,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/8983\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/7907"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=8983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=8983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=8983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}