Hello, After some fun with my raspberry pi b+, i decided to buy one rpi 2 for my television (in combination with osmc). I have been trying to get it to work for over a couple or days, and i tried every tip/tutorial which i could find (also NOOBS). But here is my problem: When i connect my RPI2 to th...
hello, I wrote a script to automatically send a .txt file to my e-mail address. This was working fine. But when I add an "•" to the text file, it throws me an error. this is the error: UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 584: ordinal not in range(128) and th...
although i am nt compeltely sure what you want, this is maybe the solution: #! /bin/bash import time gpio mode 7 down app="Panic Button Town" message="KITCHEN" title="PANIC BUTTON" url= url_title= priority= device= sound= userkey=*mykeyhere* apikey=*myAPIkeyhere* while true do gpio wfi 7 rising curl...
I wrote the following logging script for my script last week. It prints a status on the screen every 30 min (obviously you can adjust that), and it writes that info to a .txt file. (i adjusted it a little bit so it would be more obvious) import threading tlog= threading.Timer(30,log) tlog.start() if...
I had a similar problem last week., and i solved it like this (very similar to the solution above me): isPressed = 0 def pressed(pin): global isPressed if isPressed == 0: isPressed = 1 sendMail() else: pibrella.light.off() isPressed = 0 def sendMail(): if pressed == 1: threading.Timer(10, sendMail)....
thanks a lot!, well i have decided to do it with a combination of the datetime, time.sleep and thread module. Basicly have a function which will shutdown the rpi after a time.sleep(n) (where n is the timedifference between now and the given end date). if anybody is interested here is the code: def e...
Well, i know that is possible, but as i said i dont like that for my script, mainly becausethe following reason: When the program is running, it will also keep a log file (where is prints some variables in a text file, and one of the variable is changing at 8:00 every day). I already got this workin...
hello all, today i wanted to write a program which execute a few functions at a given date/time, and i can't figure out how. here is what Iwant to achieve: I would like to let a python script run for a week, and i want it to do 3 functions every day (at a given time): - every day at 8:00 print(" goo...
well, i thought it would go to the else function then (and restart at the beginning), but defining it would be a good idea. well i think I (accidentally) figured it out: I simply put a return at the end of the ELSE: block. Other wise the functions keeps running while it started again (and 2 are runn...
Hello all, last week I red a book about writing in python and did some tutorials. Now i am getting the hang of it, and I wanted to write a program which guide me through some steps in order to turn on my LED light. But now i am experiencing an error which I can't figure out (but seems quite simple):...
that would be a funny project, and i thought about it in the past, and. I found cheap homemade systems like this: http://gardenbot.org/howTo/soilMoisture/ Well it depends on what kind of sensor you are using, but as long as they don't draw 16mA per pin (with a total of 51mA for all the pins) you sho...
Yes i know that, i already ordered a breadboard with it ( and multimeter) and i can apply the ohms law ( as wel measuring amps and voltage), as that is one of things i know with electricity.
Thanks for the reaction! it helped me a lot. I did some more homework today and figured out the following: The specific properties of the led is still unknown, but it is safe to guess the voltage drop around 1.8. (afterwards i can recorrect it, but with a 220 ohm resister i should be safe for now). ...
Hello everybody, This week i will finally receive my raspberry PI. I am hyped for it as I can start some projects which I wanted to test out for now, so I am already made an electrical circuit plan on paper, but it didn't take long to get to my first problem (which after puzzling a day I can't solve...