The compiler hangs at this particular line. No error messages, it just freezes at 5-1/2 bars. If i comment it out, it compiles fine. Leave it active, no compiling. I can't figure out what's wrong with this line. It's worked on other microcontrollers.
Serial.println("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", 1024, bv, val01, val02, val03, val04, val05, val06, val07, val08, val09, val10, val11, val12, val13, val14, val15, val16, cksum);
Here's the whole program, if it matters
void setup() {
// put your setup code here, to run once:
Serial.begin(38400);
}
void loop() {
// put your main code here, to run repeatedly:
// read the input on analog pin 0:
int cksum;
int bv = 12*50; // temporary code until i figure out how to read battery voltage
int val01 = analogRead(A0);
int val02 = analogRead(A1);
int val03 = analogRead(A2);
int val04 = analogRead(A3);
int val05 = analogRead(A4);
int val06 = analogRead(A5);
int val07 = 507;
int val08 = 508;
int val09 = 509;
int val10 = 510;
int val11 = 511;
int val12 = 512;
int val13 = 513;
int val14 = 514;
int val15 = 515;
int val16 = 516;
// print out the values you read:
// 1024 is start code
// bv is battery voltage*50
// the 16 analog values
// last is checksum, by adding all analog values together
cksum = (bv+val01+val02+val03+val04+val05+val06+val07+val08+val09+val10+val11+val12+val13+val14+val15+val16);
Serial.println("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", 1024, bv, val01, val02, val03, val04, val05, val06, val07, val08, val09, val10, val11, val12, val13, val14, val15, val16, cksum);
delay(10);
The eventual platform is an Arduino Mega, which is why there are 16 values. Obviously 7-16 don't work on an Uno, so i gave then constants.
Thanks,
Mike