I would be great full if someone could take a look at this code to see whats causing this problem.
I am very new to the arduino scene and only know bash coding C language is new to me.
I am using this for peltier control on/off with the following hardware
Arduino Mega 2560
DHT22 sensor
Wiznet w5100 etheernet shield clone
16 channel relay module
TEC 72watt peltier x4 running from the one output "led" pin
725 watt HP server Power Supply
The problem is when i set the temperature in the thermostat area "Web browser" to ON in software turns LED ON and relays OFF an OFF in software turns LED OFF and relays ON (led's become active on relay module) this is the opposite to what i need.
What i need is to set the desired temperature and hold as close as possible to that temp set "auto mode".
I have change HIGH to LOW and vice versa, Also changed the stare; // 0 is OFF, 1 is ON to 0 is ON and 1 to OFF no difference.
I hope this is being posted in the correct area and i hope this makes sense.
The problem is when i set the temperature in the thermostat area "Web browser" to ON in software turns LED ON and relays OFF an OFF in software turns LED OFF and relays ON (led's become active on relay module) this is the opposite to what i need.
You can't assume that setting a pin LOW will turn something on or off. You have to determine whether LOW makes the connected object turn "on" or "off". You could
#define relayOn LOW
if LOW makes the relay turn on. Then, use relayOn in the digitalWrite() statement to turn the relay on.
Do the same for ledOn. Then, the actual values of relayOn and ledOn won't matter. The names describe what you are trying to do.