Go to advanced search

by PeterO
Thu Oct 25, 2012 9:39 am
Forum: Python
Topic: When to declare variables as global
Replies: 27
Views: 6509

Re: When to declare variables as global

BlackJack wrote:Rule of thumb: Never use the ``global`` keyword, and don't use global data structures either.
Rule of thumb: Learn how to use ALL the features of the language you are using. They are there to be used in appropriate situations, not to be ignored due to someone else's rules.
PeterO
by PeterO
Thu Oct 25, 2012 9:17 am
Forum: Off topic discussion
Topic: Decoding MSF / WWVB (radio clock) via GPIO??
Replies: 14
Views: 10006

Re: Decoding MSF / WWVB (radio clock) via GPIO??

The MSF signal is described here: http://www.npl.co.uk/science-+-technology/time-and-frequency/time/msf-time-date-code The pulses you are interested in are either 0.1 or 0.2 seconds long, and I find that something like 100Hz sampling rate allows for some simple filtering to remove noise pulses as yo...
by PeterO
Tue Oct 23, 2012 8:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C: How to connect multiple devices.
Replies: 30
Views: 42410

Re: I2C: How to connect multiple devices.

Pull up resistors are already on the Pi board.

Just wire all the i2c devices in parallel, so connect all the SDA pins together, and all the SCL pins together. as shown here http://en.wikipedia.org/wiki/I%C2%B2C

Each one has it's own address so they don't interfere with each other.

PeterO
by PeterO
Tue Oct 23, 2012 2:02 pm
Forum: C/C++
Topic: C Macro to detect R-PI?
Replies: 3
Views: 2975

Re: C Macro to detect R-PI?

Code: Select all

#include <stdio.h>
int main(int argc,char **argv)
{
#ifdef RPI
	printf("Hello from a Raspberry Pi\n");
#else
	printf("Hello World\n");
#endif
	return 0;
}
gcc -o testProg -DRPI testprog.c
./testProg
Hello from a Raspberry Pi
gcc -o testProg testprog.c
./testProg
Hello World

HTH
PeterO
by PeterO
Tue Oct 23, 2012 12:56 pm
Forum: General discussion
Topic: Building your own computer
Replies: 13
Views: 2229

Re: Building your own computer

Actually you don't need that big a bag of gates. If you look back at the designs of the 1950s and early 1960s machines they didn't have the millions of gates needed for modern designs. You might also find this interesting : http://www.nand2tetris.org/ "Building a Modern Computer from First Principle...
by PeterO
Tue Oct 23, 2012 12:21 pm
Forum: User groups and events
Topic: Third Milton Keynes Jam
Replies: 9
Views: 1705

Re: Third Milton Keynes Jam

Still tickets available for next Sunday .
http://www.eventbrite.com/event/4622152984/es2/?rank=1
PeterO
by PeterO
Sun Oct 21, 2012 8:35 pm
Forum: Beginners
Topic: how to upgrade the 512mb
Replies: 4
Views: 2452

Re: how to upgrade the 512mb

I think you need to wait a few days. The firmware needed to take advantage of the extra ram is still being sorted out. The current versions are really only suitable for use by experienced users. I expect we will to see a version that can be widely used available in the next few days.

PeterO
by PeterO
Sun Oct 21, 2012 7:44 pm
Forum: General discussion
Topic: What is the aim of this project and it is really open ?
Replies: 32
Views: 6858

Re: What is the aim of this project and it is really open ?

2) I have never claimed and to the best of my knowledge neither have Liz or Eben claimed that this is a beta device. I think the phrase they have used is "developers version"... It is intended for developers to develop educational software to help in the primary aim of teaching CS in schools. To me...
by PeterO
Sun Oct 21, 2012 2:02 pm
Forum: General discussion
Topic: Rev2 Mounted with P5 & P6 Fitted!
Replies: 9
Views: 2900

Re: Rev2 Mounted with P5 & P6 Fitted!

I thought I had read somewhere that the pins for P5 were intended to be mounted coming out out of the bottom of the board ? Then any codec boards would sit under the PI board.

The silk screen on the board does show "P5" and a rectangle round the pins on the bottom of the board.

PeterO
by PeterO
Sun Oct 21, 2012 9:23 am
Forum: User groups and events
Topic: Third Milton Keynes Jam
Replies: 9
Views: 1705

Re: Third Milton Keynes Jam

Nearly half the tickets gone already !
PeterO
by PeterO
Fri Oct 19, 2012 6:49 pm
Forum: Other projects
Topic: Why not a DIY Power Supply?
Replies: 16
Views: 11625

Re: Why not a DIY Power Supply?

There won't be variations in the DC current of the kinds of frequencies (hundreds of MHz) that would have any effect on the Ferrite clamp. All such frequencies are shorted with capacitors on the board. Those are not perfect capacitors. If such frequencies were on the power cable, it wouldn't have p...
by PeterO
Fri Oct 19, 2012 3:19 pm
Forum: Other projects
Topic: Why not a DIY Power Supply?
Replies: 16
Views: 11625

Re: Why not a DIY Power Supply?

I don't see anything wrong with using ferrite cores a few turns is hardly comparable to the 1000s inside a relay coil so any magnetic field if any would be very small. It's not the magnetic field that is the issue. It's the changes in supply voltage caused by changes in current passing through the ...
by PeterO
Fri Oct 19, 2012 2:17 pm
Forum: Other projects
Topic: Why not a DIY Power Supply?
Replies: 16
Views: 11625

Re: Why not a DIY Power Supply?

and the power supply cable going to the PI is lopped a few times around a clip-on ferrite core to suppress RF noise in the power line. Richard S. Adding inductance to the DC side of the supply is a bad idea as it will convert the variations in the current drawn by the PI into variations in the supp...
by PeterO
Fri Oct 19, 2012 11:56 am
Forum: Other projects
Topic: Why not a DIY Power Supply?
Replies: 16
Views: 11625

Re: Why not a DIY Power Supply?

A bit of overkill I admit, but I'm using one of these to power three RPIs from a single 12V source. In my case I'm using a 12V battery but it could just as easily be your transformer/bridge/capacitor arrangement.
http://www.skpang.co.uk/catalog/dcdc-co ... p-537.html
PeterO
by PeterO
Thu Oct 18, 2012 4:25 pm
Forum: User groups and events
Topic: Third Milton Keynes Jam
Replies: 9
Views: 1705

Third Milton Keynes Jam

by PeterO
Thu Oct 18, 2012 4:22 pm
Forum: General discussion
Topic: Get Thee to a Raspberry Jam this Weekend!
Replies: 6
Views: 806

Re: Get Thee to a Raspberry Jam this Weekend!

Burngate wrote: I've just looked on the TNMOC site but there's no mention of it?
Could you give us a link?
I probably won't put anything on there any more as we've been over-subscribed for the previous events.
http://www.eventbrite.com/event/4622152984/es2/?rank=1
PeterO
by PeterO
Thu Oct 18, 2012 3:46 pm
Forum: General discussion
Topic: Get Thee to a Raspberry Jam this Weekend!
Replies: 6
Views: 806

Re: Get Thee to a Raspberry Jam this Weekend!

Jim Manley wrote:In the case of Silicon Valley, we'll be meeting this Saturday, October 20th, from 1 to 5 PM, at the Computer History Museum at 1401 N. Shoreline Blvd., Mountain View,
And the next Jam at the UK's National Museum of Computing is on 28th of October :lol:
PeterO
by PeterO
Wed Oct 17, 2012 8:59 pm
Forum: Beginners
Topic: Is start.elf interchangeable with PI 256 or 512MB RAM??
Replies: 16
Views: 4588

Re: Is start.elf interchangeable with PI 256 or 512MB RAM??

You've downloaded the web page that has a button on it to download the file :shock:

The url for the file is
https://github.com/raspberrypi/firmware ... _start.elf
PeterO
by PeterO
Wed Oct 17, 2012 11:23 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C bus baud rate ...
Replies: 2
Views: 5975

Re: I2C bus baud rate ...

Info on setting i2c rate as a kernel module option here:
http://www.raspberrypi.org/phpBB3/viewt ... ed#p188106
HTH
PeterO
by PeterO
Wed Oct 17, 2012 9:58 am
Forum: General discussion
Topic: Current Farnell Delivery Time
Replies: 62
Views: 9856

Re: Current Farnell Delivery Time

Ordered on the 14th, arrived on the 16th !
PeterO
by PeterO
Tue Oct 16, 2012 12:17 pm
Forum: Automation, sensing and robotics
Topic: i2cdetect on Revision 2 board.
Replies: 11
Views: 3040

Re: i2cdetect on Revision 2 board.

Does the code that initialises the SMBus library take a "0" parameter ? If so change it to a "1".
PeterO
by PeterO
Tue Oct 16, 2012 10:55 am
Forum: Teaching and learning resources
Topic: Nand2tetris
Replies: 1
Views: 1853

Nand2tetris

I just saw a link to this course on SlashDot http://www.nand2tetris.org/ It looks interesting (*) and I wonder if anyone has tried running the associated course tools (which are all written in java) on a RPI ? I expect a 512Mb RPI is going to cope better as java is normally a bit of a memory hog. Pe...
by PeterO
Tue Oct 16, 2012 10:44 am
Forum: Automation, sensing and robotics
Topic: i2cdetect on Revision 2 board.
Replies: 11
Views: 3040

Re: i2cdetect on Revision 2 board.

If you have the source code.... swap any "/dev/i2c-0" to "/dev/i2c-1"
PeterO
by PeterO
Tue Oct 16, 2012 9:15 am
Forum: Automation, sensing and robotics
Topic: i2cdetect on Revision 2 board.
Replies: 11
Views: 3040

Re: i2cdetect on Revision 2 board.

I2C buses are swapped on RevB boards vs RevA board. THis is NOT a 256 vs 512Mb issue.
PeterO
by PeterO
Mon Oct 15, 2012 11:09 am
Forum: General discussion
Topic: Raspberry Pi with 512mb RAM in the Wild and Element14...
Replies: 213
Views: 46297

Re: Raspberry Pi with 512mb RAM in the Wild and Element14...

I looks like some of the "less stable" elements of recent firmware updates have been rolled back to allow for a stable release with support for newer versions which are aware of the 512Mb boards and their new version numbers.

https://twitter.com/RPF_Dev_Updates

PeterO

Go to advanced search