Anyone possible make project

i paired from my device

@svan I have data printing in the console window! :smiley: I recognise the text but the protocol is different from yours, not a problem, easily fixed.

262,
*
P
1
[/quote]

on bluethooth ?

Yes, BlueTooth, Iā€™m altering the program so it prints on the phone as well.

Iā€™m leaving for work tomorrow morning okay for Wednesday ok.
now i see some for the hc-06 then i go to bed
now thanks night

si funziona!!! via bluetooth legge lā€™encoder!!!

Hi @svan, Iā€™ve been adjusting your program, learning whatā€™s there and making it auto-connect to an Arduino+HC05 of mine. A few comments:

  • Whatever I did with the baud control didnā€™t make any difference. So I deleted all the ā€˜baudā€™ items and code, and it works as well as before. I think there is no baud rate on a BT link.

  • Where your program reads the incoming bytes I added ā€˜if availableā€™ and a delay while nothing has arrived. Another delay before reading to ensure I get the whole line as sent.

        if (mmInStream.available() > 60) 
        {
          delay(200);  // allow the rest of the line to arrive
          bytes = mmInStream.read(buffer);
          String inStr = new String(buffer, 0, bytes);
          print(inStr);
          dataStr = dataStr + inStr;
          // To do - interpret the arrived string into values
        } 
        else 
        {
          // if nothing arrived, wait a moment.
          delay(100);
        }

That print(inStr) actually does a println(inStr) on the console. Never mind, itā€™s pretty amazing that you can have a console on the PC from a program running in the phone.

  • Building the program is quite slow, 90 seconds to compile and run.

Anyway, itā€™s awesome as they say, another really useful tool to connect things, thanks again.

Thank you for taking the time to look at the code and for your constructive comments. The feedback is much appreciated.

  • Building the program is quite slow, 90 seconds to compile and run.

Noel swears by APDE to make code compile faster (he uses a PC). Iā€™m using a Mac and it has never worked that well for me (likely because I donā€™t know how to use it). It possibly could help you if you havenā€™t already tried it.

I want to make clear that I use a PC only for editing the pde file.
I use in conjunction an app on my phone and a chrome extension both called Pigeon, that share the clipboard content from both phone and PC. So, in no time, just by copying and pasting the clipboard, I can run my sketch on my phone with the APDE app in 4, 5 seconds. (If in preview mode). There are similar clipboard apps, and also for Mac & Android like Alt-C.