hello,
I do not understand ,
by ssh ( putty ) , i start my prog in python , no errors
#!/usr/bin/python
import os.path,csv,time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17, GPIO.OUT)
def trace(b,d,tp):
hr=time.localtime()[3]
mn=time.localtime()[4]
jr=time.localtime()[2]
mo=time.localtime()[1]
an=time.localtime()[0]
he=str(hr)+':'+str(mn)
da=str(jr)+'/'+str(mo)+'/'+str(an)
if d == 1:
tr=b+','+da+','+he+',,'+str(tp)+'\n'
else:
tr=b+','+da+',,'+he+','+str(tp)+'\n'
tra=open('trace.csv','a')
tra.write(tr)
tra.close()
def temp(b):
global t1,tex
#if os.path.exists('/mnt/1wire/'+b+'/temperature'):
try:
fich=open('/opt/1wire/'+b+'/temperature','r')
t1=float(fich.read())
fich.close()
except:
fich=open('/opt/1wire/'+b+'/temperature','r')
t1=float(fich.read())
fich.close()
while True:
# relais insert
b='insert/typeK'
temp(b)
if t1 > 60:
GPIO.output(17,1)
else:
GPIO.output(17,0)
#d=1
#tp=t1
#trace(b,d,tp)
i want started my prog python by bootlocal.sh
after
ssh "connection refused"
why??
thank