Go to advanced search

by RogerW
Tue May 12, 2015 9:07 am
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

Re: USB SD card reader

Got my new SD card and followed your advice. Now working - thanks very much. For the benefit of anyone doing the same thing the rasbian image file is big - 3.2Gb so it will not fit on an 8Gb card that already has a working system on it. I used a USB stick to hold the image file. I then found the sti...
by RogerW
Tue May 12, 2015 8:52 am
Forum: Python
Topic: Error from pigpio.spi_close()
Replies: 13
Views: 1818

Error from pigpio.spi_close()

I am tryng to create a class to access an MCP3008 ADC and am getting a strange error when closing the spi handle. I have cut down the code to the following. import pigpio as pg pi = pg.pi() class ADC(): def __init__(self): self.handle = pi.spi_open(0,50000,0) def __del__(self): pi.spi_close(self.han...
by RogerW
Thu May 07, 2015 11:30 am
Forum: Python
Topic: Simple graphics for beginner
Replies: 6
Views: 1676

Re: Simple graphics for beginner

I have not used it myself but you might look at pygame.
http://www.pygame.org/news.html

Its not installed by default but no doubt someone here can advise.

Roger Woollett
by RogerW
Wed May 06, 2015 5:00 pm
Forum: Off topic discussion
Topic: Keeping notes and development snippets
Replies: 13
Views: 2254

Re: Keeping notes and development snippets

Douglas6 wrote:Who remembers those printed paper pads, laid out like Hollerith cards? My first Fortran programs were (literally) handwritten.
I have a Fortran coding pad in front of me as I type. :)

Roger Woollett
by RogerW
Wed May 06, 2015 8:41 am
Forum: Raspbian
Topic: Turn off LED when it is safe to remove power
Replies: 3
Views: 1387

Re: Turn off LED when it is safe to remove power

This seems to work on a B+. Attach an LED to a GPIO pin via a resistor (I used pin 16 - GPIO 23). Turn the pin on and leave it on. When the pi is shutdown power is removed from the GPIOs and the light goes off. This is the python code I used, import RPi.GPIO as p pin = 16 p.setmode(p.BOARD) p.setup(...
by RogerW
Tue May 05, 2015 4:20 pm
Forum: Beginners
Topic: 2 Model B cluster power supply via GPIO
Replies: 14
Views: 3120

Re: 2 Model B cluster power supply via GPIO

Roger, yes, I am using pin2 to input 5V. But it has been working well for most of the pi. I actually did not know pin2 is meant for *output* 5V? If so, what does that mean? I am actually just seeking an easy and safe way to light up the PIs. What would be the pins normally people use for providing ...
by RogerW
Tue May 05, 2015 3:55 pm
Forum: Beginners
Topic: 2 Model B cluster power supply via GPIO
Replies: 14
Views: 3120

Re: 2 Model B cluster power supply via GPIO

You are using pin 2 as 5v input. My assumption was that the GPIO power pins were intended for output. Does using them as input bypass the fuse?

Roger Woollett
by RogerW
Tue May 05, 2015 1:08 pm
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

Re: USB SD card reader

Thanks very much. I think I now understand enough to be able to follow the instructions in the documentation on this site.

Roger Woollett
by RogerW
Tue May 05, 2015 11:32 am
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

Re: USB SD card reader

Many thanks for that.

I am about to order some new cards - the one I have been playing with is only 4GB so a real life experiment will have to wait. Do I have to format the card in addition to dd or does that do it for me?

Roger Woollett
by RogerW
Tue May 05, 2015 11:14 am
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

Re: USB SD card reader

RaTTuS wrote:sudo fdisk -l
will list the devices
the adapter will probably be /dev/sda
you need to unmount the /dev/sda[1-9] devices
sudo umount /dev/sda[1] [etc]
That bit seems to work.

Could you explain
sudo dd if=/full/path/to/raspbain.img of=/dev/sda bs=64M conv=sync,noerror

Many thanks
Roger Woollett
by RogerW
Tue May 05, 2015 9:54 am
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

Re: USB SD card reader

I would actually like to create a pure Rasbian OS (not noobs). Part of the exercise is to better understand Linux file systems. Following your link the first step is to run dh -h. This does not appear to show my card device. One of my concerns is to make sure I am formating the card in the reader - ...
by RogerW
Tue May 05, 2015 9:16 am
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

Re: USB SD card reader

That's encouraging. I am a beginner with Linux - could you give me some pointers.
The files appear in /media. I am aware that mounting file systems seems to be important but do not fully understand. Could someone guide me how to format a card please.

Roger Woollett
by RogerW
Tue May 05, 2015 8:31 am
Forum: Beginners
Topic: USB SD card reader
Replies: 11
Views: 1265

USB SD card reader

I have a cheap USB SD card reader. If I plug it into the pi I can read files from it so there seems to be basic driver support. All the instructions I have read for creating a new OS card use another machine. My question is can I use this reader to: 1) format a card. 2) install Rasbian on it. 3) bac...
by RogerW
Mon May 04, 2015 3:37 pm
Forum: Beginners
Topic: Which programming language?
Replies: 4
Views: 933

Re: Which programming language?

I suggest you stick with Python, at least until you find a good reason not to. It is well supported with import libraries and GUI programming is easy and quick using tkinter. My preference would be for the newer python 3 although there are still some imports stuck on the older version 2.7 The standa...
by RogerW
Thu Apr 30, 2015 2:06 pm
Forum: Networking and servers
Topic: Using a USB Hub to Power a Pi Server Farm
Replies: 4
Views: 785

Re: Using a USB Hub to Power a Pi Server Farm

It would not be too difficult to make one up. 5V power supplies up to 100W are available - this one is 60 http://cpc.farnell.com/stontronics/pd-60-5/power-supply-enclosed-5v-60w/dp/PW03535 plus some connectors http://cpc.farnell.com/multicomp/mc32594/socket-usb-pcb-r-a-type-a-double/dp/CN15420 Roger...
by RogerW
Wed Apr 29, 2015 5:24 pm
Forum: HATs and other add-ons
Topic: [solved] any UK supplier of the M2.5 11mm spacers?
Replies: 4
Views: 1736

Re: any UK supplier of the M2.5 11mm spacers?

Are these any good?
http://www.hobbytronics.co.uk/hardware/ ... 15mm-round

They do other sizes.

Roger Woollett
by RogerW
Tue Apr 28, 2015 2:19 pm
Forum: Raspbian
Topic: rapid GPIO read hangs Pi, no error output
Replies: 45
Views: 6325

Re: rapid GPIO read hangs Pi, no error output

After 3 hours I got to cycle 379291.

I don't think this is going to help much. It now seems to me that garbage collection is unlikely to be the problem.

Roger Woollett
by RogerW
Tue Apr 28, 2015 11:19 am
Forum: Raspbian
Topic: rapid GPIO read hangs Pi, no error output
Replies: 45
Views: 6325

Re: rapid GPIO read hangs Pi, no error output

However I've seen the Pi2 fail at 3,137,562. Did you get anywhere near that many loops? The B+ is perhaps 3-4 times slower than the Pi2. I am afraid I did not check. Just started it again. Incidentally I am using python 3 - it may be different under python 2. Even if it fails I am not sure what it ...
by RogerW
Tue Apr 28, 2015 10:35 am
Forum: Raspbian
Topic: rapid GPIO read hangs Pi, no error output
Replies: 45
Views: 6325

Re: rapid GPIO read hangs Pi, no error output

Still cannot reproduce the error - ran for two and a half hours.

Roger Woollett
by RogerW
Mon Apr 27, 2015 4:49 pm
Forum: Raspbian
Topic: rapid GPIO read hangs Pi, no error output
Replies: 45
Views: 6325

Re: rapid GPIO read hangs Pi, no error output

I have been trying to reproduce the problem by running the code as originally posted. Run from the command line it is still going after 15 mins. Also tried it in a command window in the GUI - no hangs.

I have a Pi B+, are you using Pi2s?

Roger Woollett
by RogerW
Mon Apr 27, 2015 8:34 am
Forum: Raspbian
Topic: rapid GPIO read hangs Pi, no error output
Replies: 45
Views: 6325

Re: rapid GPIO read hangs Pi, no error output

It looks to me like a garbage collection problem. You have a "while True" loop which contains a number of print(a+b+c) statements. Python will have to create a temporary variable to contain a+b+c. Because you have a tight CPU loop the garbage collector may not be able to get in to clear up. Does it ...
by RogerW
Tue Apr 21, 2015 1:38 pm
Forum: Automation, sensing and robotics
Topic: Power on / off button
Replies: 4
Views: 718

Re: Power on / off button

If you set one of the GPIO pins high it looks as if it will stay that way until the processor halts. You could use that to control a relay. This is based on one test - maybe someone can give more detail.

Roger Woollett
by RogerW
Tue Apr 21, 2015 9:39 am
Forum: Advanced users
Topic: Refrigeration Controls
Replies: 5
Views: 1916

Re: Refrigeration Controls

I don't have any direct experience but how about sockets? The server would need a fixed IP address and each slave could connect every x minutes to send data and request new settings. You might have some firewall issues but I imagine these could be overcome. I don't know what language you propose but...
by RogerW
Mon Apr 20, 2015 8:03 pm
Forum: Python
Topic: Another GPIO monitor
Replies: 0
Views: 1186

Another GPIO monitor

I have written a program to monitor the state of the GPIO pins. It is written in python and uses the pigpio library. It can run on the host raspberry pi or another machine on the network. It will run under python 2 or python 3. Most of the testing has been done on a PC running Vista and python 3.4.2...
by RogerW
Wed Apr 15, 2015 5:40 pm
Forum: Python
Topic: Python/tkinter template
Replies: 3
Views: 3084

Re: Python/tkinter template

Unfortunately there is a difference in the python language between version 3 and earlier versions.
If you change python to python3 it should work.

Roger Woollett

Go to advanced search