Hola estimados, tengo un problema con app inventor. No envía el texto a arduino, se envía solo. aquí les dejo unas fotos de los programas de prueba que hice para verificar la llegada de datos, probé de muchas formas modificando el código arduino pero de ninguna manera lo recibe, sigue enviándose solo. Tengo un modulo bluetooth HC06 y un arduino mega.
Hello dear, I have a problem with app inventor. It doesn't send the text to arduino, it sends itself. Here are some photos of the test programs that I did to verify the arrival of data, I tried in many ways modifying the arduino code but it does not receive it in any way, it continues to send itself.I have a bluetooth module HC06 and an arduino mega.
Lo que pasa es que el bluetooth envia el valor Ascii del caracter que vos indicás. Por ejemplo para la letra A tenés que preguntar en Arduino si recibió un 65 ( Ascii de "A")
I suggest that you walk before you run. At the moment, your App code is persistently receiving data when at the same time an arbitrary button click sends data - that's a recipe for trouble. So if you want to send data, first define a separate Project to work with so you can accomplish that goal.
Cannot offer more advice as we cannot see all your blocks nor all your Sketch/Script. It would help us to help you if we knew what the ultimate goal of your App is exactly.
Probe de muchas maneras de convertir el "lo q envia", el problema es que creo q no envia nada. Ya que ni en un simple codigo como este le llega algo al monitor serie, ni siquiera codigos, nada, queda vacio. pero si envia datos desde el arduino a la app.
Hello friend, I did not want to upload the main code where I have the problem because it is basically the same problem. In the project where I need data to arrive, it is longer and it is the same problem that I have here, the data that I send from the app does not reach arduino. But if they arrive from the arduino serial monitor to the application. Here's another test example I did and nothing comes out, no codes or anything.
Lol, I made this block for testing nothing else. Because as I explained, I have the same problem in another, therefore I decided to test if I receive data from the app with this block.
Your HC06 is 3.3v, you need to divide the Arduino's 5V TX line down to 3.3v (2 resistors). If you have not done this already, the module may be fried.........
//vars
unsigned int igUpdateTime;
char val[];
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
igUpdateTime = millis();
}
void loop()
{
//Excute loop every 1/2 second
if(millis() - igUpdateTime > 500)
{
igUpdateTime = millis();
if (Serial.available() > 0)
{
//Read Data From App
val = Serial.read();
//Send to Arduino Seria Monitor on PC (via USB cable)
Serial1.println(val)
}
}
}
#include <SoftwareSerial.h>
SoftwareSerial miBT(10,11);
// El TX del módulo BT va al pin 10 del Arduino
// El RX del módulo BT va al pin 11 del Arduino
char D;
Muchas gracias a todooos..!
El problema principal era que arduino mega no necesita la libreria software serial, y yo insistia en agregarla en cada prueba.
Thank you very much to all..!
The main problem was that the arduino mega doesn't need the serial software library, and I insisted on adding it in every test.
That's good, I know it can be a long slow process. I wish I could go to a club and talk face to face with people more experienced than me, not hard, and they would see the mistakes/errors straight away. Trying to learn on your own is hard going!