Go to advanced search

by komarek
Thu Aug 03, 2017 5:27 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

sometimes when i open the gate somehow the gpio turns on it's probably some voltage peak considering the gate is opened by a relay turned on by the same 12VAC line any idea to fix that? Does the Pi know when the gate release is pressed? If it does ( like if you use the Pi to activate the relay) the...
by komarek
Thu Aug 03, 2017 4:14 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

sometimes when i open the gate somehow the gpio turns on it's probably some voltage peak considering the gate is opened by a relay turned on by the same 12VAC line any idea to fix that? Does the Pi know when the gate release is pressed? If it does ( like if you use the Pi to activate the relay) the...
by komarek
Thu Aug 03, 2017 4:10 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

Heater wrote:
Thu Aug 03, 2017 3:03 pm
I don't know how your gate and button are wired.
i will try to make a diagram
by komarek
Thu Aug 03, 2017 2:26 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

That's much nicer. Sounds like sometimes your button presses are longer than 0.1 seconds. So the body of the loop gets run more than once per press. What you could do is ensure that the button goes low again at the end of the loop. That would remove double hits. while GPIO.input(pin): # Do nothing ...
by komarek
Thu Aug 03, 2017 11:40 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

i will test it for a while and tell you the results
anyway
to have a Pi running at 5% instead of 100% is totally differently responsive
by komarek
Thu Aug 03, 2017 11:29 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

i changed the script like this: def pinReset(): GPIO.setup(pin, GPIO.OUT) GPIO.output(pin, GPIO.LOW) time.sleep(0.1) GPIO.setup(pin, GPIO.IN) while True: time.sleep(0.1) if (GPIO.input(pin)): try: print("1. ha suonato il CAMPANELLO") with picamera.PiCamera() as camera: camera.vflip = True camera.res...
by komarek
Thu Aug 03, 2017 10:38 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

As I said, I have no idea how your input is wired up. Seems to me that as it is just a button press there is no need for any analog measurement at all. The button is either pressed or not. The GPIO input is a high voltage or not. The logical state in the code is 1 or 0. There for. Your code need no...
by komarek
Thu Aug 03, 2017 10:09 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

OK. Keep the rc time if you need it. But you still have a CPU hogging tight loop in there. It may work fine but it is not a pleasing way for a program to behave. i see what you mean but can you give me an alternative solution to get an analogical input from gpio? this loop works somehow and returns...
by komarek
Thu Aug 03, 2017 9:33 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

Your script sleeps for 0.1 seconds then does this: while (GPIO.input(pin) == GPIO.LOW): count += 1 Which is a tight loop that hogs 100% of the CPU until the pin goes low. And I guess could take a long time. I have no idea how your input is wired now but why do you need to be measuring an rc time? S...
by komarek
Wed Aug 02, 2017 10:43 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

Post the script on here so folks can hack at it. sure #!/usr/bin/env python3 import paho.mqtt.publish as publish import paho.mqtt.client as mqtt import picamera import os import requests import smtplib import time from datetime import datetime from email.mime.text import MIMEText from email.mime.im...
by komarek
Wed Aug 02, 2017 9:47 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

i see the script takes 99% of the CPU which is running at 100%... i hope it won't be a problem on the long run this script uses a weird algorithm to compute the ldr brightness so i guess this is pushing the cpu so high Put some time.sleep(...) commands [or equivalent in your choice of programming l...
by komarek
Wed Aug 02, 2017 9:29 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

i see the script takes 99% of the CPU which is running at 100%... i hope it won't be a problem on the long run
this script uses a weird algorithm to compute the ldr brightness so i guess this is pushing the cpu so high
by komarek
Wed Aug 02, 2017 8:12 am
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

PROBLEM SOLVED

with the Pi inside the bell case i didn't realize something really important: when i shot the photo the red led of the piCamera stayed endlessly ON... and this because i'm a dork and wrote the command with a mistake.... the right command is: with picamera.PiCamera() as camera: (with indentation). i ...
by komarek
Tue Aug 01, 2017 10:32 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

[*]Similarly the voltage at the regulator input [*]Measure the current into the regulator (NOT the 5V output) [/list] So you know the voltage drop at idle current. Work out the drop at peak current (you have estimated/measured peak current, haven't you?), that's all Ohm's Law stuff. Does that sugge...
by komarek
Tue Aug 01, 2017 9:31 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

You are, of course, welcome to explore the problem any way you like. But it is difficult to help when you don't carry out simple tests with the equipment you have to determine where the problem lies. You know what. The Pi at the moment is glued inside a box 10x20 cm. Quit difficult to make many typ...
by komarek
Tue Aug 01, 2017 8:21 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

i attached the PI to a DC-DC converter that takes a 8V 0.37A as input... on the other hand i should use the AC as input (13V at 1A)... i've bought an AC-DC converter that probably would be better in my case... at list i will use 1 Ampere for the line, i guess will be more steady i'm waiting for the...
by komarek
Tue Aug 01, 2017 7:48 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

cause i'm quite worry about the accuracy of the multimeter You need to sort that first, before you can use the multimeter for serious work. Somehow find out how accurate it is (compare with other people's meters?), and if it isn't, get a new one. Then set the supply to 5V (up to 5.25V will always b...
by komarek
Tue Aug 01, 2017 7:25 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

davidcoton wrote:
Tue Aug 01, 2017 7:23 pm
Why are you only getting 4.7V? Didn't you put the 5V regulator with the PI?
cause i'm quite worry about the accuracy of the multimeter and i don't want to burn the gpio... as long as the Pi turned on i left it as it is
by komarek
Tue Aug 01, 2017 6:20 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

the problem is that the script is correct. i've tried on another PI and it's working perfect without any change. testing and testing and testing sometimes it's rebooting when sending the mail... sometimes it's rebooting just after the doorbell... don't know what to think probably not enough current....
by komarek
Tue Aug 01, 2017 5:14 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Debugged

ok i thought it was an hardware problem but probably it's not after i've put multiple debug lines i discovered the exact time that script freeze and system reboot s = smtplib.SMTP('smtp.gmail.com', 587) s.ehlo() s.starttls() s.login(username,password) s.sendmail(fromaddr, [toaddr,tocc], msg.as_strin...
by komarek
Tue Aug 01, 2017 4:11 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

By The Way... an important info
even thou the python script print the debug line after the picture was captured by the camera... the picture (foto.jpg) is not actually being saved on the Pi... this could be a good clue
by komarek
Tue Aug 01, 2017 4:07 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

FIRST PROBLEMS

ok... the connections seem to work good i ve installed the Pizero inside the DoorBell Box... so i can't touch it or see it now... i just connect to it through ssh or remote vnc but the connection is not the best... so sometimes i got lags. anyway... i am finding out that the Pi seems to reboot witho...
by komarek
Sun Jul 30, 2017 11:27 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

FINALLY

my project is ready and i want to thank everybody for being so kind with me even when i say such stupid things tomorrow i will set it up and install it on the gate in front of my garden and i hope it's gonna be fine. now... when someone ring my bell on the street i will receive an email immediately ...
by komarek
Sun Jul 30, 2017 8:44 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

about the diode

LED_Circ.png To answer you "current" question. The 0.01 amp value used by Heater is the current you want to flow through the LED, this is a typical safe value for driving an LED. You can get the maximum allowable current for the LED you have from the LED datasheet. i have this one http://www.ebay.i...
by komarek
Sun Jul 30, 2017 8:41 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 12332

Re: Bricked my Pi. don't know why

LED_Circ.png To answer you "current" question. The 0.01 amp value used by Heater is the current you want to flow through the LED, this is a typical safe value for driving an LED. You can get the maximum allowable current for the LED you have from the LED datasheet. thanks alot i've tried the led wi...

Go to advanced search