Go to advanced search

by ground_
Sun Apr 19, 2015 2:30 pm
Forum: Beginners
Topic: rpi b+ booting, pi2 not
Replies: 2
Views: 378

Re: rpi b+ booting, pi2 not

hmm, that was what i was afraid off. Thank you for your confirmation!
by ground_
Sun Apr 19, 2015 1:53 pm
Forum: Beginners
Topic: rpi b+ booting, pi2 not
Replies: 2
Views: 378

rpi b+ booting, pi2 not

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...
by ground_
Wed Nov 12, 2014 10:04 pm
Forum: Python
Topic: sending advanced .txt file with smtplib
Replies: 1
Views: 800

sending advanced .txt file with smtplib

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...
by ground_
Wed Nov 12, 2014 9:58 pm
Forum: Python
Topic: Using a sleep function with WiringPi / GPIO & other ?'s
Replies: 3
Views: 1595

Re: Using a sleep function with WiringPi / GPIO & other ?'s

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...
by ground_
Thu Oct 30, 2014 3:46 am
Forum: Python
Topic: Python services and logging
Replies: 4
Views: 8186

Re: Python services and logging

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...
by ground_
Thu Oct 30, 2014 3:20 am
Forum: Python
Topic: Threading Cancel
Replies: 8
Views: 4371

Re: Threading Cancel

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)....
by ground_
Mon Oct 27, 2014 7:09 pm
Forum: Python
Topic: scheduled functions
Replies: 7
Views: 1993

Re: scheduled functions

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...
by ground_
Mon Oct 27, 2014 10:11 am
Forum: Python
Topic: scheduled functions
Replies: 7
Views: 1993

Re: scheduled functions

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...
by ground_
Mon Oct 27, 2014 12:50 am
Forum: Python
Topic: scheduled functions
Replies: 7
Views: 1993

scheduled functions

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...
by ground_
Sat Oct 25, 2014 3:48 am
Forum: Beginners
Topic: NOOBS
Replies: 6
Views: 1066

Re: NOOBS

https://www.youtube.com/watch?v=nXvODj6YpAE

that video will tell you exactly how to setup raspbian correctly (and takes you through every step in raspi-config)
by ground_
Sat Oct 25, 2014 2:32 am
Forum: Python
Topic: python unboundlocalerror
Replies: 3
Views: 1018

Re: python unboundlocalerror

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...
by ground_
Fri Oct 24, 2014 10:02 pm
Forum: Python
Topic: python unboundlocalerror
Replies: 3
Views: 1018

python unboundlocalerror

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):...
by ground_
Thu Oct 16, 2014 2:59 pm
Forum: Beginners
Topic: Help with humidity and other sensor
Replies: 4
Views: 770

Re: Help with humedity and other sensor

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...
by ground_
Thu Oct 16, 2014 5:04 am
Forum: Beginners
Topic: Connect LED's safely (calculate with current)
Replies: 6
Views: 2188

Re: Connect LED's safely (calculate with current)

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.
by ground_
Wed Oct 15, 2014 12:28 am
Forum: Beginners
Topic: Bash Script
Replies: 8
Views: 1122

Re: Bash Script

it is basicly a script with a new command in every line (like you would type it in the terminal).
you can check this site for more information:
http://www.tldp.org/LDP/Bash-Beginners- ... 02_01.html
by ground_
Wed Oct 15, 2014 12:10 am
Forum: Beginners
Topic: Connect LED's safely (calculate with current)
Replies: 6
Views: 2188

Re: Connect LED's safely (calculate with current)

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). ...
by ground_
Tue Oct 14, 2014 6:40 am
Forum: Beginners
Topic: Connect LED's safely (calculate with current)
Replies: 6
Views: 2188

Connect LED's safely (calculate with current)

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...

Go to advanced search