Print out integer received from function after initial string

Any kind of start/stop byte that allows your receiving code to tell when one transmission starts and ends will do.
Even a fixed length protocol might be OK if you are sure never to loose a byte and get out of sync.

But the way you outlined sounds OK too.

I’ve been searching around and found this protocol

This would be suitable as it also has a checksum to ensure data is correct?

  • Just realised this is only arduino to arduino. Its been a long day :frowning:

It doesn’t matter if Arduino to Arduino as the serial com works just the same (on that level).

I tried to include the library but it kept throwing up errors when compiling on the Photon, Arduino was fine however.

I’ve decided to try and write my own protocol however im finding it very hard as the majority of the guides online all use very different methods!

The serial com is a very wide open interface so you (or anybody) can choose the best for the use case

@douy, the EasyTransfer library should be straight forward to port. If you are still interested in using it, I can give it a shot tonight and let you try it :wink:

1 Like

If you’ve got enough spare time to try and port it that would be excellent, I would be happy to test it out

1 Like

@peekay123 Just wondering if you managed to port the EasyTransfer library, I’ve been tinkering with it myself but haven’t managed to get very far.

@douy, the porting part is pretty well done but I haven’t compiled it all. I’ll have it done this weekend. :smiley:

1 Like

@douy, I’ve ported the serial version of EasyTransfer. Did you want that available on the IDE?

Yes please that would be great!

1 Like

@douy, the library is now on the IDE. It’s called EasyTransferSerial. Let me know how it works cause I haven’t tested it :wink:

I’ve been tinkering with it over the past few days, no compile errors or problem flashing on both devices. I just cant seem to get it to work

@douy, can you give me more details on your testing environment, what you are trying, what is not working, etc.?

Sending data between an Arduino Uno and Photon with the libraries on both, communicating using Hm-10’s BLE modules.
Set up the two structures on both devices, the Photon receives a command via the internet then sends a command signal over to the Arduino, this should start a sub routine on the Arduino to read the temperature then send that data back to the photon. I’ve used multiple serial prints to see if any data is being received and to check where the code is having problems but the Arduino doesn’t seem to receive any of that data at all.