Hi all
I hope you can help with this, as it is a relay problem not python. But I am struggling to get this to work below is a photo of the relay module, It is a Songle relay connected to a hl-58s v1.2 board (this means nothing to me)
I know my script that I have set up works as I have tested it witha simple LED, but It does not trigger the relay. on the module are A(gnd, in1, in2, in3, in4, in5, in6, in7, in8, vcc.) and also B(gnd, vcc, jd-vcc) I have connected from my pi zero 5v(2)-A(vcc), gnd(6)-A(gnd) and out(25)-A(in1) and also an external 5volt supply positive to B(jd-vcc) and negative to B(gnd), nothing has exploded or burnt out, nor has the relay operated.
I have carried out this test, I diconnected the out cble from pi leaving it connected to the module then then connect it to 5v pin on pi result = nothing
then connect it to Gnd pin on pi result = switch operates?
what does this mean and what do I need to do?
kind regards
paul
Solved it!
I changed the code in temp.py
I hope you can help with this, as it is a relay problem not python. But I am struggling to get this to work below is a photo of the relay module, It is a Songle relay connected to a hl-58s v1.2 board (this means nothing to me)
I know my script that I have set up works as I have tested it witha simple LED, but It does not trigger the relay. on the module are A(gnd, in1, in2, in3, in4, in5, in6, in7, in8, vcc.) and also B(gnd, vcc, jd-vcc) I have connected from my pi zero 5v(2)-A(vcc), gnd(6)-A(gnd) and out(25)-A(in1) and also an external 5volt supply positive to B(jd-vcc) and negative to B(gnd), nothing has exploded or burnt out, nor has the relay operated.
I have carried out this test, I diconnected the out cble from pi leaving it connected to the module then then connect it to 5v pin on pi result = nothing
then connect it to Gnd pin on pi result = switch operates?
what does this mean and what do I need to do?
kind regards
paul
Solved it!
I changed the code in temp.py
if read_sensor(sID1) + x > read_sensor(sID2): GPIO.output(25,GPIO.HIGH) # print("it's Hot!") to if read_sensor(sID1) + x > read_sensor(sID2): GPIO.output(25,GPIO.LOW) # print("it's Hot!")and it worked