{"id":3950,"date":"2021-02-24T12:46:59","date_gmt":"2021-02-24T11:46:59","guid":{"rendered":"https:\/\/home.et.utwente.nl\/slootenvanf\/?p=3950"},"modified":"2021-12-01T11:52:10","modified_gmt":"2021-12-01T10:52:10","slug":"bluetooth-comm-app-inventor-ble-nano","status":"publish","type":"post","link":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/","title":{"rendered":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board"},"content":{"rendered":"\n<p>This tutorial describes how to build an electronic circuit with an RGB LED (a LED that can change color), and change its color using an App. It also demonstrates two-way communication over Bluetooth LE between an App built with <a href=\"https:\/\/appinventor.mit.edu\/\" target=\"_blank\" rel=\"noreferrer noopener\">App Inventor<\/a> and the BLE-Nano board. The BLE-Nano board is basically an Arduino Nano with an added onboard Bluetooth LE module. App Inventor is a very user-friendly and easy way to build Android apps, using a designer and blocks-like programming.<\/p>\n\n\n\n<p>This tutorial is very similar to <a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/2019\/02\/28\/control-rgb-led-bluetooth\/\" target=\"_blank\" rel=\"noreferrer noopener\">this tutorial<\/a>, which describes setting up (one way) communication over Bluetooth LE between an App built with App Inventor and a regular Arduino Nano using an external HM10 Bluetooth module.<\/p>\n\n\n\n<p>Please check out the Troubleshooting section at the end of this tutorial if you run into trouble.<\/p>\n\n\n\n<p>The BLE-Nano board we use in this tutorial (sold&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.hobbyelectronica.nl\/product\/ble-nano-atmega328p-cc2540\/\" target=\"_blank\">here<\/a>) is a combination of a traditional Nano with a Bluetooth BLE module, based on the CC2540 BLE Bluetooth chip.<\/p>\n\n\n\n<p>This is the pinout of the board:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2020\/04\/arduino_nano_ble_pin_diagram-1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>The pinout is the same as the regular Nano.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Build the circuit: add an RGB LED to the BLE-Nano board and test it<\/h2>\n\n\n\n<p>First, build the circuit according to the example given below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"661\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect-1024x661.png\" alt=\"\" class=\"wp-image-3958\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect-1024x661.png 1024w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect-300x194.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect-768x496.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect-100x65.png 100w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_nano_ble_rgb_connect.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"699\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit-1024x699.jpg\" alt=\"\" class=\"wp-image-3960\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit-1024x699.jpg 1024w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit-300x205.jpg 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit-768x524.jpg 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit-100x68.jpg 100w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit-1536x1048.jpg 1536w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Resistors are 220 ohm (180 or 330 will work also). RGB LED is of type common-cathode.<\/p>\n\n\n\n<p>If using a Common-Anode RGB LED: replace the&nbsp;<strong>black<\/strong>&nbsp;wire with a&nbsp;<strong>red<\/strong>&nbsp;one and connect that to 5V:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/02\/rgb-led_cathode_anode.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/02\/rgb-led_cathode_anode.jpg\" alt=\"\" class=\"wp-image-1519\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/02\/rgb-led_cathode_anode.jpg 600w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/02\/rgb-led_cathode_anode-300x150.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/figure>\n\n\n\n<p>Next, download&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/div\/arduino\/BT_rgb_led.ino\" target=\"_blank\">this example sketch:&nbsp;<code>BT_rgb_led.ino<\/code><\/a>&nbsp;and open it in the Arduino IDE.<\/p>\n\n\n\n<p>Please note: if using a Common-Anode RGB LED: In the code, find the comment \u201c<code>\/\/ if you're using a common-anode ...<\/code>\u201d and use that piece of code instead of the code for the common-cathode LED (comment that out).<\/p>\n\n\n\n<p>Connect the Arduino to your computer with the USB cable. In the Tools menu, select <em>Board<\/em>, <em>Processor <\/em>and <em>Port<\/em> (the number of your port might differ):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_select_board.png\"><img loading=\"lazy\" decoding=\"async\" width=\"454\" height=\"368\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_select_board.png\" alt=\"\" class=\"wp-image-3955\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_select_board.png 454w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_select_board-300x243.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/arduino_select_board-100x81.png 100w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/><\/a><\/figure>\n\n\n\n<p>Click the upload button <img decoding=\"async\" loading=\"lazy\" width=\"26\" height=\"25\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/11\/upload.png\" alt=\"Upload button\" class=\"wp-image-2185\" style=\"vertical-align:top\"> to compile the code and upload it to the Arduino. After you uploaded the sketch, the LED should blink red-green-blue once, as you can see in the code in the <em>setup()<\/em>. You can use this to verify whether you connected it properly. If it did not blink, check your wiring.<\/p>\n\n\n\n<p>Start the Serial Monitor (<em>Tools &gt; Serial Monitor<\/em>) and check if its speed is set to \u201c9600 baud\u201d and line ending set to &#8220;Both NL &amp; CR&#8221;.<\/p>\n\n\n\n<p>Now type <strong><code>255,255,255<\/code><\/strong> and press Enter, then check if the LED turns on (white). Try other color values, eg. <strong><code>255,0,0<\/code><\/strong> for red.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/send_rgb_val_serial_mon.png\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"336\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/send_rgb_val_serial_mon.png\" alt=\"\" class=\"wp-image-3953\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/send_rgb_val_serial_mon.png 858w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/send_rgb_val_serial_mon-300x117.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/send_rgb_val_serial_mon-768x301.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/send_rgb_val_serial_mon-100x39.png 100w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Get started with App Inventor and install the demo App<\/h2>\n\n\n\n<p>If you are new to App Inventor, you might want to <a href=\"https:\/\/appinventor.mit.edu\/explore\/get-started\" target=\"_blank\" rel=\"noreferrer noopener\">do a &#8216;getting started&#8217; tutorial first<\/a>. But this tutorial will take you through the basics of opening and using a ready-build app (but it will not learn you how to create the app).<\/p>\n\n\n\n<p>Take these steps to open the App:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download <a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/div\/arduino\/Control_RGB_LED_v4.aia\" target=\"_blank\" rel=\"noreferrer noopener\">the file <code>Control_RGB_LED_v4.aia<\/code><\/a> to your computer. This contains the App Inventor project for the App.<\/li><li><a href=\"https:\/\/appinventor.mit.edu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Login to App Inventor<\/a> by clicking the &#8220;Create Apps!&#8221; icon in the top bar.<\/li><li>Select <em>Projects<\/em>, <em>Import project (.aia) from my computer &#8230;<\/em> then click the <em>Choose File<\/em> button to select the .aia file you downloaded. Click <em>Ok<\/em>.<\/li><li>The project will be loaded and you see something like:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"620\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-1024x620.png\" alt=\"\" class=\"wp-image-3963\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-1024x620.png 1024w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-300x182.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-768x465.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-100x61.png 100w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1.png 1276w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>How this environment works will be explained below. But first we will show how to install the App on your phone:<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Install the App Inventor Companion App on your phone (<a href=\"https:\/\/play.google.com\/store\/apps\/details?id=edu.mit.appinventor.aicompanion3\" target=\"_blank\" rel=\"noreferrer noopener\">Google Play store<\/a>\/<a href=\"https:\/\/apps.apple.com\/us\/app\/mit-app-inventor\/id1422709355\" target=\"_blank\" rel=\"noreferrer noopener\">Apple App Store<\/a>) and start it. (<a href=\"http:\/\/appinventor.mit.edu\/explore\/ai2\/setup\" target=\"_blank\" rel=\"noreferrer noopener\">explore these alternative options<\/a> to run the App)<\/li><li>In App Inventor, select <em>Connect, AI Companion<\/em> from the menu. Then on your phone, click &#8220;scan QR code&#8221; and scan the code on your screen. The App should then launch on your phone (screen 1 below).<\/li><\/ol>\n\n\n\n<p>You will have to do the last step again if you resume the App at a later time (eg. if you do something else for a while).<\/p>\n\n\n\n<p>The first time you launch the App, you might have to enable Bluetooth and give the App Location permissions. In the App, select the line with &#8220;Ble-Nano&#8221; to make a Bluetooth connection with the Arduino. This should switch the App to its mode in which you can change the color of the LED (screen 2 below).<\/p>\n\n\n\n<p>If you drag one of the sliders, the LED should change color, and you should get the HEX value of the color back in the text box at the bottom of the App (screen 3):<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"1024\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-485x1024.jpg\" alt=\"\" data-id=\"3971\" data-full-url=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12.jpg\" data-link=\"https:\/\/home.et.utwente.nl\/slootenvanf\/?attachment_id=3971\" class=\"wp-image-3971\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-485x1024.jpg 485w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-142x300.jpg 142w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-768x1621.jpg 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-47x100.jpg 47w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-728x1536.jpg 728w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12-970x2048.jpg 970w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.03.12.jpg 1080w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/a><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"1024\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-485x1024.jpg\" alt=\"\" data-id=\"3972\" data-full-url=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59.jpg\" data-link=\"https:\/\/home.et.utwente.nl\/slootenvanf\/?attachment_id=3972\" class=\"wp-image-3972\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-485x1024.jpg 485w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-142x300.jpg 142w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-768x1621.jpg 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-47x100.jpg 47w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-728x1536.jpg 728w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59-970x2048.jpg 970w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.05.59.jpg 1080w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/a><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"1024\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-485x1024.jpg\" alt=\"\" data-id=\"3973\" data-full-url=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15.jpg\" data-link=\"https:\/\/home.et.utwente.nl\/slootenvanf\/?attachment_id=3973\" class=\"wp-image-3973\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-485x1024.jpg 485w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-142x300.jpg 142w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-768x1621.jpg 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-47x100.jpg 47w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-728x1536.jpg 728w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15-970x2048.jpg 970w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/2021-02-24-12.06.15.jpg 1080w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Working of the App<\/h2>\n\n\n\n<p>Some explanation of how the App was created.<\/p>\n\n\n\n<p>In App Inventor, there are basically two working area&#8217;s: <a href=\"http:\/\/appinventor.mit.edu\/explore\/designer-blocks\" target=\"_blank\" rel=\"noreferrer noopener\">the userinterface Designer and the Blocks Editor.<\/a> You can switch between them using the buttons Designer and Blocks at the top right:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-1024x620.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"620\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-1024x620.png\" alt=\"\" class=\"wp-image-3963\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-1024x620.png 1024w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-300x182.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-768x465.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1-100x61.png 100w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/app_inventor1.png 1276w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The userinterface consists of all elements that are needed to interact with the user. You can add elements from the Palette at the left side and change properties of the selected elements at the right side. Elements can be organized in Horizontal and Vertical Arrangements (sort of containers) to accommodate a layout. You can find these in the Palette, under &#8220;Layout&#8221;. These Arrangements can also be shown and hidden when needed. For instance, after a connection is established, we can hide the parts that are used to make a connection, by setting the parameter Visible of the ConnectionControl Arrangement to false. And at the same time, we can show the part that allows to control the color, by making the ColorControl Arrangement visible. This is shown in the last 2 lines of this block (switch to the Blocks Editor to see this yourself):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"469\" height=\"131\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image.png\" alt=\"\" class=\"wp-image-3981\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image.png 469w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-300x84.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-100x28.png 100w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/a><\/figure>\n\n\n\n<p>If you want to create an App that uses Bluetooth, you must incorporate the <a href=\"http:\/\/iot.appinventor.mit.edu\/#\/bluetoothle\/bluetoothleintro\" target=\"_blank\" rel=\"noreferrer noopener\">Bluetooth LE extension<\/a>. How to do that, <a href=\"http:\/\/iot.appinventor.mit.edu\/assets\/tutorials\/MIT_App_Inventor_Basic_Connection.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">is explained here<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">How the changed color values are sent via Bluetooth<\/h4>\n\n\n\n<p>The color can be changed by dragging the 3 sliders. Each time a slider is dragged its &#8216;PositionChanged&#8217; eventhandler is called:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"126\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-1.png\" alt=\"\" class=\"wp-image-3989\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-1.png 501w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-1-300x75.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-1-100x25.png 100w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/figure>\n\n\n\n<p>As you can see, this makes a call to the procedure <em>sendColorValue<\/em>. Which looks like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"438\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-2.png\" alt=\"\" class=\"wp-image-3990\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-2.png 797w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-2-300x165.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-2-768x422.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-2-100x55.png 100w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/a><\/figure>\n\n\n\n<p>This procedure first shows the new color as the <em>BackgroundColor <\/em>of the <em>colorButton<\/em>. So the user can see the resulting color in the userinterface. Then it constructs a String <em>colorMessage<\/em>, which will contain the full RGB values separated by comma&#8217;s and ending in a newline character &#8216;\\n&#8217;. This string is sent to the Bluetooth Serial channel with the next call to the method <em>WriteStringsWithResponse <\/em>of the <em>BluetoothLE1 <\/em>object.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">How this App receives values coming from the Arduino<\/h4>\n\n\n\n<p>When texts (Strings) might arrive through the Bluetooth connection at arbitrary intervals, after the connection is established, we must tell the Bluetooth service to register for strings (in purple below):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"253\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-5.png\" alt=\"\" class=\"wp-image-4002\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-5.png 642w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-5-300x118.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-5-100x39.png 100w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/a><\/figure>\n\n\n\n<p>This will make sure the <em>StringsReceived<\/em> callback will be called each time a String arrives:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"206\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-4.png\" alt=\"\" class=\"wp-image-4001\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-4.png 693w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-4-300x89.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-4-100x30.png 100w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/a><\/figure>\n\n\n\n<p>In this block we actually process what is arriving. In this example, we strip the brackets (using the replace all text functions) and show the String in the TextReceive textarea in the userinterface. (We do not actually do much with it, we just show it)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Part 2:<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Build your own App: receiving sensor data in an App<\/h2>\n\n\n\n<p>Example of how to receive sensor data from a DHT11 temperature sensor in an App and act on it.<\/p>\n\n\n\n<p>In the example above, the Arduino sends the color value back to the App in hexadecimal format and the App displays this in the textbox at the bottom. This is just to demonstrate there is two-way communication. But of course, we can do more useful things, for instance get sensor data from the Arduino and do something with that in the App.<\/p>\n\n\n\n<p>For this we will add a temperature sensor to the circuit:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29-1024x592.png\" alt=\"\" class=\"wp-image-4041\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29-1024x592.png 1024w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29-300x173.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29-768x444.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29-100x58.png 100w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29-1536x887.png 1536w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-29.png 1549w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Build that <a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/2019\/05\/02\/dht11-sensor-with-display\/\" target=\"_blank\" rel=\"noreferrer noopener\">from this tutorial<\/a> (just the first part, until &#8220;Test the sensor&#8221;). Test the sensor using the sketch provided there.<\/p>\n\n\n\n<p>To be able to properly read the values from the lines printed in the sketch, we must adjust the sketch a bit. At the lines indicated below,  remove line which prints the unit to make it easier to read the values later. And insert the extra delay for better timing of the Bluetooth communication:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"241\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-3.png\" alt=\"\" class=\"wp-image-4055\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-3.png 570w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-3-300x127.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-3-100x42.png 100w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/a><\/figure>\n\n\n\n<p>Upload the sketch and check if it shows proper values without the units in the Serial Monitor:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"334\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-4.png\" alt=\"\" class=\"wp-image-4058\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-4.png 865w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-4-300x116.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-4-768x297.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-4-100x39.png 100w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/a><\/figure>\n\n\n\n<p>Now close the Serial Monitor.<\/p>\n\n\n\n<p>Now we will build the App step-by-step based on a template which already has all necessary Bluetooth functionality. <a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/div\/arduino\/DHT11_receive_bt_template.aia\" target=\"_blank\" rel=\"noreferrer noopener\">Download this template <code>DHT11_receive_bt_template.aia<\/code><\/a> and open it in App Inventor. This template incorporates the <a href=\"https:\/\/mit-cml.github.io\/extensions\/\" target=\"_blank\" rel=\"noreferrer noopener\">BluetoothLE extension<\/a> and some basic userinterface elements to manage connections to Bluetooth devices. <a href=\"http:\/\/ai2.appinventor.mit.edu\/reference\/other\/extensions.html\" target=\"_blank\" rel=\"noreferrer noopener\">More info on extensions.<\/a><\/p>\n\n\n\n<p>The remaining part of this tutorial explains building the userinterface and coding the blocks in detail. <span style=\"color:#bd0a0a\" class=\"has-inline-color\">Are you in a hurry? Or not interested in learning to build the App? The complete App can be downloaded <a href=\"#download\"><strong>at the bottom of this page<\/strong><\/a>.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Add userinterface elements:<\/h4>\n\n\n\n<p>Above <em>LabelStatus<\/em> (shown in green below) add a HorizontalArrangement (you can find that in the Palette under &#8220;Layout&#8221;). In that, add two labels. The first one gets &#8220;Temperature:&#8221; as Text (set that at the Properties). The second one can get &#8220;XXX&#8221; or you can leave it empty. Name this second one LblTemperature, as we will need this later to show the temperature value. Your userinterface will look similar to:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"339\" height=\"208\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-6.png\" alt=\"\" class=\"wp-image-4004\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-6.png 339w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-6-300x184.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-6-100x61.png 100w\" sizes=\"auto, (max-width: 339px) 100vw, 339px\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Program the Blocks:<\/h4>\n\n\n\n<p>The template already has an empty <em>StringsReceived <\/em>callback:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"381\" height=\"98\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-7.png\" alt=\"\" class=\"wp-image-4006\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-7.png 381w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-7-300x77.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-7-100x26.png 100w\" sizes=\"auto, (max-width: 381px) 100vw, 381px\" \/><\/a><\/figure>\n\n\n\n<p>First, filter the incoming stringValues, to remove brackets and unnecessary spaces (trim):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"238\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-5.png\" alt=\"\" class=\"wp-image-4071\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-5.png 799w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-5-300x89.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-5-768x229.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-5-100x30.png 100w\" sizes=\"auto, (max-width: 799px) 100vw, 799px\" \/><\/a><\/figure>\n\n\n\n<p>Next, we can add the block to process the received values (in variable line) from the sensor. Lines with received values look like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Temperature: XX.XX<\/code><\/pre>\n\n\n\n<p>You can observe the following from this: the temperature value is preceded by &#8220;Temperature:&#8221;. We can use this to recognize the proper value. The words are separated by spaces. We could split the line into words by using the split-at-spaces method of Texts:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"609\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-11.png\" alt=\"\" class=\"wp-image-4012\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-11.png 474w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-11-233x300.png 233w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-11-78x100.png 78w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/figure>\n\n\n\n<p>Drag the split-at-spaces method into the editor (you do not have to attach it yet):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"237\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-6.png\" alt=\"\" class=\"wp-image-4073\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-6.png 795w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-6-300x89.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-6-768x229.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-6-100x30.png 100w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/a><\/figure>\n\n\n\n<p>What do we need to split? The line of text that arrives (variable <em>line<\/em>) of the callback. Click <em>Variables <\/em>and select the get-method:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-10.png\" alt=\"\" class=\"wp-image-4011\" width=\"484\" height=\"338\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-10.png 484w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-10-300x210.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-10-100x70.png 100w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/a><\/figure>\n\n\n\n<p>And drag that into the editor, attach it to the split-at-spaces block:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"243\" height=\"37\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-7.png\" alt=\"\" class=\"wp-image-4074\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-7.png 243w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-7-100x15.png 100w\" sizes=\"auto, (max-width: 243px) 100vw, 243px\" \/><\/a><\/figure>\n\n\n\n<p>The split-at-spaces block returns a list variable. We must add a local variable for that. Drag the block initialize-local-name-to into the code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-13.png\" alt=\"\" class=\"wp-image-4014\" width=\"508\" height=\"337\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-13.png 508w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-13-300x199.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-13-100x66.png 100w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"805\" height=\"280\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-8.png\" alt=\"\" class=\"wp-image-4075\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-8.png 805w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-8-300x104.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-8-768x267.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-8-100x35.png 100w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/a><\/figure>\n\n\n\n<p>Now drag the split-at-spaces part and attach it to that block:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"280\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-9.png\" alt=\"\" class=\"wp-image-4076\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-9.png 803w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-9-300x105.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-9-768x268.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-9-100x35.png 100w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><\/a><\/figure>\n\n\n\n<p>Next, give the list a proper name: we choose <em>words<\/em> for this, and select the variable <em>line <\/em>for the get-block:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"283\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-10.png\" alt=\"\" class=\"wp-image-4077\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-10.png 803w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-10-300x106.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-10-768x271.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-10-100x35.png 100w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Checking for temperature values<\/h4>\n\n\n\n<p>Next, we need to check whether an incoming line contains the word &#8220;Temperature:&#8221; because only then we need to get the value and show it in the userinterface. Therefore we need an if statement, which looks like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"361\" height=\"106\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-11.png\" alt=\"\" class=\"wp-image-4078\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-11.png 361w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-11-300x88.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-11-100x29.png 100w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/a><\/figure>\n\n\n\n<p>You should be able to add this to the code by yourself now. Look at the colors of the blocks, they correspond with the colors in the Blocks menu, eg. the if-block is light-brown, you can find it in the <em>Control <\/em>section:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" width=\"155\" height=\"95\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-18.png\" alt=\"\" class=\"wp-image-4025\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-18.png 155w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-18-100x61.png 100w\" sizes=\"auto, (max-width: 155px) 100vw, 155px\" \/><\/a><\/figure>\n\n\n\n<p>Add the if-statement to the code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"810\" height=\"342\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-12.png\" alt=\"\" class=\"wp-image-4079\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-12.png 810w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-12-300x127.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-12-768x324.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-12-100x42.png 100w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/a><\/figure>\n\n\n\n<p>If the line contains the word &#8220;Temperature:&#8221;, we must get the value from the list of words, it is the second word (index 2 of the list):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"592\" height=\"164\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-14.png\" alt=\"\" class=\"wp-image-4081\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-14.png 592w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-14-300x83.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-14-100x28.png 100w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/a><\/figure>\n\n\n\n<p>Resulting in:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"408\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-13.png\" alt=\"\" class=\"wp-image-4080\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-13.png 797w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-13-300x154.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-13-768x393.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-13-100x51.png 100w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/a><\/figure>\n\n\n\n<p>Then we can add the last blocks, to actually show the retrieved temperature in the label:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-22.png\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"32\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-22.png\" alt=\"\" class=\"wp-image-4029\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-22.png 456w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-22-300x21.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-22-100x7.png 100w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/a><\/figure>\n\n\n\n<p>And this has to go inside the last added piece of code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"798\" height=\"411\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-15.png\" alt=\"\" class=\"wp-image-4082\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-15.png 798w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-15-300x155.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-15-768x396.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-15-100x52.png 100w\" sizes=\"auto, (max-width: 798px) 100vw, 798px\" \/><\/a><\/figure>\n\n\n\n<p>Now you can test if this works (rerun the app by starting the companion App on your phone and select <em>Connect &gt; AI Companion<\/em> in App Inventor).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Finalizing: do the same for humidity<\/h4>\n\n\n\n<p>Finally, you must repeat the whole procedure for the humidity value also. Start with adding userinterface elements for that, then program the blocks.<\/p>\n\n\n\n<p>For the humidity part, you can extend the if-block with an <strong>else-if<\/strong> section,  to add the check for humidity:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" width=\"798\" height=\"417\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-18.png\" alt=\"\" class=\"wp-image-4085\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-18.png 798w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-18-300x157.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-18-768x401.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-18-100x52.png 100w\" sizes=\"auto, (max-width: 798px) 100vw, 798px\" \/><\/a><\/figure>\n\n\n\n<p>The extended if-block looks like this: (content of the if has been removed for clarity)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"179\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-17.png\" alt=\"\" class=\"wp-image-4084\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-17.png 365w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-17-300x147.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-17-100x49.png 100w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/a><\/figure>\n\n\n\n<p>And the complete code now should look like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-19.png\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"564\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-19.png\" alt=\"\" class=\"wp-image-4088\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-19.png 801w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-19-300x211.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-19-768x541.png 768w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/03\/image-19-100x70.png 100w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/a><\/figure>\n\n\n\n<p>Tip: you can copy blocks by selecting them, and then press Ctrl+C. This saves a lot of work. In this case, you can select the purple contains-text block and copy it to the else-if part. Then you only have to change the text behind &#8220;piece&#8221; to &#8220;Humidity:&#8221;.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Add a temperature warning:<\/h4>\n\n\n\n<p>Because we now get the actual values of temperature and humidity in the App, we can also do things with that. Eg. give a warning when the temperature becomes to high:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-26.png\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"132\" src=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-26.png\" alt=\"\" class=\"wp-image-4035\" srcset=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-26.png 459w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-26-300x86.png 300w, https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/image-26-100x29.png 100w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/a><\/figure>\n\n\n\n<p>You should be able to figure out what this does and where to put this.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"download\">Complete example<\/h4>\n\n\n\n<p>If you had trouble programming this yourself, you can <a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/div\/arduino\/DHT11_receive_bt.aia\" target=\"_blank\" rel=\"noreferrer noopener\">download and review the complete example <code>DHT11_receive_bt.aia<\/code><\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p>Some common issues that might occur:<\/p>\n\n\n\n<p><strong>The Ble-Nano does not appear in the list in the App or a connection cannot be made.<\/strong><br>First, try stopping and starting scanning using the buttons in the App. Also, try disconnecting the USB-cable and connecting the Arduino (the Ble-Nano), to restart it. Quitting the App and then reconnecting via <em>Connect &gt; AI Companion<\/em> in App Inventor also is something you can try. Also make sure the Serial Monitor is not running (the Ble-Nano has its Bluetooth module wired to the Serial port of the Arduino, so if that is connected or communicating with something else, Bluetooth communication will not work). One last thing to try is to <a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/2020\/04\/10\/arduino-nano-ble\/\" target=\"_blank\" rel=\"noreferrer noopener\">reset the Ble-Nano to its default settings as explained here.<\/a><\/p>\n\n\n\n<p><strong>Difficulty finding\/connecting if there are multiple Ble-Nano&#8217;s nearby.<\/strong><br>If doing this in the same room with a lot of people having the same Ble-Nano, it might be hard to connect to the right one. You can give your Ble-Nano a unique name to make finding and connecting to it easier. You do this by sending it AT-command to change its name, for example:<\/p>\n\n\n\n<p><code>AT+NAME=New-Name<\/code><\/p>\n\n\n\n<p><a href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/2020\/04\/10\/arduino-nano-ble\/\" target=\"_blank\" rel=\"noreferrer noopener\">More details on how to send AT-commands can be found here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial describes how to build an electronic circuit with an RGB LED (a LED that can change color), and change its color using an App. It also demonstrates two-way communication over Bluetooth LE between an App built with App Inventor and the BLE-Nano board. The BLE-Nano board is basically an Arduino Nano with an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3978,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[3],"tags":[108,246,94,497,112,498,109,199,198,197],"class_list":["post-3950","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-education","tag-app","tag-appdev","tag-arduino","tag-ble-nano","tag-bluetooth","tag-bluetoothle","tag-inventor","tag-led","tag-rgb","tag-rgb-led"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Bluetooth communication between an App built with App Inventor and the BLE-Nano board<\/title>\n<meta name=\"description\" content=\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\" \/>\n<meta property=\"og:description\" content=\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\" \/>\n<meta property=\"og:url\" content=\"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/\" \/>\n<meta property=\"og:site_name\" content=\"vanslooten.com\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-24T11:46:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-01T10:52:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit_sm.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"604\" \/>\n\t<meta property=\"og:image:height\" content=\"270\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fjodor van Slooten\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fjodorvs\" \/>\n<meta name=\"twitter:site\" content=\"@fjodorvs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fjodor van Slooten\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/\"},\"author\":{\"name\":\"Fjodor van Slooten\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/#\\\/schema\\\/person\\\/e62ff2d6beaa937dc9345a023eeb05dd\"},\"headline\":\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\",\"datePublished\":\"2021-02-24T11:46:59+00:00\",\"dateModified\":\"2021-12-01T10:52:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/\"},\"wordCount\":2279,\"publisher\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/#\\\/schema\\\/person\\\/e62ff2d6beaa937dc9345a023eeb05dd\"},\"image\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/ble-nano_rgb_circuit_sm.jpg\",\"keywords\":[\"app\",\"appdev\",\"arduino\",\"ble-nano\",\"bluetooth\",\"bluetoothle\",\"inventor\",\"led\",\"rgb\",\"rgb-led\"],\"articleSection\":[\"Education\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/\",\"url\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/\",\"name\":\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/ble-nano_rgb_circuit_sm.jpg\",\"datePublished\":\"2021-02-24T11:46:59+00:00\",\"dateModified\":\"2021-12-01T10:52:10+00:00\",\"description\":\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#primaryimage\",\"url\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/ble-nano_rgb_circuit_sm.jpg\",\"contentUrl\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/ble-nano_rgb_circuit_sm.jpg\",\"width\":604,\"height\":270,\"caption\":\"BLE-Nano with RGB LED\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/2021\\\/02\\\/24\\\/bluetooth-comm-app-inventor-ble-nano\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bluetooth communication between an App built with App Inventor and the BLE-Nano board\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/#website\",\"url\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/\",\"name\":\"vanslooten.com\",\"description\":\"Personal website of Fjodor van Slooten\",\"publisher\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/#\\\/schema\\\/person\\\/e62ff2d6beaa937dc9345a023eeb05dd\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/#\\\/schema\\\/person\\\/e62ff2d6beaa937dc9345a023eeb05dd\",\"name\":\"Fjodor van Slooten\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/2018-08-24-13.33.38_small.jpg\",\"url\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/2018-08-24-13.33.38_small.jpg\",\"contentUrl\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/2018-08-24-13.33.38_small.jpg\",\"width\":300,\"height\":214,\"caption\":\"Fjodor van Slooten\"},\"logo\":{\"@id\":\"https:\\\/\\\/home.et.utwente.nl\\\/slootenvanf\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/2018-08-24-13.33.38_small.jpg\"},\"sameAs\":[\"http:\\\/\\\/vanslooten.com\",\"https:\\\/\\\/x.com\\\/fjodorvs\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","description":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","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:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/","og_locale":"en_US","og_type":"article","og_title":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","og_description":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","og_url":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/","og_site_name":"vanslooten.com","article_published_time":"2021-02-24T11:46:59+00:00","article_modified_time":"2021-12-01T10:52:10+00:00","og_image":[{"width":604,"height":270,"url":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit_sm.jpg","type":"image\/jpeg"}],"author":"Fjodor van Slooten","twitter_card":"summary_large_image","twitter_creator":"@fjodorvs","twitter_site":"@fjodorvs","twitter_misc":{"Written by":"Fjodor van Slooten","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#article","isPartOf":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/"},"author":{"name":"Fjodor van Slooten","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/#\/schema\/person\/e62ff2d6beaa937dc9345a023eeb05dd"},"headline":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","datePublished":"2021-02-24T11:46:59+00:00","dateModified":"2021-12-01T10:52:10+00:00","mainEntityOfPage":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/"},"wordCount":2279,"publisher":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/#\/schema\/person\/e62ff2d6beaa937dc9345a023eeb05dd"},"image":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#primaryimage"},"thumbnailUrl":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit_sm.jpg","keywords":["app","appdev","arduino","ble-nano","bluetooth","bluetoothle","inventor","led","rgb","rgb-led"],"articleSection":["Education"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/","url":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/","name":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","isPartOf":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/#website"},"primaryImageOfPage":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#primaryimage"},"image":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#primaryimage"},"thumbnailUrl":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit_sm.jpg","datePublished":"2021-02-24T11:46:59+00:00","dateModified":"2021-12-01T10:52:10+00:00","description":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board","breadcrumb":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#primaryimage","url":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit_sm.jpg","contentUrl":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2021\/02\/ble-nano_rgb_circuit_sm.jpg","width":604,"height":270,"caption":"BLE-Nano with RGB LED"},{"@type":"BreadcrumbList","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/2021\/02\/24\/bluetooth-comm-app-inventor-ble-nano\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/home.et.utwente.nl\/slootenvanf\/"},{"@type":"ListItem","position":2,"name":"Bluetooth communication between an App built with App Inventor and the BLE-Nano board"}]},{"@type":"WebSite","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/#website","url":"https:\/\/home.et.utwente.nl\/slootenvanf\/","name":"vanslooten.com","description":"Personal website of Fjodor van Slooten","publisher":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/#\/schema\/person\/e62ff2d6beaa937dc9345a023eeb05dd"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/home.et.utwente.nl\/slootenvanf\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/#\/schema\/person\/e62ff2d6beaa937dc9345a023eeb05dd","name":"Fjodor van Slooten","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/06\/2018-08-24-13.33.38_small.jpg","url":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/06\/2018-08-24-13.33.38_small.jpg","contentUrl":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/06\/2018-08-24-13.33.38_small.jpg","width":300,"height":214,"caption":"Fjodor van Slooten"},"logo":{"@id":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-content\/uploads\/2019\/06\/2018-08-24-13.33.38_small.jpg"},"sameAs":["http:\/\/vanslooten.com","https:\/\/x.com\/fjodorvs"]}]}},"_links":{"self":[{"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/posts\/3950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/comments?post=3950"}],"version-history":[{"count":67,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/posts\/3950\/revisions"}],"predecessor-version":[{"id":4131,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/posts\/3950\/revisions\/4131"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/media\/3978"}],"wp:attachment":[{"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/media?parent=3950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/categories?post=3950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/home.et.utwente.nl\/slootenvanf\/wp-json\/wp\/v2\/tags?post=3950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}