Go Down

Topic: void value not ignored as it ought to be (Read 2770 times) previous topic - next topic

Delta_G

Sorry, I was indeed looking at ledPin.

hilukasz


Code: [Select]
Serial.print(allValues[0]); Serial.print(" , "); Serial.print(allValues[1]); delay(10);

And I'm betting this line will give you an allValues not declared in this scope error.  I don't see it declared anywhere anyway.

EDIT:  Found it in the previous code, but it was commented out there. 


I am kind of fixing it as I go, probably a bad idea. Reason is I am converting this from messy functions to more Class based. Those will be replaced by the classes, but I feel like I need to get the classes working first since they are so new to me, then I can make my way down the list. Right now I cant even get the class to pass correct values. But I guess I will read more about pointers....
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Delta_G

#32
Apr 06, 2013, 03:24 am Last Edit: Apr 06, 2013, 03:26 am by Delta_G Reason: 1
Oh, here it is.  
Code: [Select]
for(int i = 0; i < numberOfSensors; i++){
    cs_sensor[i] = new CapacitiveSensor(capSenseSend,sensorPin);
  }


I had the problem right, but when I went looking for the one that was wrong I assumed that you had left this fixed.  sensorPin IS an array and needs an index.

Post 20 you said you fixed it.  Post 24 when you post new code it is still wrong.

hilukasz

#33
Apr 06, 2013, 03:34 am Last Edit: Apr 06, 2013, 03:36 am by hilukasz Reason: 1

Oh, here it is. 
Code: [Select]
for(int i = 0; i < numberOfSensors; i++){
     cs_sensor[i] = new CapacitiveSensor(capSenseSend,sensorPin);
   }


I had the problem right, but when I went looking for the one that was wrong I assumed that you had left this fixed.  sensorPin IS an array and needs an index.

Post 20 you said you fixed it.  Post 24 when you post new code it is still wrong.


oh, sorry I wasn't clear. I had fixed it to say:

Code: [Select]
cs_sensor[i] = new CapacitiveSensor(capSenseSend,sensorPin[i]);

just didn't post the code as I should have. I wasn't sure if that change has then set the next error into place, or if it was a correct fix. It seems to have fixed it, after I realized I wasn't referencing the correct Object later in the code. I am further in now, I think rest of these errors I can handle. thanks for your patience :)
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Go Up