Hi,
I'm working on system build by 20 ADXL345 accelerometers. When I try to add 16th column of data program fails and behave in the way like too many data columns were defined in comparison to serial print coulmns quantity - it just stop and require windows task manager to close it. Serial print window from arduino looks okay. Telemetry program fails already with X7M1s - all others are displayed properly as long as X7 and onwards is not defined.
Prior to sprintf I'm using dtostrf for each column.
dtostrf(X7M1, 5, 2, X7M1s);
dtostrf(Y7M1, 5, 2, Y7M1s);
dtostrf(Z7M1, 5, 2, Z7M1s);
sprintf(text, "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,", X0M1s, Y0M1s, Z0M1s, X1M1s, Y1M1s, Z1M1s, X0M2s, Y0M2s, Z0M2s, X3M2s, Y3M2s, Z3M2s, X6M2s, Y6M2s, Z6M2s, X7M1s, Y7M1s, Z7M1s);
Can someone help? I have investigated through my program 20 times and see no difference for X7 values so it has to be something with software.
Hi,
I'm working on system build by 20 ADXL345 accelerometers. When I try to add 16th column of data program fails and behave in the way like too many data columns were defined in comparison to serial print coulmns quantity - it just stop and require windows task manager to close it. Serial print window from arduino looks okay. Telemetry program fails already with X7M1s - all others are displayed properly as long as X7 and onwards is not defined.
Prior to sprintf I'm using dtostrf for each column.
dtostrf(X7M1, 5, 2, X7M1s);
dtostrf(Y7M1, 5, 2, Y7M1s);
dtostrf(Z7M1, 5, 2, Z7M1s);
sprintf(text, "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,", X0M1s, Y0M1s, Z0M1s, X1M1s, Y1M1s, Z1M1s, X0M2s, Y0M2s, Z0M2s, X3M2s, Y3M2s, Z3M2s, X6M2s, Y6M2s, Z6M2s, X7M1s, Y7M1s, Z7M1s);
Can someone help? I have investigated through my program 20 times and see no difference for X7 values so it has to be something with software.