Go to advanced search

by PiGraham
Thu Jul 25, 2013 8:12 pm
Forum: Python
Topic: Multiple GPIO.add_event_detect, one callback function
Replies: 18
Views: 41951

Re: Multiple GPIO.add_event_detect, one callback function

I have several lever switches that represent scores. I want a single callback function when pressed that acts on the value of that lever. I have this working except it seems to call the function twice, I think I'm failing to understand callback functions correctly. GPIO.setmode(GPIO.BCM) GPIO.setup...
by PiGraham
Wed Jul 24, 2013 10:55 pm
Forum: Python
Topic: Multiple GPIO.add_event_detect, one callback function
Replies: 18
Views: 41951

Re: Multiple GPIO.add_event_detect, one callback function

Maybe your switches bounce. Is it any different if you double the bounce value, or double it again?
by PiGraham
Tue Jul 23, 2013 5:38 pm
Forum: Troubleshooting
Topic: RPi GPIO
Replies: 14
Views: 2427

Re: RPi GPIO

am working in the LX terminal and when I type in "sudo python", python is highlighted in red and the error is "syntaxError: invalid syntax" That sounds like you are already running the python interpreter. It will respond "SyntaxError: invalid syntax" and other stuff, if you type "sudo python". The ...
by PiGraham
Tue Jul 23, 2013 1:55 pm
Forum: Troubleshooting
Topic: RPi GPIO
Replies: 14
Views: 2427

Re: RPi GPIO

I have just flashed "noobs" onto a new SD card and eveyrthing seems OK but I cannot use GPIO. I believe there is a library somewhere, but when I type import RPi.GPIO as GPIO it shows an error. Does noobs or raspian have this library installed or do I have to do it and if so, how? Many thanks mikado...
by PiGraham
Tue Jul 23, 2013 1:18 pm
Forum: General discussion
Topic: Return to command line
Replies: 6
Views: 4853

Re: Return to command line

Does quit() work?
by PiGraham
Tue Jul 23, 2013 6:29 am
Forum: Python
Topic: 'Live' display of file
Replies: 5
Views: 1538

Re: 'Live' display of file

Take a look at

http://pyinotify.sourceforge.net/

Or look up inotify.

Then, when your program is notified of a change to the file it can re-read the file and update the display.
by PiGraham
Mon Jul 22, 2013 5:08 pm
Forum: User groups and events
Topic: Portsmouth Jam 27th July?
Replies: 37
Views: 12908

Re: Portsmouth Jam 27th July?

GordonFreeman wrote:Ill be there, anything I can do to help? Please let me know. (I've have been waiting for something like this in this area for a long time, long over due :D )
Excellent!

I sent you a PM

Have you registered on eventbrite?
by PiGraham
Mon Jul 22, 2013 5:04 pm
Forum: Automation, sensing and robotics
Topic: Chicken Egg Detector
Replies: 26
Views: 7520

Re: Chicken Egg Detector

Sorry, I can't help you with that, but you may get some leads here:
http://stackoverflow.com/questions/8921 ... -in-python

Or Google https://www.google.co.uk/search?q=linux+sound+detector
by PiGraham
Mon Jul 22, 2013 1:53 pm
Forum: Automation, sensing and robotics
Topic: How do you deal with wires?
Replies: 5
Views: 3201

Re: How do you deal with wires?

I expect you could interface RasPi to off-the-shelf wireless door sensors if you get a 433MHz radio module and work out the protocol.

Domething like this
Or similar from Yale etc.
by PiGraham
Mon Jul 22, 2013 1:46 pm
Forum: Gaming
Topic: How could someone create a controller to use with Pi?
Replies: 9
Views: 1614

Re: How could someone create a controller to use with Pi?

...Or... get a wireless X-Box controller and plug that in.
http://forum.stmlabs.com/showthread.php?tid=8659
by PiGraham
Mon Jul 22, 2013 12:55 pm
Forum: Gaming
Topic: How could someone create a controller to use with Pi?
Replies: 9
Views: 1614

Re: How could someone create a controller to use with Pi?

Get a wireless keyboard and wire buttons in place of the key matrix.Just wire up as many buttons/keys as you need.
by PiGraham
Mon Jul 22, 2013 10:02 am
Forum: Automation, sensing and robotics
Topic: IR beam break sensor for vehicle counting
Replies: 5
Views: 3488

Re: IR beam break sensor for vehicle counting

What are the regulatory and liability issues with fixing a hose to the highway? I'd be concerned about installing anything that breaks the road surface or contacts vehicles.
by PiGraham
Mon Jul 22, 2013 9:39 am
Forum: Automation, sensing and robotics
Topic: Chicken Egg Detector
Replies: 26
Views: 7520

Re: Chicken Egg Detector

Could you feed the chickens with a mix of seeds and RFIDs, and then you'll get eggs with RFIDs built in. Unfortunately you won't be able to distinguish them from chickens... Seriously though... Methinks an infrared camera would work best, with a motion detection algorithm to find hotspots that cool...
by PiGraham
Mon Jul 22, 2013 9:36 am
Forum: Automation, sensing and robotics
Topic: Chicken Egg Detector
Replies: 26
Views: 7520

Re: Chicken Egg Detector

I'm not experienced in electronics at all so I don't know much about that. I was hoping for more of a simple plug into the USB for cheap and use it in a python script. You can use USB for sound-in. Cheap Webcam with mic USB headset USB microphone. The ones I've see are for high quality vocals and p...
by PiGraham
Sun Jul 21, 2013 9:06 pm
Forum: For sale
Topic: 2.8" TFT + Touch Shield Board
Replies: 206
Views: 93764

Re: 2.8" TFT + Touch Shield Board

I'll be taking my 2.8" TFT + Touch Shield Board to the Portsmouth Raspberry Jam next Saturday (27th), if anyone local wants to try before buying (but just buy it anyway!)
by PiGraham
Sun Jul 21, 2013 8:50 pm
Forum: General discussion
Topic: Connect a Raspberry Pi GPIO to another Pi GPIO?
Replies: 9
Views: 10190

Re: Connect a Raspberry Pi GPIO to another Pi GPIO?

Yes, that will work, but make the connections via resistors to protect the Pis in case connected pins should ever be configured as outputs of opposite state (high on one side fighting low on the other), and don't connect the 5V or 3.3V pints across. Of course you can get two Pis to talk to each othe...
by PiGraham
Sun Jul 21, 2013 12:52 pm
Forum: C/C++
Topic: writing to terminal with variable
Replies: 3
Views: 895

Re: writing to terminal with variable

I am writing small program to control servo via gyro and I am stuck... what I would like do: - for loop who be writing to terminal and executing command with some variable for example I write in shell script what I mean: #!bin/bash for i in {1..10} do echo "write $i times" done and it working fine....
by PiGraham
Sat Jul 20, 2013 1:34 pm
Forum: User groups and events
Topic: Portsmouth Jam 27th July?
Replies: 37
Views: 12908

Re: Portsmouth Jam 27th July!

Here's an outline of things I hope to have at the Portsmouth Jam Demos Texy's 2.8 TFT LCD display module showing vido @23+fps and basic graphical touchscreen interface with pygame. PiFace digital in a nice read PiFace case from Farnell. Pi powered photobooth, with gphoto2 controlling a Canon G3 comp...
by PiGraham
Fri Jul 19, 2013 11:30 am
Forum: Automation, sensing and robotics
Topic: Chicken Egg Detector
Replies: 26
Views: 7520

Re: Chicken Egg Detector

I've been thinking about making a eggs sensor myself. I will use a capacity sensor that made to detect soil humidity. Basically it consists of two small metal plates side to side (laying flat on surface) without making contact. You charge one with 5v or 3.3, whatever, the other is ground. Next you ...
by PiGraham
Fri Jul 19, 2013 11:10 am
Forum: For sale
Topic: 1.8" TFT LCD Shield board v2
Replies: 101
Views: 40941

Re: 1.8" TFT LCD Shield board v2

texy wrote:I have used a 150mm cable, but that is not the issue. In order to use an extension, you need to make sure the wiring of the cable is correct - a pin to pin cable will not work - it needs to swap pin 1 to pin 2, etc
Texy
That's only 13 pair twists on the ribbon. ;)
by PiGraham
Fri Jul 19, 2013 10:45 am
Forum: Other projects
Topic: How to wifi communicate between RPis
Replies: 18
Views: 26872

Re: How to wifi communicate between RPis

You're welcome. You could do the GPIO in on Pi T to control GPIO out on Pi L with bash scripts using ssh. See here http://stackoverflow.com/questions/1895185/how-to-ssh-from-within-a-bash-script Or you could write some networking code to exchange UDP packets when inputs change. You can setup callbac...
by PiGraham
Fri Jul 19, 2013 9:23 am
Forum: Other projects
Topic: How to wifi communicate between RPis
Replies: 18
Views: 26872

Re: How to wifi communicate between RPis

In addition, all wireless adapters on the ad-hoc network must use the same SSID and the same channel number. Okey dokey, I'll set them both to use the PiAdHoc network then. EDIT: WAHEY! It works! I can ping! I've also managed to ssh in, so the main aim is complete. Thank you so much for all of your...
by PiGraham
Fri Jul 19, 2013 8:55 am
Forum: Other projects
Topic: How to wifi communicate between RPis
Replies: 18
Views: 26872

Re: How to wifi communicate between RPis

theoB610 wrote: Currently both have their own adhoc network - TuringPiAdHoc and LorenzPiAdHoc respectively
The network is the shared connection between them. Set both to use the same SSID so that they are on the same network.

Go to advanced search