I'm here because I'm in trouble... I use MIT app Inventor 2 to make an application and the HC05 bluetooth module to cummunicate between the application and the arduino but I have a problem with it, can someone help me?
I have an app that read the temperature that the arduino receive and that works well. The problem is that I have to transmit an information (basicly 1 and 0) to my arduino to control one other thing but the arduino can't read it, maybe because there's too much information on the Serial port (I send temperature every 5 seconds)... Is that true? Can I fix that?
Hi. Your description of the problem is hopelessly lacking in detail for anyone to guess what the problem could be. I could give you a list of all the things we would need to know to help you, but fortunately they are already written down for you in the "please read" post at the to of every forum section.
Then on the application I read this temperature and I display it on the screen (this part works fine).
My problem here is that I would like to send a code (the a==1 and a==0 on the arduino) that could run the loop. But it doesn't work as I want, the arduino doesn't seem to receive that byte... I will let you a screenshot of the code I use for the application on MIT.
Thank you
I don't see the Tools option... Yes the While loop is useless here you're right but it's still what I intended. I know it's not the usual code but it's easy to understand isn't it? I forgot to say that if I don't use the temperature part of my code, the bytes that I send from the application do it's job fine so I don't know how to fix that...
Then you need to get rid of the delay as well. You should be using the BlinkWithoutDelay method of checking if time passed or you will only check the serial ports every 5 seconds as well.
Distra12:
I don't see the Tools option... Yes the While loop is useless here you're right but it's still what I intended. I know it's not the usual code but it's easy to understand isn't it? I forgot to say that if I don't use the temperature part of my code, the bytes that I send from the application do it's job fine so I don't know how to fix that...
Look harder for the Auto Format option.
So, if you remove the temperature loop, the code works how you want. If you put the temperature loop option in, the rest of the code does not work. But you say this is how you intended the temperature loop to work, to loop forever. That isn't really how you intended it to work is it?