Bluetooth HC-06. Arduino. Send. Receive. Send Text File. Multitouch ... Home » Arduino Bluetooth Module Mit App Inventor » Bluetooth HC-06. Arduino. Send. Receive. Send Text File. Multitouch ... Maybe your like Arduino Bluetooth Module Zs-040 Arduino _bv(0) Arduino Byte Data Type Char Arduino Cd Rom Controller Arduino Ch340 Datasheet Loading Bluetooth HC-06. Arduino. Send. Receive. Send text file. Multitouch. Image Tutorials and Guides multitouch, graphs, sensor, servo, bluetooth Juan_Antonio May 22, 2020, 4:45pm 1 Hello friends, In this topic I am going to show some examples of Arduino UNO with the Bluetooth HC-06 module. I will start with simple examples and later I will put some more complicated codes. 12 Likes Communicate Distance Sensor with Application Send accelerometer Datas via Bluetooth Bluetooth and AppInventor Issues How to send Latitude and longitude data to arduino Uno Doubts IoT Healthy Plant + Arduino 101 Sending Packets from App to Arduino via Bluetooth I want to learn how to control hardware things Sending data from an arduino to an app via bluetooth Sending multiple data to arduino Send date and time to arduino Having trouble getting bluetooth to connect to a device MIT timer 1 year DHT 11 using Arduino millis function Bluetooth Not Receiving Data Correctly from Arduino Uno Sending Data to Arduino and Displaying to Serial Monitor Bluetooth: App not receiving data from Arduino HC-05 Enviar varios valores para o android Attiny85 microcontroller. Bluetooth HC-06. Arduino IDE HC 05 Bluetooth Module not connecting to MIT app defined in ROINCO arduino multipurpose kit [URGENT] Need loop for my bluetooth receiver app Arduino get not the whole number sending from App Inventor How to receive a number from arduino? App not sending numbers Argument problem in the app, after receiving data via bluetooth Reading values in serial monitor from ESP32 via bluetooth on smartphone Select list item: Attempt to get item number 2 of a list of length 1: The operation cannot accept the arguments: Activate a Void Function from MIT App Inventor through bluetooth Error 507, unable to connect Plot Sensor ADXL345 Juan_Antonio May 22, 2020, 4:45pm 2 1.- App sends simple char. Arduino on-off LED12 and LED13. p9A0i_bluetooth_caracter.aia (2.4 KB) bt_4900×363 228 KB bt_3787×391 29.8 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define Pin12 12 #define Pin13 13 char caracter; void setup() { Serial.begin(9600); pinMode(Pin12, OUTPUT); pinMode(Pin13, OUTPUT); } void loop() { if(Serial.available()) { caracter = Serial.read(); if(caracter == 'a'){ digitalWrite(Pin12, HIGH);} if(caracter == 'b'){ digitalWrite(Pin12, LOW);} if(caracter == 'c'){ digitalWrite(Pin13, HIGH);} if(caracter == 'd'){ digitalWrite(Pin13, LOW);} } } Instead of using LEDs you can put Relays. rele8cc1094×660 323 KB 5 Likes App Inventor --> Bluetooth --> Arduino... Sending inappropriate data? Bluetooth controlled LED Stripe Launch an application from AppInventor Character modified in Bluetooth Can i use two smartphones control one hc-05? Accept characters from arduino in the app Temperature and humidity on app inventor with dht11 Juan_Antonio May 22, 2020, 4:53pm 3 2A.- App sends text. Arduino on-off LED12 and LED13. Serial Monitor. With asterisk. p9A0i_bluetooth_texto.aia (2.6 KB) bt_7900×362 231 KB App sends text: on12*, off12*, on13*, off13*, I have used the astarisk to indicate end of message. We can also send a text, the astarisk will automatically be inserted at the end of the text. Check Serial Monitor. bt_10863×514 37.7 KB Arduino receives characters up to the asterisk. Example: off12* Delete the asterisk, last char: off12 Turn off the LED12 // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define Pin12 12 #define Pin13 13 char caracter; String palabra; void setup() { Serial.begin(9600); pinMode(Pin12, OUTPUT); pinMode(Pin13, OUTPUT); } void loop() { if(Serial.available()) { caracter = Serial.read(); palabra = palabra + caracter; if(caracter == '*') { palabra = palabra.substring(0, palabra.length() - 1); // Delete last char * Serial.println(palabra); if (palabra == "on12"){digitalWrite(Pin12, HIGH);} if (palabra == "off12"){digitalWrite(Pin12, LOW);} if (palabra == "on13"){digitalWrite(Pin13, HIGH);} if (palabra == "off13"){digitalWrite(Pin13, LOW);} palabra = ""; delay(100); } } } oooooooooooooooo0000000000000000ooooooooooooooooooo 2B.- App sends text. Arduino on-off LED12 and LED13. Serial Monitor. Without asterisk. p9A0i_bluetooth_texto_2.aia (2.6 KB) If we expect to receive known words ("on12", "off12",...), it is not necessary to use the asterisk as the end of message. Using palabra.indexOf(...), we can obtain if the received message contains the "known words". bluetooth_verifica2b963×466 41.4 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define Pin12 12 #define Pin13 13 char caracter; String palabra; void setup() { Serial.begin(9600); pinMode(Pin12, OUTPUT); pinMode(Pin13, OUTPUT); } void loop() { if(Serial.available()) { caracter = Serial.read(); palabra = palabra + caracter; Serial.println(palabra); if (palabra.indexOf("on12")>= 0){digitalWrite(Pin12, HIGH); palabra = "";} if (palabra.indexOf("off12")>= 0){digitalWrite(Pin12, LOW); palabra = "";} if (palabra.indexOf("on13")>= 0){digitalWrite(Pin13, HIGH); palabra = "";} if (palabra.indexOf("off13")>= 0){digitalWrite(Pin13, LOW); palabra = "";} delay(100); } } 6 Likes How to receive text via bluetoothle1 Unable to send text to esp32 by bluetoothclient Juan_Antonio May 22, 2020, 6:31pm 4 3.- App sends several information at the same time. In this example we will use the same App as in the previous example. Suppose we want to send two information at the same time, for example we want to turn on LED12 and turn off LED13. We write in the TextBox: on12, off13 [the asterisk will be added automatically at the end of this text] The Arduino code will check if the text sent contains the string: on12, off12, on13, off13 To check if a substring is in a text we use indexOf: if(palabra.indexOf("on12")>= 0) We can also put the text in another order: off13, on12 // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define Pin12 12 #define Pin13 13 char caracter; String palabra; void setup() { Serial.begin(9600); pinMode(Pin12, OUTPUT); pinMode(Pin13, OUTPUT); } void loop() { if(Serial.available()) { caracter = Serial.read(); palabra = palabra + caracter; if(caracter == '*') { palabra = palabra.substring(0, palabra.length() - 1); // Delete last char * Serial.println(palabra); if(palabra.indexOf("on12")>= 0){digitalWrite(Pin12, HIGH);} if(palabra.indexOf("off12")>= 0){digitalWrite(Pin12, LOW);} if(palabra.indexOf("on13")>= 0){digitalWrite(Pin13, HIGH);} if(palabra.indexOf("off13")>= 0){digitalWrite(Pin13, LOW);} palabra = ""; delay(100); } } } As we have seen in the previous section, if we send known words ("on12", "off12"...), it is not necessary to indicate the end of the message, in this case the asterisk. 3 Likes How to modify some variable from app Juan_Antonio May 22, 2020, 6:44pm 5 4.- App sends three values separated by comma. Arduino receives them and separates them. In this example we will use the same App as in the previous example. We assume that the App wants to send these numbers separated by commas to the Arduino: 126,3,58 An asterisk will be added indicating end of message. [126,3,58*] In this case it is necessary to indicate the end of the message (example with asterisk) since we can send any number. Arduino will receive that text and separate it by the comma. Check Serial Monitor. // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm char caracter; String palabra; String red; String green; String blue; int ind1; int ind2; int ind3; void setup() { Serial.begin(9600); } void loop() { if(Serial.available()) { caracter = Serial.read(); palabra = palabra + caracter; if(caracter == '*') { palabra = palabra.substring(0, palabra.length() - 1); // Delete last char * Serial.println(palabra); ind1 = palabra.indexOf(','); red = palabra.substring(0, ind1); ind2 = palabra.indexOf(',', ind1+1 ); green = palabra.substring(ind1+1, ind2); ind3 = palabra.indexOf(',', ind2+1 ); blue = palabra.substring(ind2+1); Serial.print("red = "); Serial.println(red); Serial.print("green = "); Serial.println(green); Serial.print("blue = "); Serial.println(blue); Serial.println(); palabra = ""; delay(10); } } } ooooooooooooooo000000o000000ooooooooooooooo Another way to split the data in with this getValue function: Serial.println(palabra); red = getValue(palabra,',',0); green = getValue(palabra,',',1); blue = getValue(palabra,',',2); (...) ///////////////// Function Split by char //////////////// String getValue(String data, char separator, int index) { int found = 0; int strIndex[] = {0, -1}; int maxIndex = data.length()-1; for(int i=0; i<=maxIndex && found<=index; i++){ if(data.charAt(i)==separator || i==maxIndex){ found++; strIndex[0] = strIndex[1]+1; strIndex[1] = (i == maxIndex) ? i+1 : i; } } return found>index ? data.substring(strIndex[0], strIndex[1]) : ""; } 2 Likes Read Data from Arduino via HC-05 Bluetooth Module What does this Error mean? (Bluetooth, Error 513) Juan_Antonio May 22, 2020, 8:01pm 6 5.- App requests temperature and humidity to the Arduino. The Arduino sends values. p9A0i_bluetooth_temperatura.aia (3.3 KB) bt_14900×406 177 KB bt_15785×800 59 KB When Click in tempe_humidity Button, App sends the character “D”. Arduino concatenates the temperature and humidity Strings separated by a comma: 37,80 App ReceiveText 37,80 converts it to a list and separates the values. Note: the DelimiterByte must have the value 10. [10 is ASCII New Line, LF. Arduino \n] In this Arduino code I do not use the sensor or the I2C LCD to simplify its content. Here you can see the code with the sensor and the I2C LCD // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm char caracter; int temperature = 0; int humidity = 0; String tempera_humidity; void setup() { Serial.begin(9600); } void loop() { temperature = random(20,40); humidity = random(50,95); delay(500); if(Serial.available()) { caracter = Serial.read(); if(caracter == 'T'){Serial.println(temperature);} if(caracter == 'H'){Serial.println(humidity);} if(caracter == 'D'){ tempera_humidity = (String) temperature + "," + (String) humidity; Serial.println(tempera_humidity); } } } 4 Likes TX/RX problem. App to Arduino Newbie : how to connect temperature sensor arduino circuit and read using mit app Show DHT11 data on app with blouetooth Send text from Arduino to mit app using esp8266 Wifi How to use buttons on esp32/arduino to control MIT app inventor aps via bluetooth? Bad arguments to> the operation cannot accept the arguments: [ 34.36 ],… How do I receive data from HC-06 Bluetooth module with an Arduino Uno? Show DHT11 data on app with blouetooth Juan_Antonio May 22, 2020, 9:17pm 7 6.- App checks status 2 PushButtons. p9A0i_bluetooth_pulsadores.aia (3.4 KB) bt_19900×347 231 KB bt_18749×832 62.3 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm char caracter; #define push7 7 // PushButton 7. #define push8 8 // PushButton 8. String status_push7; String status_push8; String status; void setup() { Serial.begin(9600); pinMode(push7, INPUT); pinMode(push8, INPUT); } void loop() { delay(50); if(Serial.available()) { caracter = Serial.read(); if (digitalRead(push7) == HIGH) {status_push7 = "Push7 ON";} else {status_push7 = "Push7 OFF";} if (digitalRead(push8) == HIGH) {status_push8 = "Push8 ON";} else {status_push8 = "Push8 OFF";} status = status_push7 + "," + status_push8; if(caracter == '7'){Serial.println(status_push7);} if(caracter == '8'){Serial.println(status_push8);} if(caracter == 'D'){Serial.println(status);} } } 2 Likes Select list item: Attempt to get item number 2 of a list of length 1 (BLE) Arduino Button check in a MIT APP Mensaje de error Juan_Antonio May 22, 2020, 10:30pm 8 7.- App gets the value of two potentiometers. p9A0i_bluetooth_potenciometro.aia (3.3 KB) bt_201200×476 195 KB bt_21818×632 48.2 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm int value_pot0; int value_pot1; String value; void setup() { Serial.begin(9600); } void loop() { value_pot0 = analogRead(A0); value_pot1 = analogRead(A1); value = (String) value_pot0 + "," + (String) value_pot1; Serial.println(value); delay(200); // It should be slower than the Clock Interval. } Values from 0 to 1023. 5 Likes Reciving several data from ESP32 over BT classic Reading values in serial monitor from ESP32 via bluetooth on smartphone Problem with Arduino (hc-05) and App Inventor Show DHT11 data on app with blouetooth Bluetooth Serial Receive Data Anomaly Error 503 the speciefic adress is not a valid bluetooth MAC adress [Extension] Dynamic graph. Shift left graph. Sinusoidal wave. Bluetooth Arduino Button check in a MIT APP Error 503 the speciefic adress is not a valid bluetooth MAC adress Juan_Antonio May 22, 2020, 11:42pm 9 8.- App receives data from Arduino. Clock.Interval. Arduino delay. Buffer. p9A0i_bluetooth_aleatorio.aia (2.9 KB) bt_23972×409 236 KB a) Clock.Interval = 300 Arduino delay = 200 App cannot process the information because the Clock "is slower" than the Arduino. The buffer is being filled, values that arrive and have not yet been processed. When the Buffer reaches a certain value, for example 120, you remove power to the Arduino. What happens with buffer? b) Change Clock.Interval Clock.Interval = 100 Arduino delay = 200 Now the Clock "is faster" than the Arduino. Buffer = 0 Therefore, Clock.Interval < delay Arduino bt_22818×580 44.2 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm int aleatorio; void setup() { Serial.begin(9600); } void loop() { aleatorio = random(0,100); Serial.println(aleatorio); delay(200); // Clock.Interval < delay Arduino } 4 Likes How can I receive bluetooth module hex text Cómo compruebo que los datos que recibe el app por Bluetooth estén en mi lista e imprimirlos Juan_Antonio May 23, 2020, 8:07am 10 9.- A potentiometer in Arduino sends values to the App. Dynamic graph. Shift left. Here similar example. p9A0i_bluetooth_dinamico.aia (8.1 KB) bt_241200×476 199 KB bt_251554×712 113 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm int value_pot0; void setup() { Serial.begin(9600); } void loop() { value_pot0 = analogRead(A0); Serial.println(value_pot0); delay(100); // It should be slower than the Clock Interval. } 3 Likes [Extension] Dynamic graph. Shift left graph. Sinusoidal wave. Bluetooth Serial OTG. Arduino CH340. FTDI. rkl099's Extension MIT app inventor help (making a graph) Juan_Antonio May 23, 2020, 9:12am 11 10.- Three LEDS on-off according to a sequence saved in a file. p9A0i_bluetooth_secuencia3LED.aia (5.0 KB) bt_261000×319 191 KB bt_27951×1252 98.4 KB In file rutina2.csv this content: Levels of: LED11 - LED12 - LED13 - Time in seconds of this combination. App sends 1-1-0-2* Arduino set LEDs on, on, off and wait 2 seconds. then Arduino sends to App “send_me_next” When App receives “send_me_next” App “send_next” combination: 1-0-0-2* // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm char caracter; String palabra; int LED11 = 11; int LED12 = 12; int LED13 = 13; int valor11; int valor12; int valor13; int Tiempo = 1000000; unsigned long currentMillis; unsigned long previousMillis = currentMillis; int k1; int k2; int k3; int k4; void setup() { Serial.begin(9600); pinMode(LED11, OUTPUT); pinMode(LED12, OUTPUT); pinMode(LED13, OUTPUT); } void loop() { if(Serial.available()) { caracter = Serial.read(); palabra = palabra + caracter; Serial.println(palabra); if(caracter == '*') { palabra = palabra.substring(0, palabra.length() - 1); // Delete last char * k1 = palabra.indexOf('-'); valor11 = palabra.substring(0, k1).toInt(); k2 = palabra.indexOf('-', k1+1); valor12 = palabra.substring(k1+1, k2).toInt(); k3 = palabra.indexOf('-', k2+1); valor13 = palabra.substring(k2+1, k3).toInt(); k4 = palabra.indexOf('-', k3+1); Tiempo = 1000 * palabra.substring(k3+1, k4).toInt(); palabra = ""; digitalWrite(LED11, valor11); digitalWrite(LED12, valor12); digitalWrite(LED13, valor13); } previousMillis = currentMillis; } // =>Fin del available tiempo(); } // =>Fin del loop void tiempo() { currentMillis = millis(); if (currentMillis >= (previousMillis + Tiempo)) { previousMillis = currentMillis; Serial.println("send_me_next"); // Envíame el siguiente. } } 3 Likes Reading from a file and sent data to Arduino Juan_Antonio May 23, 2020, 12:18pm 12 11.- Virtual Screen with two VerticalArrangement. p9A0i_bluetooth_virtual.aia (4.1 KB) In this example I have used Send1ByteNumber, I have arbitrarily chosen the numbers 153,168,221. Arduino returns a byte 48 or 49. bt_301208×760 88.2 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define LED13 13 byte StatusLED13; void setup() { Serial.begin(9600); pinMode(LED13, OUTPUT); } void loop() { if(Serial.available()) { int dato = Serial.read(); if(dato == 153){digitalWrite(LED13, HIGH);} if(dato == 168){digitalWrite(LED13, LOW);} if(dato == 221){ StatusLED13 = digitalRead(LED13); Serial.print(StatusLED13); // Sends 48 or 49 } } } 5 Likes My Bluetooth App Can't send data from screen1 to screen2 Problem graphing data from Arduino Bluetooth to Screen 2 Bluetooth Connection in other screens Bluetooth en dos screen How to make the LED automatically turn off with a countdown ERROR 515 Bluetooth not conected How can I relate bluetooth connection between two screen? Error 515 No Device Connected Bluetooth Juan_Antonio May 23, 2020, 5:02pm 13 12.- App moves two Servos by Sliders. p9A0i_bluetooth_servos.aia (3.2 KB) bt_31900×523 285 KB bt_32913×594 45.1 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #include <Servo.h> Servo servo3; Servo servo5; const int pwmPin3 = 3; // Servo3 pin3 PWM const int pwmPin5 = 5; // Servo5 pin5 PWM char caracter; String palabra; String angulo_1; String angulo_2; int k1; void setup() { Serial.begin(9600); pinMode (pwmPin3, OUTPUT); pinMode (pwmPin5, OUTPUT); servo3.attach(pwmPin3); servo5.attach(pwmPin5); } void loop() { if(Serial.available()) { caracter = Serial.read(); palabra = palabra + caracter; if (caracter == '*') { Serial.println(palabra); palabra = palabra.substring(0, palabra.length() - 1); // Delete last char * k1 = palabra.indexOf(','); angulo_1 = palabra.substring(0, k1); angulo_2 = palabra.substring(k1+1, -1); servo3.write(angulo_1.toInt()); servo5.write(angulo_2.toInt()); palabra = ""; } } } // => Fin Loop Note: if you use more than 2 servos you will need to power them with an external power source. Video: Each servo needs about 400 mA. 6 Likes Bluetooth HC-05, Arduino servo control_motor is rotating uncontrollably How to send the value of 2 Sliders by Bluetooth to Arduino? Alerting about fire from arduino to phone app Help me with a piece of code i can't grasp Juan_Antonio May 23, 2020, 6:15pm 14 13.- App moves a Stepper motor. p9A0i_bluetooth_pasopaso.aia (3.1 KB) In a servo you order: set 34º set 12º set 96º, it is not necessary to know the previous position. In a stepper motor, you order: set 20 step clockwise set 80 step anticlockwise, it is necessary to know the previous position to place it in a new position. I will use: Stepper motor 28BYJ-48 ULN2003 It is convenient to power this motor through an external source, in this experimental example I will feed it with the 5 V of Arduino. bt_331000×610 370 KB bt_34869×1010 70.4 KB This code needs Stepper library. // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #include <Stepper.h> #define STEPS 64 // Secuencia 1-3-2-4 Stepper motor(STEPS, 8, 10, 9, 11); char caracter; void setup() { Serial.begin(9600); motor.setSpeed(200); } void loop() { if( Serial.available() ) { caracter = Serial.read(); Serial.print(caracter); if(caracter == '1'){motor.step(60);} if(caracter == '2'){motor.step(-60);} if(caracter == '3'){motor.step(510);} if(caracter == '4'){motor.step(-510);} if(caracter == '5'){motor.step(1020);} if(caracter == '6'){motor.step(-1020);} if(caracter == '7'){motor.step(2040);} if(caracter == '8'){motor.step(-2040);} if(caracter == 'A'){motor.step(100);} if(caracter == 'B'){motor.step(-100);} } } 1 Like Display Stepper Motor Position in Real Time Juan_Antonio May 24, 2020, 10:33am 15 14. Where do we connect the Bluetooth module in Arduino UNO? p9A0i_bluetooth_Serial.aia (2.9 KB) bt_351000×246 229 KB Terminals 0 (RX) and 1 (TX) are used by Arduino as the default Serial RX/TX. Use it to upload sketch, Serial Monitor, Bluetooth. So when we are going to upload a sketch for Bluetooth we must disconnect the RX cable from the Arduino. We can use other terminals to connect the Bluetooth module, for example 10 and 11, in this case we need the “SoftwareSerial” library. Now when we upload a sketch it is not necessary to remove the RX cable. bt_36885×610 53 KB - CODE FOR MODULE IN default RX/TX pin 0 and 1 of Arduino. // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define Pin13 13 char caracter; void setup() { Serial.begin(9600); pinMode(Pin13, OUTPUT); } void loop() { if(Serial.available()) { caracter = Serial.read(); if(caracter == 'a'){ digitalWrite(Pin13, HIGH);} if(caracter == 'b'){ digitalWrite(Pin13, LOW);} Serial.println(caracter); } } - CODE FOR MODULE IN pin10 and pin11 with SoftwareSerial library. // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #include <SoftwareSerial.h> SoftwareSerial I2CBT(10,11); // El TX del módulo BT va al pin10 del Arduino // El RX del módulo BT va al pin11 del Arduino #define Pin13 13 char caracter; void setup() { I2CBT.begin(9600); // To read and write Bluetooth Serial.begin(9600); // To print in Serial Monitor pinMode(Pin13, OUTPUT); } void loop() { if(I2CBT.available()) { caracter = I2CBT.read(); if(caracter == 'a'){ digitalWrite(Pin13, HIGH);} if(caracter == 'b'){ digitalWrite(Pin13, LOW);} Serial.println(caracter); // Serial Monitor I2CBT.println(caracter); // return Bluetooth // I2CBT.write(caracter); // return Bluetooth } } 2 Likes Receive midi data over bluetooth Basic BT connection to Uno+HC05 & Smartphone Arduino Nano HC-06 values not showing Juan_Antonio May 24, 2020, 11:47am 16 15.- Send text file from Server to Client and from Client to Server. Message Mobile to Mobile by Bluetooth. p9A0i_BT_Server_File.aia (3.3 KB) p9A0i_BT_Client_File.aia (3.4 KB) bt_391210×720 134 KB - Blocks Server. bt_40993×855 64.8 KB - Blocks Client. bt_41966×1000 76.8 KB 2 Likes Save a TXT file transfer from Arduino using Bluetooth Bluetooth text message limit? Error 515 not connected to a Bluetooth device App Inventor BLE Archivo.txt Two mobiles. Bluetooth Server - Client. Study File transfer process File transfer process Juan_Antonio May 26, 2020, 5:32pm 17 16.- Send Image file from Server to Client and from Client to Server. This example is only experimental, there are problems with file size, clock interval, conversion … Try. p9A0i_BT_Server_Image.aia (41.9 KB) p9A0i_BT_Client_Image.aia (55.6 KB) bt_421000×658 208 KB - Blocks Server. bt_40_server1027×1137 83.5 KB - Blocks Client. bt_40_client1008×1163 88.5 KB 1 Like Juan_Antonio May 26, 2020, 5:38pm 18 17.- Write number with KeyPad in Arduino and sends to App by Bluetooth. LCD I2C. p9A0i_bluetooth_teclado.aia (1.8 MB) Write number with KeyPad + I2C: 123, 4567, 89, 61 then write # (as ENTER) That number is displayed on the I2C LCD and is sent via Bluetooth. Depending on the number sent, the image of a monkey, lion, bear or martians will be displayed in App. bt_431000×473 184 KB Bluetooth HC-06 LCD I2C. KeyPad 4x4. Module convert 8 bits to I2C PCF8574. // Juan A. Villalpando // http://kio4.com/appinventor/9BA_bluetooth_teclado_LCD.htm #include <Wire.h> #include <Keypad_I2C.h> // Pantalla LCD #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); String clave = ""; String clave_old = ""; const byte ROWS = 4; const byte COLS = 4; char keys[ROWS][COLS] = { {'1', '2', '3', 'A'}, {'4', '5', '6', 'B'}, {'7', '8', '9', 'C'}, {'*', '0', '#', 'D'} }; byte rowPins[ROWS] = {0, 1, 2, 3}; byte colPins[COLS] = {4, 5, 6, 7}; int i2caddress = 0x20; // Module I2C Keyboard. Keypad_I2C kpd = Keypad_I2C( makeKeymap(keys), rowPins, colPins, ROWS, COLS, i2caddress); void setup() { Serial.begin(9600); kpd.begin(); lcd.begin(16,2);// Columnas y filas de LCD. } void loop() { char key = kpd.getKey(); clave = clave + (String) key; if (key == '#') { clave = clave.substring(0, clave.length() - 1); // Delete last char # lcd.clear(); lcd.setCursor(0,0); lcd.print(clave); lcd.setCursor(0,1); lcd.print(clave_old); clave_old = clave; Serial.println(clave); clave = ""; } delay(100); } bt_45813×789 69.7 KB Libraries LcdCristal_I2C and KeyPad_I2C. 1 Like Programmable keyboard Juan_Antonio May 27, 2020, 3:49pm 19 18.- Poor man’s circuit. In the example above, the poor man has no LCD, no I2C module, and no KeyPad. Remove the wire from terminal 0 of the Arduino. In Design, DelimiterByte = 35 (it is #) // Juan A. Villalpando // http://kio4.com/appinventor/9BA_bluetooth_teclado_LCD.htm char key = 0; String clave = ""; void setup() { Serial.begin(9600); } void loop() { if (Serial.available() > 0) { key = Serial.read(); clave = clave + key; if (key == '#') { Serial.print(clave); // Example sends: 123# clave = ""; } } } Now in Serial Monitor write number, 123# 2 Likes I want to send binary to Arduino Juan_Antonio May 27, 2020, 5:53pm 20 19.- Arduino Interrupts sends data to App. p9A01_bluetooth_interrupt.aia (2.3 KB) Arduino UNO has two pins for interruptions (pin2 and pin3). ESP32 has 32 interrupt pins). Arduino interrupts: https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/ When pin2 RISING causes an interrupt and calls function on_13 When pin3 RISING causes an interrupt and calls function off_13 bt_501000×418 147 KB bt_49695×358 28.4 KB // Juan A. Villalpando // http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm #define LED13 13 void setup() { Serial.begin(9600); attachInterrupt(digitalPinToInterrupt(2), on_13, RISING); attachInterrupt(digitalPinToInterrupt(3), off_13, RISING); pinMode(LED13, OUTPUT); } void loop() { // } // Interruptions ISR. void on_13() // When pin2 RISING... { digitalWrite(LED13, HIGH); Serial.print(1); } void off_13() // When pin3 RISING... { digitalWrite(LED13, LOW); Serial.print(0); } 1 Like Two way Bluetooth/Arduino communication next page → Tag » Arduino Bluetooth Module Mit App Inventor HC-05 Bluetooth Module With Arduino-MIT App Inventor - YouTube How To Control Arduino From App Inventor Via Bluetooth (Module HC ... Sending And Receiving Data With HC-05 - MIT App Inventor Easiest Bluetooth Car Using Arduino And MIT App Inventor MIT APP Inventor Arduino Bluetooth Application Making Explained Lập Trình ứng Dụng điều Khiển Xe Qua Bluetooth Mà Không Cần Code How To Build Custom Android App For Your Arduino Project Using ... Getting Started MIT App Inventor 2 - Random Nerd Tutorials MIT App Inventor + Arduino + Bluetooth - SlideShare Arduino Uno Rev 3 + MIT App Inventor + Bluetooth Module HC05 + ... Using MIT App Inventor To Control Arduino - The Basics - Instructables MIT App Inventor + Arduino + Bluetooth - DOKUMEN.TIPS [PDF] Application N°1 _ Configurer La Liaison Bluetooth - Eduscol [PDF] App Inventor : Communication Via Bluetooth