Go to advanced search

by mustafadeniz.kocan
Mon Sep 17, 2018 8:28 am
Forum: Python
Topic: Push button database help
Replies: 3
Views: 899

Push button database help

hello everyone, I am working on a project that is.. take temperature data and insert it to database. It is working very well. But I have to do another thing with this code. I need to do a push button database. I explain briefly : when user pushes the button , program should take the time data and i...
by mustafadeniz.kocan
Tue Sep 11, 2018 1:52 pm
Forum: Troubleshooting
Topic: except KeyboardInterrupt: invalid Syntax
Replies: 2
Views: 913

Re: except KeyboardInterrupt: invalid Syntax

It can be too late but maybe someone use the correct code as below : import RPi.GPIO as GPIO import dht11 import time import datetime import csv import sys csvfile = "/home/pi/DHT11_Python/temp12.csv" # initialize GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.cleanup() # read da...
by mustafadeniz.kocan
Fri Sep 07, 2018 12:13 pm
Forum: Python
Topic: Python HELP !!
Replies: 7
Views: 965

Re: Python HELP !!

pi@raspberrypi:~ $ sudo python buton_function.py File "buton_function.py", line 56 def main(): ^ IndentationError: unexpected unindent Your "try:" commands are lacking "except:" clauses. Not the most informative error message to clarify what the mistake is but that's P...
by mustafadeniz.kocan
Fri Sep 07, 2018 10:45 am
Forum: Python
Topic: Python HELP !!
Replies: 7
Views: 965

Re: Python HELP !!

I need someone to fix my code because I can not find the error. You would probably be best off developing your code incrementally and separately. Get your button press handling working. Get your sensor reading code working. Get your web site update working. When that's all working separately you wi...
by mustafadeniz.kocan
Fri Sep 07, 2018 10:41 am
Forum: Python
Topic: Python HELP !!
Replies: 7
Views: 965

Re: Python HELP !!

Hi. Might help if you told us what the error is or what you program is not doing that you think it should. if you have an error message please post it in its entirety pi@raspberrypi:~ $ sudo python buton_function.py File "buton_function.py", line 56 def main(): ^ IndentationError: unexpec...
by mustafadeniz.kocan
Fri Sep 07, 2018 7:55 am
Forum: Python
Topic: Python HELP !!
Replies: 7
Views: 965

Python HELP !!

Hi there, I am new on this forum , I need help with the python code of my project. I am working on a project that I have dht11 thermal sensor and 1 push button 1 led light. I am trying to do is that : when I push the button, LED ON , when I release the button , LED OFF. At the same time I need to ta...

Go to advanced search