Hello Community,
I did a lot of research and Im trying since one day but I didnt find my mistake.
Im trying to send the values of fourth sensor via RS232 to Python/Capl(CANoe).
First of all I send every data seperatly via Serial.println, this isnt a big thing and its working fine but I will get timing issues if I not received all four sensor data at the same time.
For this I changed my communication from Serial.println to the SerialTransfer lib.
Im trying to send the sensor datas (the values are longs) via a struct but if I try to send something I will only get thrash.
So I start reducing my program to the basic (just sending two integer) but this doesnt work either!
Somebody of you has maybe an idea, where I did the mistake?
#include "SerialTransfer.h"
SerialTransfer myTransfer;
int data1 = 53;
int data2 = 54;
void setup(void)
{
Serial.begin(115200);
myTransfer.begin(Serial);
}
void loop(void)
{
uint8_t sendSize = 0;
//TorqueMeasurement(0);
//RotaryAngleMeasurement(0);
myTransfer.txObj(data1, sizeof(data1), sendSize);
sendSize += sizeof(data1);
myTransfer.txObj(data2, sizeof(data2), sendSize);
sendSize += sizeof(data2);
myTransfer.sendData(sendSize);
delay(1000);
}
Best regrads,
Drumy