View Single Post
Old 01-05-15, 09:46 PM   #75
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,428
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

in post number 66, you define your sensor pins here:

Code:
int SsensorPin = 4; // the pin to read solar panel temperature
int TsensorPin = 5; // the pin to read water tank temperature
just comment out those lines and insert:
Code:
#define SsensorPin 1//Arduino analog pin where the Sensor1 is connected
#define TsensorPin 2//Arduino analog pin where the Sensor2 is connected
then change your analog sensors to pin a1 and a2 on the arduino board
if you want to keep them connected to the same pins, just change the 1 and 2 to 4 and 5. it should work better then.
defining pin locations as variable integers is risky business. you want to define them as constants to prevent murphy's law.

Last edited by jeff5may; 01-05-15 at 09:49 PM..
jeff5may is offline   Reply With Quote