Go to advanced search

by Anthonyfromtheuk
Thu Jan 08, 2015 9:47 am
Forum: Python
Topic: Outputting temperature sensor data to LCD
Replies: 4
Views: 2025

Re: Outputting temperature sensor data to LCD

it wasn't \n it was me putting a letter C after lcd.message(' Temp: %s C' % (temp)) my lack of knowledge made me think it would show after Temp:%s but it doesn't. Not sure why the code I pasted here didn't have that letter C in it that would of made it obvious to myself. I will try your suggested wa...
by Anthonyfromtheuk
Wed Jan 07, 2015 12:52 pm
Forum: Python
Topic: Outputting temperature sensor data to LCD
Replies: 4
Views: 2025

Outputting temperature sensor data to LCD

I have a LCD screen with which I want to output a temperature reading. The script which outputs the temperature just gives a numerical reading for example 21.3. When I try and run this code below to display that output on my LCD screen I always get a letter C at the front of the output on the LCD. C...
by Anthonyfromtheuk
Sun Jun 15, 2014 4:58 pm
Forum: Python
Topic: Temperature sensor and MySQL
Replies: 3
Views: 3086

Re: Temperature sensor and MySQL

I got it working with this: curs.execute ("""INSERT INTO tablename values(CURRENT_DATE(), NOW(), 'Place',"%s")""",finaloutput) I say working, its sort of working it puts the data in the column with Single quotations around it for example '21.6' -------------- Edit removing the quotations around %s g...
by Anthonyfromtheuk
Sun Jun 15, 2014 3:57 pm
Forum: Python
Topic: Temperature sensor and MySQL
Replies: 3
Views: 3086

Temperature sensor and MySQL

I have a bit of python code that prints on screen the current temperature detected by a ds18b20 sensor. Here is the end of the code detecting the temperature from the sensor, that bit works and it prints the current temperature on the screen, but i get an error when trying to insert in to MySQL. out...
by Anthonyfromtheuk
Mon Apr 21, 2014 6:00 pm
Forum: Python
Topic: make script loop
Replies: 7
Views: 991

Re: make script loop

That seems useful, I intend to have this running as a background process from startup so I will have to figure out how to use that wait_for_edge Your program would be much better if it used GPIO.wait_for_edge() rather than polling. A full explanation is here: https://sourceforge.net/p/raspberry-gpio...
by Anthonyfromtheuk
Mon Apr 21, 2014 5:58 pm
Forum: Python
Topic: make script loop
Replies: 7
Views: 991

Re: make script loop

It is to detect overflow of an aquaponic grow bed.
paddyg wrote:Anthony, good. I hope the water being detected isn't anything catastrophic such as flood water entering your front door. Or if it is, that you never get that text message.
by Anthonyfromtheuk
Mon Apr 21, 2014 5:57 pm
Forum: Python
Topic: make script loop
Replies: 7
Views: 991

Re: make script loop

I will check it out, didn't really think about it taxing the processor. Its all new to me! but good fun none the less when its working! :)
by Anthonyfromtheuk
Mon Apr 21, 2014 4:08 pm
Forum: Python
Topic: make script loop
Replies: 7
Views: 991

Re: make script loop

Got it working the way I want :D now i can just run it once and if water is detected i will get a text message #!/usr/bin/env python import os, glob, time, sys, smtplib from email.mime.text import MIMEText from time import sleep import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23,...
by Anthonyfromtheuk
Mon Apr 21, 2014 3:44 pm
Forum: Python
Topic: make script loop
Replies: 7
Views: 991

make script loop

I have this #!/usr/bin/env python from time import sleep import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) state = GPIO.input(23) if (state is False): print "Water detected!" else: print "Water not detected" Hope this makes sense...What I would like is for "else" to ma...
by Anthonyfromtheuk
Mon Apr 21, 2014 3:10 pm
Forum: Automation, sensing and robotics
Topic: Using rain sensor?
Replies: 12
Views: 18593

Re: Using rain sensor?

Got this working, thanks for your reply

Code: Select all

#!/usr/bin/env python

from time import sleep
import os
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN)
state = GPIO.input(23)

if (state == 0):
    print "Water detected!"
else:
    print "Water not detected"
by Anthonyfromtheuk
Mon Apr 21, 2014 12:01 pm
Forum: Automation, sensing and robotics
Topic: Using rain sensor?
Replies: 12
Views: 18593

Using rain sensor?

Hello, I purchased this rain sensor from ebay http://i.ebayimg.com/t/Rain-Water-Sensor-Module-for-Arduino-Raspberry-Pi-/00/s/MTAxMFgxMDEw/z/qSQAAMXQSbtSNH61/$(KGrHqF,!nUFIjRYl4!cBSNH61Z-D!~~60_12.JPG http://www.ebay.co.uk/itm/Rain-Water-Sensor-Module-for-Arduino-Raspberry-Pi-/131066348493?pt=UK_BOI_...
by Anthonyfromtheuk
Fri Apr 18, 2014 4:12 pm
Forum: Python
Topic: tweeting DS18B20 sensor data
Replies: 7
Views: 1975

Re: tweeting DS18B20 sensor data

Got it working! Thanks for all the replies, especially DougieLawson. even though you didnt answer my question directly you did make me realise what I was doing wrong. I didn't realise MIME didn't read variables. Also previously posted code wasn't giving out the output I even wanted. I had to chop th...
by Anthonyfromtheuk
Fri Apr 18, 2014 2:16 pm
Forum: Python
Topic: tweeting DS18B20 sensor data
Replies: 7
Views: 1975

Re: tweeting DS18B20 sensor data

Got the raspberry pi to tweet its own temperature now i am trying to use this code to tweet the sensor data #!/usr/bin/env python import os, glob, time, sys, datetime, smtplib from email.mime.text import MIMEText #initiate the temperature sensor os.system('modprobe w1-gpio') os.system('modprobe w1-t...
by Anthonyfromtheuk
Fri Apr 18, 2014 11:32 am
Forum: Python
Topic: tweeting DS18B20 sensor data
Replies: 7
Views: 1975

Re: tweeting DS18B20 sensor data

I got the original twitter thing I was using "fixed" sorted the indentation and added import os, just unfortunately Googles not liking my username and password. I ripped some code from a different source which is not fully working in the manner I want but I think it shows more what I am trying to do...
by Anthonyfromtheuk
Thu Apr 17, 2014 9:20 pm
Forum: Networking and servers
Topic: Setting up home server
Replies: 7
Views: 2895

Re: Setting up home server

thanks for all the replies!
I got this working using no-ip.org
by Anthonyfromtheuk
Thu Apr 17, 2014 9:18 pm
Forum: Python
Topic: tweeting DS18B20 sensor data
Replies: 7
Views: 1975

tweeting DS18B20 sensor data

SOLVED DOWN BELOW :lol: Hello, I am trying to get my raspberry pi to tweet sensor data. I have searched for this but all i get is tweet your raspberries temperature nothing about using sensors. I came across this code from http://www.averagemanvsraspberrypi.com/2013/09/make-your-raspberry-pi-tweet-...
by Anthonyfromtheuk
Sat Mar 29, 2014 3:37 pm
Forum: Networking and servers
Topic: Setting up home server
Replies: 7
Views: 2895

Setting up home server

I am brand new to this whole raspberry pi linux thing hopefully that doesn't make you not want to assist me. I have installed all files i need for a home server on my pi and when i connect via my pis ip address i get the webpage i expect showing up. how do i now make this available to others outside...

Go to advanced search