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

http://www.billporter.info/2011/05/30/easytransfer-arduino-library/comment-page-12/#comments

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:

1 Like

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.