Android App Arduino Receive Bluetooth Data HC06 Float
Maybe your like
In this case I've used Serial.print because the data type of the read value is a float which in this case has 32 bits not only 8(byte). So we can't use Serial.write(). I use float data type since I want to also send decimals of the value. Using int we would only send (1,2,3,4 and 5). After each data send I add a small delay in order to make sure I'll be syncronised with the App.
1.3 The App
Ok, go to this page and enter AppInventor with your google account. Here we have to create a new project. I'll give the name "Voltage_read" to my app. Click ok and we will open the main screen of the app as we can see below.
Now, the first thing to do is to create the parts of the connection. I'll add a new horizontal arangement and inside I'll add a new list picker. This will contain the lis of all of the bluetooth devices paired with the smartphone. We will see that later. Finally I give the list picker an image icon of a bluetooth symbol.
Ok, finally we add a new horizontal arrangement and inside we add 3 labels. The first will write Value, the third will write Volts and the middle one will be the received data. Finally we add the non visible components which are the clock and the Bluetooth client. As you remember in the pat tutorial we dodn't use a clock because to send data we don't need that. In this case, to receive we do. Set the timer interval to 100ms and let's jump to the code blocks.
1.3.2 The App code Blocks
Now we add the code blocks. First we add the blocks for the list picker. When selected we open the list of Bluetooth devices. After that we select the device we connect. In the bottom blocs each time the timer will loop, in this case 100ms, we first check if there is a bluetooth connection. If yes, we check if there is data comming thoards the smartphone. If yes then we set the text of the middle label to the received data. That's it. Now click build and save the app. Copy it to your smartphone and install. Make sure to enable unknown origin app in your smartphone settings.
To pair to the bluetooth modue go to bluetooth settings and pair. Use 1234 or 0000 password and connect. Then open the app, select the bluetooth icon and connect to HC06. Done, now we receive data as you can see below.
Tag » Arduino Bluetooth Hc-06 App Inventor
-
Bluetooth HC-06. Arduino. Send. Receive. Send Text File. Multitouch ...
-
Bluetooth HC-06. Arduino. Send. Receive. Send Text File. Multitouch ...
-
How To Control Arduino From App Inventor Via Bluetooth (Module HC ...
-
HC-05 Bluetooth Module With Arduino-MIT App Inventor - YouTube
-
Easiest Bluetooth Car Using Arduino And MIT App Inventor
-
MIT Android App Using The Bluetooth HC06 To Connect To An ...
-
MIT App Inventor 2 + HC006 + Arduino!!! | By J3 | KidsTronics | Medium
-
Lập Trình ứng Dụng điều Khiển Xe Qua Bluetooth Mà Không Cần Code
-
MIT APP Inventor Arduino Bluetooth Application Making Explained
-
Sending And Receiving Data With HC-05 - MIT App Inventor
-
Arduino Uno Rev 3 + MIT App Inventor + Bluetooth Module HC05 + ...
-
MIT AppInventor, HC06 And Arduino: Much Improved Method Of ...
-
[PDF] PROGRAMMATION D'UN ARDUINO UNO.
-
Application Android MIT En Utilisant Le Bluetooth HC06 Pour Vous ...