I wrote a code for controlling some infrared lamps via some solid state relays, they use 0-5v to control 220v lamps I wrote the code for that very simple since I followed some instructions and examples but the hard part is where I need to attach a touch screen interface to adjust the lamps using the screen.
/*
Designed by LYNCHPOWER ELECTRONICS FOR LifeSpan Co. LTD
USed as temporary circuit for BM4500 Blow Molder heat lamps, replacing original motherboars.
*/
int tunnel1 = 3; // the PWM pin the LED is attached to
int tunnel2 = 5;
int tunnel3 = 9;
int tunnel4 = 10;
// the setup routine runs once when you press reset:
void setup() {
// declare pin 9 to be an output:
pinMode(tunnel1, OUTPUT);
pinMode(tunnel2, OUTPUT);
pinMode(tunnel3, OUTPUT);
pinMode(tunnel4, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// set the brightness of pin 9:
analogWrite(tunnel1, 14);
analogWrite(tunnel2, 14);
analogWrite(tunnel3, 11.3);
analogWrite(tunnel4, 7.5);
}
Thats the code I used to adjust each lamp, could I get some assitance with this, and I dont have a screen as yet.