Go to advanced search

by bulletmark
Sat Dec 07, 2013 10:36 pm
Forum: Automation, sensing and robotics
Topic: Controlling a stepper motor with Piface and python
Replies: 14
Views: 21247

Re: Controlling a stepper motor with Piface and python

Get rid of the semi-colons also, that is not python.
by bulletmark
Sat Dec 07, 2013 7:36 am
Forum: Beginners
Topic: Can I use Pi to remotely control a RC car?
Replies: 7
Views: 2304

Re: Can I use Pi to remotely control a RC car?

I built an RC tank: http://raspberrywebserver.com/gpio/piface/building-a-remote-control-vehicle-using-a-raspberry-pi.html . I installed Apache and wrote some simple scripts to turn the motors on and off. I used a Pi Face board to control the motors. I'm interested that your signature points off to ...
by bulletmark
Sat Dec 07, 2013 7:31 am
Forum: Troubleshooting
Topic: PiFace With a fried RPi GPIO pin
Replies: 2
Views: 737

Re: PiFace With a fried RPi GPIO pin

The PiFace has nothing to do with the GPIO pins, it is driven independently via the SPI bus.

So (I think) it should work fine, subject to the board not being damaged beyond just the GPIO pins.
by bulletmark
Mon Nov 04, 2013 10:19 pm
Forum: Beginners
Topic: Problems Installing GPIO Python Library
Replies: 4
Views: 1282

Re: Problems Installing GPIO Python Library

Just looks like you need to do a "apt-get install python-dev".
by bulletmark
Fri Sep 20, 2013 5:25 am
Forum: General discussion
Topic: Is there a way to set up a Pi without using a monitor?
Replies: 10
Views: 1898

Re: Is there a way to set up a Pi without using a monitor?

I thought Raspbian's SSH is default to off, I had to use raspi-config to enable it. The ssh server (sshd) is enabled by default in raspbian. I also have noticed that raspi-config is flawed because regardless of whether the ssh server is enabled or not, it always defaults to select "Enable" which ma...
by bulletmark
Fri Sep 20, 2013 3:05 am
Forum: General discussion
Topic: Is there a way to set up a Pi without using a monitor?
Replies: 10
Views: 1898

Re: Is there a way to set up a Pi without using a monitor?

I want to set up a new SD card for my Pi, but I don't have a display device for Pi. .. So is it possible to set up a new SD card only using a laptop and a headless Pi? Just create a raspbian image on SD card using your laptop in the normal way, boot the pi off it, and then ssh in and configure it h...
by bulletmark
Fri Jul 12, 2013 10:23 am
Forum: C/C++
Topic: How do I use the PiFace C Library?
Replies: 6
Views: 4224

Re: How do I use the PiFace C Library?

That's actually a bug in the piface include file. Please tell me which github repo you were using and I will raise a bug there.
by bulletmark
Wed Jun 26, 2013 11:50 pm
Forum: General discussion
Topic: PiFace Problem: "ImportError: No Module named piface.pfio"
Replies: 6
Views: 2226

Re: PiFace Problem: "ImportError: No Module named piface.pfi

WebPi wrote:I worked it out. The mistake I was making was calling my script piface.py.
That is actually a common classic python mistake. One of us here should have thought of that!
by bulletmark
Fri Jun 14, 2013 12:09 am
Forum: General discussion
Topic: Piface
Replies: 8
Views: 7050

Re: Piface

You post is hard to read because most of it seems to be from the Farnell installation document. Your own words are not delineated. The error reported is about missing /dev/spidev0.0. Do a "ls -l /dev/spi*" to see if it exists. If it doesn't then you have not followed the instructions to remove the b...
by bulletmark
Thu May 23, 2013 10:28 pm
Forum: Automation, sensing and robotics
Topic: Programming for PiFace to support relay monitoring & I/O R/W
Replies: 16
Views: 8419

Re: Programming for PiFace to support relay monitoring & I/O

Using ssh here is just the wrong way to go. I would stick completely with python as it just easier to code and I would use python + piface module instead of the gpio comment line utility. Given that, you could use the standard python multiprocessing module with managers on each RPi node. However, I ...
by bulletmark
Sun May 19, 2013 11:07 pm
Forum: Automation, sensing and robotics
Topic: Programming for PiFace to support relay monitoring & I/O R/W
Replies: 16
Views: 8419

Re: Programming for PiFace to support relay monitoring & I/O

Before you do anything else please note that the Piface is a 3.3v device on the input side. If you're sending it a 5v signal, then there is a good chance that you'll break it. Gordon, if you look at the very last page of the PiFace Operating Manual you will see the inputs are shown schematically as...
by bulletmark
Sat May 11, 2013 10:33 pm
Forum: Automation, sensing and robotics
Topic: Extend current security alarm system
Replies: 3
Views: 1952

Re: Extend current security alarm system

I think that would be ok.
by bulletmark
Fri May 10, 2013 8:22 am
Forum: Automation, sensing and robotics
Topic: Extend current security alarm system
Replies: 3
Views: 1952

Re: Extend current security alarm system

I've essentially done the same thing very recently with my piface. Had originally planned to wire the PIR contacts in parallel to my RPi+PiFace and my existing system but I discovered the PIRs had line end resistors in series with the NC contacts so I decided to completely rip out the existing syste...
by bulletmark
Thu Apr 25, 2013 1:56 am
Forum: HATs and other add-ons
Topic: PiFace - Reading Outputs
Replies: 10
Views: 6222

Re: PiFace - Reading Outputs

I could write a daemon that does all the pfio work and accepts read/update requests via a queue of some sort That's how you should do it. Best to manage a hardware interface from one process. You could have the main process manage the piface and farm off work to child processes using the standard p...
by bulletmark
Sat Apr 20, 2013 7:26 am
Forum: Python
Topic: programing a pi-face board
Replies: 5
Views: 3757

Re: programing a pi-face board

Just some more misc feedback about your code. You have that block of for loop code in 2 places. You should put it in a function at the top: def flash_leds(): global count, active for leds in leds: pfio.digital_write(led,1) sleep(0.3) pfio.digital_write(led,0) count = 0 active = 0 Then just call flas...
by bulletmark
Thu Apr 18, 2013 10:36 pm
Forum: Python
Topic: programing a pi-face board
Replies: 5
Views: 3757

Re: programing a pi-face board

Tip, don't hard-code that list of leds twice. Do something like:

Code: Select all

leds = (5,2,1,6,7,3,4,0)
...
for led in leds:
    <do something with led>
Note I defined leds as a tuple rather than a list because it is *slightly* more machine efficient.
by bulletmark
Tue Apr 16, 2013 11:00 pm
Forum: Python
Topic: programing a pi-face board
Replies: 5
Views: 3757

Re: programing a pi-face board

Not sure what you are after but to generate a random list of 8 leds and then flash them on and off in sequence:

Code: Select all

import random, time
for led in random.sample(range(8), 8):
    pfio.digital_write(led, 1)
    time.sleep(0.1)
    pfio.digital_write(led, 0)
by bulletmark
Thu Mar 28, 2013 12:02 pm
Forum: Python
Topic: net IO app
Replies: 3
Views: 1208

Re: net IO app

Here's a slightly better version which is completely data driven: http://pastebin.com/jEQeZsfL.

Also note that you were instantiating temporary LED() objects every write. To just write a specific pin, it is more efficient to just use the piface digital_write() function.
by bulletmark
Thu Mar 28, 2013 1:25 am
Forum: Python
Topic: net IO app
Replies: 3
Views: 1208

Re: net IO app

I don't know what that Net IO app is but it probably opens and closes the socket connection for everything sent so your app is breaking out of the loop. You need to have a loop around the accept() to wait for connections. As for the code, I would suggest a few minor design changes, e.g. http://paste...
by bulletmark
Thu Feb 21, 2013 9:19 am
Forum: Beginners
Topic: Is broadcasting SSID mandatory?
Replies: 22
Views: 18440

Re: Is broadcasting SSID mandatory?

I recommend that my customers, friends, etc not broadcast their wireless network SSID for security reasons. Many years ago, this was a touted security "meme" which most people followed. However it makes little difference to security and is just plain inconvenient for setup and diagnosis etc, so tha...
by bulletmark
Thu Feb 21, 2013 9:12 am
Forum: Beginners
Topic: Initial boot without a keyboard?
Replies: 4
Views: 911

Re: Initial boot without a keyboard?

I have never plugged a keyboard or screen into my 2 raspberry pi's. Put the SD card, boot it up, then log in using ssh over the network (e.g. use PuTTY from a windows pc). Look at the DHCP server page on your home router to see the IP address given to the pi.
by bulletmark
Fri Feb 15, 2013 10:49 pm
Forum: HATs and other add-ons
Topic: PiFace
Replies: 7
Views: 10711

Re: PiFace

I may try their distribution.... Don't do that. I think it is poor that piface recommends installing it's own image. Stay with Raspbian as it has everything needed from the OS anyhow. I received my piface board just recently and got it working with just: sudo apt-get install python-dev git git clon...
by bulletmark
Mon Jan 21, 2013 1:30 pm
Forum: General programming discussion
Topic: De-activate GPIO pin / channel
Replies: 9
Views: 4435

Re: De-activate GPIO pin / channel

That warning is a bug in RPi.gpio. See https://code.google.com/p/raspberry-gpio-python/issues/detail?id=16. I have just started playing with the GPIO on my pi and so I started with Rpi.GPIO as it seems to be the default choice. However, it seems to be unsupported since Sep 2012. None of the edge tri...
by bulletmark
Mon Jan 21, 2013 1:10 am
Forum: General discussion
Topic: RPi in Australia
Replies: 5
Views: 1001

Re: RPi in Australia

mongrol wrote:I'm in Brisbane and my Pi is operating fine in a non-airconned room.
Also is Brisbane and have 2 pi's running 24x7 in non-aircon rooms. Has been damn hot here but the pi's have been happy.
by bulletmark
Sun Jan 20, 2013 12:10 am
Forum: General discussion
Topic: Your favorite console based applications...
Replies: 25
Views: 12232

Re: Your favorite console based applications...

Just quickly ...

- tmux has superseded screen.
- most has superseded less.
- htop has superseded top.
- You gotta know about aptitude. A little cryptic to learn the curses gui/advanced features but worth it.

Go to advanced search