-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Transfer Between ESP 32 And Arduino Mega #108
Comments
This is really interesting - the examples should work for arduino <-> ESP32. How about revamping the examples so that you're transferring dummy data that matches what you want to transfer in your project? We can debug further from there for your specific case. |
Dear @PowerBroker2, I am trying the same. ESP32 as reader and Atmel as sender. Compilling both, ok. ESP32 code
Atmel code
esp console, repeating cyclic
|
You forgot to initialize your SerialTransfer object on the Serial port you intend to use for inter-device communication. So for the ESP32, after the line in setup() For OP, I know it's been over a year since you posted and you never responded to the maintainer, but ESP32<->Mega with arbitrary data types works perfectly fine. You simply use a struct to store the variables and their types, and make sure that that struct's definition is identical on both ends. As long as both ends have the same definition for the struct, it will be correctly interpreted on the receiving end. A project I work on has two Mega 2560s and an ESP32 and they all use SerialTransfer to send multiple arbitrary data types. Works a treat! |
Thank you @PowerBroker2 |
I want to transfer data from arduino mega to Esp32 when I use the example sketches ( uart_tx_data on arduino and uart_rx_data on esp32 ) the code generates wrong output ($ovf | ld) . i tried many options i found out that when the whole structure is of the same type (float/bool) it works well but when i mix between data types in the same structure it generates wrong output depends on the order of structure elements (if the first element is char , second float and third is float the output becomes the char value then all 0 but if the order is float char float the output becomes first value is right then char is right then the third element is 0 so the order matters ) also if the data type is int or double the output becomes totally wrong values.
I need to send data from the arduino mega to the Esp32 in a structure with mixed data types if possible and i need in these types double ( 8 bytes ).
Is this possible and if you could help with any tips or recommendation.
Thanks in advance.
The text was updated successfully, but these errors were encountered: