Go to advanced search

by bulletmark
Sun Apr 20, 2014 10:39 pm
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

how about a script that will allow me to use one button to control both relays. You should really be able to do that yourself because that is just a logic change to the code I already gave you. Here is some code which allows you to define arbitary sequences of outputs + delays for any input pins. S...
by bulletmark
Thu Apr 17, 2014 12:49 am
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

hub wrote:What do you know about small electronic solenoids and why I cant get an accurate reading when I test it.
Not much sorry. I am a software guy.
by bulletmark
Wed Apr 16, 2014 12:55 am
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

If I have a device that uses 12 volts can I hook them to the inputs? You're going to have to educate yourself a little about the electronics. No, you can't feed 12v directly into those inputs. Normally, your external device would provide a dry contact, e.g. normally open, which you would wire pin 1...
by bulletmark
Tue Apr 15, 2014 11:11 pm
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

What if I wanted it to cycle twice? Here is some code which starts a sequence of ON+OFF+ON+OFF[..] pulses for an output pin after an input pin is pressed. It does this asynchronously for all 8 input and output pins. Number of pulses and width of ON and OFF times are configurable. See http://gist.gi...
by bulletmark
Mon Apr 14, 2014 12:52 am
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

ok I think its working now. so, when I run the command listed, I will use python (a new window, not shell) Correct? Also, the first line 1.#!/usr/bin/env python Do I need to include that? Normally you would paste that complete code sample into a file and run it directly from the command line. E.g. ...
by bulletmark
Mon Apr 14, 2014 12:14 am
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

If you are saying that easy_install is missing then do this instead:

Code: Select all

sudo apt-get install python-pip
sudo pip install pifaceio
sudo /usr/local/bin/install-spidev.sh
Then run http://pastebin.com/UMmxWVzF as I said.
by bulletmark
Mon Apr 14, 2014 12:09 am
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

hub wrote: When I try this all I get is command not found. What am I missing?
When you try which line of the 3 I quoted?
by bulletmark
Mon Apr 07, 2014 10:43 pm
Forum: Python
Topic: Pi Face
Replies: 23
Views: 3862

Re: Pi Face

Code: Select all

sudo easy_install pifaceio
sudo install-spidev.sh
Then run this http://pastebin.com/UMmxWVzF
by bulletmark
Fri Mar 21, 2014 5:41 am
Forum: Troubleshooting
Topic: PI Face Not Detected
Replies: 13
Views: 6080

Re: PI Face Not Detected

arifm wrote: where do I find the path for your code?
Did you type the 2 commands I stated?

The first command installs my tiny python package which includes that script in /usr/local/bin (which is normally in a user's default path).
by bulletmark
Thu Mar 20, 2014 11:41 pm
Forum: Troubleshooting
Topic: PI Face Not Detected
Replies: 13
Views: 6080

Re: PI Face Not Detected

You could try my script (from my pifaceio package): sudo easy_install pifaceio sudo install-spidev.sh I have used the piface board for a long time. I remember the older version did not have the 8 surface mount leds, or a jumper to disable relays, etc but I am certain that was only cosmetic hardware ...
by bulletmark
Thu Feb 27, 2014 1:40 am
Forum: Python
Topic: PIface command gone missing
Replies: 1
Views: 463

Re: PIface command gone missing

Consider using my alternative http://github.com/bulletmark/pifaceio.

sudo pip install pifaceio
by bulletmark
Tue Feb 11, 2014 11:47 pm
Forum: Python
Topic: Help: interrupt, time.sleep, while loop
Replies: 3
Views: 1668

Re: Help: interrupt, time.sleep, while loop

Here's an example: http://pastebin.com/0AMETAEX
by bulletmark
Wed Feb 05, 2014 10:12 pm
Forum: Troubleshooting
Topic: Spurious door open/close signals to PiFace
Replies: 9
Views: 1680

Re: Spurious door open/close signals to PiFace

johnmcd wrote:I've been seeing 5-10 spurious ones a day.
So you know it is generating interrupts when there is no change. I suggest there is also a strong chance it is missing interrupts when there is a change.
by bulletmark
Sat Feb 01, 2014 9:56 pm
Forum: Beginners
Topic: PiFace Programming
Replies: 3
Views: 1077

Re: PiFace Programming

but what are the advantages of pifacedigital over piface? also where is the official place to find the instruction/syntax for these modules? The official site for the PiFace board comes up first in a google search. That has plenty of information including links to the github repo and official docum...
by bulletmark
Fri Jan 31, 2014 9:59 pm
Forum: Beginners
Topic: PiFace Programming
Replies: 3
Views: 1077

Re: PiFace Programming

piface was the original python package for the PiFace board but has been superceded by the newer pifacedigitalio package. Obviously you will see plenty of old examples on the net still using the older piface but this is probably not recommended for new code. These are the "official" python packages...
by bulletmark
Fri Jan 31, 2014 4:09 am
Forum: Troubleshooting
Topic: Spurious door open/close signals to PiFace
Replies: 9
Views: 1680

Re: Spurious door open/close signals to PiFace

I don't really see the point of using interrupts for 99% of applications on the raspberry pi. In particular, a home alarm/monitoring system would be simpler and more reliable if you just polled the inputs in a loop every 1/4 sec or so. You (and the person in the other post I quoted) may be seeing a ...
by bulletmark
Thu Jan 30, 2014 10:47 pm
Forum: Troubleshooting
Topic: Spurious door open/close signals to PiFace
Replies: 9
Views: 1680

Re: Spurious door open/close signals to PiFace

If you read all that thread you will see I already said that pull ups are enabled by default. So that's not your problem. Are you using pifacedigitalio? If so, in interrupt, or polled mode?
by bulletmark
Thu Jan 30, 2014 10:33 pm
Forum: Troubleshooting
Topic: Spurious door open/close signals to PiFace
Replies: 9
Views: 1680

Re: Spurious door open/close signals to PiFace

Sounds similar to this post from the last few days? Can you post your code or at least a sample? Are you using pifacedigitalio, with interrupts, or polled?
by bulletmark
Thu Jan 30, 2014 12:37 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: pi-face inputs keep triggering
Replies: 20
Views: 5303

Re: pi-face inputs keep triggering

By default the internal MCP23S17 pull up resistors are enabled for the piface board inputs if are using the standard pifacedigitalio or piface python modules. You only explicitly need to write them off if you have the unusual requirement to have them floating, or you want to use external pull-ups.
by bulletmark
Sun Jan 26, 2014 10:58 pm
Forum: Python
Topic: Python interface to PiFace board
Replies: 0
Views: 427

Python interface to PiFace board

I've created an alternative Python interface pifaceio for the PiFace digital I/O board. See the details and get it at http://github.com/bulletmark/pifaceio, or from pypi using pip. Multiple PiFace boards are supported. The pifaceio package is focussed on simplicity and performance for polled impleme...
by bulletmark
Thu Jan 16, 2014 10:12 pm
Forum: Automation, sensing and robotics
Topic: Piface simple control
Replies: 16
Views: 3181

Re: Piface simple control

I'm using vim with 99>> to shift one tab space to the right and 99<< to go one tab space left. I then convert the tabs to three spaces with %s/^\t/ /g You can do it better Dougie. Use >G to shift all lines to the right and <G to the left (you are instead using the line operator 99 times). To conver...
by bulletmark
Thu Dec 12, 2013 2:43 am
Forum: HATs and other add-ons
Topic: piface GUI button to toggle an LED
Replies: 2
Views: 3245

Re: piface GUI button to toggle an LED

Just realised I misread what you I trying to do. You problem is that read_output() returns the byte of outputs but you need to test the specific pin:

Code: Select all

if pfio.read_output() & (1<<pin):
   ...
Also, you have too much replicated code. If you reply here I will paste a much better and smaller version.
by bulletmark
Tue Dec 10, 2013 10:32 am
Forum: HATs and other add-ons
Topic: Piface Outputs Always Carry 3.7VDC
Replies: 1
Views: 1166

Re: Piface Outputs Always Carry 3.7VDC

That question is actually explained pretty well in the PiFace Gettting Started Guide. See page 6: Output Ports.
by bulletmark
Tue Dec 10, 2013 5:52 am
Forum: HATs and other add-ons
Topic: piface GUI button to toggle an LED
Replies: 2
Views: 3245

Re: piface GUI button to toggle an LED

When you paste code, particularly python code, you need to wrap it in a code tag otherwise it loses it's indentation as in your post. Hard to understand it otherwise. Also, the PiFace board has 8 inputs and 8 separate outputs. Your buttons should be wired to the input pins (or use the 4 PiFace butto...
by bulletmark
Mon Dec 09, 2013 11:16 pm
Forum: General discussion
Topic: PI Face Connect To Alarm Panel Motion Detector
Replies: 7
Views: 3077

Re: PI Face Connect To Alarm Panel Motion Detector

I replaced my home alarm system with a raspberry pi + piface like the OP here. My original plan was to run it as a parallel option to the existing system but when I discovered, like the OP, that the PIR's have EOL resistors in place I decided to simplify the circuitry so I just removed the existing ...

Go to advanced search