Go to advanced search

by drewibbo
Sat Apr 13, 2013 5:59 pm
Forum: Other projects
Topic: Kidpi
Replies: 0
Views: 388

Kidpi

Hello all, Just wanted to share my new tutorial with you all. My seven year old son, Camden, who is a hardened Windows user has made life very difficult for me to introduce him to the Pi. He was really interested in making an LED flick on and off for the best part of 5 minutes and then found out tha...
by drewibbo
Thu Apr 11, 2013 8:05 pm
Forum: General programming discussion
Topic: Bash query regarding if statement...
Replies: 4
Views: 4871

Re: Bash query regarding if statement...

In POSIX shells, word splitting and pathname expansion happen after variable substitution. This is practically never desirable, so you should practically always put double quotes around variable expansions. if [ "$name" = "andy ibbitson" ]; then Without the extra double quotes here, there is a synt...
by drewibbo
Thu Apr 11, 2013 7:39 pm
Forum: General programming discussion
Topic: Bash query regarding if statement...
Replies: 4
Views: 4871

Bash query regarding if statement...

Hi, Probably a really silly question, but I'll ask anyways as I cannot find the answer anywhere! Why does the following script return an error of too many arguments??? read -p "Please enter your name : " name if [ $name = "andy ibbitson" ]; then echo "Well done! You know my name." else echo "Do you ...
by drewibbo
Wed Apr 10, 2013 5:22 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

Please see code below. Also bear in mind that these scripts are never run at the same time. If i run the PIR code, it seems to make the /sys/bus/w1/devices/28-00000495b443/ folder disappear. I then have to re-run a couple of modprobes to get it working again...! Here is the code for my PIR (pir.sh):...
by drewibbo
Wed Apr 10, 2013 12:01 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

Sorry, i foolishly neglected to mention that the PIR is on a separate pin. There should be no conflict...

Andy
by drewibbo
Wed Apr 10, 2013 10:31 am
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

In addition to this I have a one wire temperature sensor connected to 3.3V / GPIO 7 / GND.

I have managed to get the PIR to work with the above information but it then kicks out my temp sensor and they don't work at the same time.

Any reason for this that anyone can think of??? :D
by drewibbo
Tue Apr 09, 2013 5:44 pm
Forum: Automation, sensing and robotics
Topic: Connecting 1-wire temperature sensors to RPi ?
Replies: 11
Views: 16521

Re: Connecting 1-wire temperature sensors to RPi ?

Hi, I have done pretty much the same thing on my website. I have a Pi logging external temperatures that saves to a text file. This is then uploaded to my website and converted into a graph. My tutorial makes use of Cron, FTP, and reading the data from the sensor on a half hour basis. Tutorial: http...
by drewibbo
Mon Apr 01, 2013 7:34 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

Thank you both so much for your help. It looks like you have solved my issue. :D :D :D

Tying the data wire to 3.3V was correct.
Also had to amend the code to read when the PIR state goes LOW, not HIGH.
by drewibbo
Mon Apr 01, 2013 6:41 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

Thanks for the suggestions. When you say tie back to 3.3V, do you literally mean draw power from pin 1 (3.3V) and connect a resistor between the 3.3V and the data wire connected to pin 26??? :D Also, just a quick note. The datasheet states that it only operates from 5V - 12V. I am not getting anythi...
by drewibbo
Mon Apr 01, 2013 4:27 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

I will take a look as soon as I get home. Had to work today... :(

Thanks for your help. I will reply when I've checked it out :)
by drewibbo
Mon Apr 01, 2013 3:42 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

Have you enabled gpio7's internal pull up, or have you tried pulling up the black wire via a resistor to 3.3V? The signal should go low (0) when motion is detected. I have physically attached a resistor between the Red & Black wires... Is this not correct??? Also how would I enable the internal pul...
by drewibbo
Mon Apr 01, 2013 3:03 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Re: Problem getting PIR to work...!

Hi,

Red wire connected to pin 2 (+5V)
Brown wire to GND
Black wire to pin 26 (BCM 7)

Any help would be appreciated thanks :D
by drewibbo
Mon Apr 01, 2013 2:29 pm
Forum: Troubleshooting
Topic: Problem getting PIR to work...!
Replies: 22
Views: 5638

Problem getting PIR to work...!

Hi all, I need help!!! I purchased this PIR from Cool Components: http://www.coolcomponents.co.uk/catalog/infra-motion-sensor-p-312.html . I have followed a couple of tutorials but can't seem to get it working properly. The code I am using is: #!/usr/bin/python import RPi.GPIO as GPIO import time GP...
by drewibbo
Thu Mar 28, 2013 11:55 pm
Forum: Automation, sensing and robotics
Topic: One Wire Temperature Sensor with Cron and FTP
Replies: 0
Views: 1276

One Wire Temperature Sensor with Cron and FTP

Hi all, Just a link to my, new-and-by-no-means-decent-looking website. I have further developed Matthew Kirks (Cambridge Uni) tutorial on rigging up a One Wire Temperature Sensor to the Raspberry Pi. It describes how to include cronjobs and then ftp the lot to your website for processing into a grap...
by drewibbo
Wed Feb 27, 2013 11:04 pm
Forum: Other projects
Topic: Light Photography with the Pi
Replies: 2
Views: 488

Re: Light Photography with the Pi

I have expanded on this and have produced a long exposure text-reel from this (see photo):
P1060768.jpg
P1060768.jpg (55.24 KiB) Viewed 448 times
It is a very long code (need to reduce it), but can create an text that I want. :)
by drewibbo
Tue Feb 26, 2013 12:45 pm
Forum: Other projects
Topic: Light Photography with the Pi
Replies: 2
Views: 488

Light Photography with the Pi

Hi all, Just wanted to share my little project with you. I am a keen long exposure light photographer and wanted to incorporate my Pi into my work as it can be mobile and can easily control LED's. I am a complete beginner and was easily able to program the Pi to light up some LED's in a basic way (I...

Go to advanced search