Hello kind people,
At first, i'm Dutch and have some - a lot - problems writing in Englisch, so do appologise me for gramattica spelling en etc. You're language is realy differend from mine, and it will take some time for me to mengle in you're style of conversation (big difefrence in expressions en etc). Well thats that and i will overgome that problem by learning.
I will use this topic for learning and for help when needed, only i dont want the answers given on a sheet. See me like a student and homework what i got (age 39
)
My first piece of codeding (with some help and hours of testing) is:
import time
from datetime import datetime
DS18B20="/sys/bus/w1/devices/28-01204febab44/w1_slave"
while True:
now = datetime.now()
dt_string = now.strftime('%d/%m/%Y %H:%M ')
f = open(DS18B20, "r")
data = f.read()
f.close()
(discard, sep, reading) = data.partition(" t=")
t = float(reading) / 1000.0
print dt_string, '{:.1f}*C' .format(t)
time.sleep(4)
f = open("data.txt", "a+")
print >> f, dt_string,'{:.1f}*C' .format(t)
I'm building my own weather station with a RPi 3B and python code. Never dit something before and have no experiance in coding, so i'm testing and wrecking everything to see what happens. I'm using Geany for programming (thats fine for me now). I hope that this gives a small expression of what i am doing.
Thanks to Veltes and Quantos for the first introduction with my project.
Greetsss
Stef