Sunday, November 2, 2014

Project Transputer


Project Transputer is coming along nicely.



I repurposed the board from another project. It's got Bluetooth and Wifi modules already mounted and 5V and 3V regulators.




Thursday, February 13, 2014

From little Acorns..

Just reading some of this: http://go.theregister.com/feed/www.theregister.co.uk/2014/02/13/reg_curriculum_rfc/

I don't really want to get too involved with the arguments about it, but for what it's worth...

I've been programming for a living since leaving school in 1987. My first job was programming which was rather unusual at the time. In fact I started programming for my uncles company before leaving school and had been programming for a few years before that.  I didn't learn programming from school, I learned it at home programming my ZX81, which was about all you could do with it, but that was a good thing I think.

I got interested in computing from several sources, I was already interested in electronics and some of my friends were too and some had computers.  My school had a lunchtime computer club where pupils got involved with setting up the BBC micros and RML 380Z's and had small programming projects they worked on.  All this created an interest and a desire to get my own computer. I remember it took a bit of talking my parents round to splashing the £100 on it, and my uncle helped with that argument.

I spent a couple of years programming my ZX81 and later Spectrum and BBC (I did have  games on tape & disk as well - not all programming). I think it was the fact you had to almost construct the basic machine, connect tape recorders or disk drives and had just a command prompt that forced a certain level of ingenuity to get any reward from the machine.  But you did get a reward when programs worked or you found a new way of getting the machine to do something. Myself and my friends also used to have fun programming the demo computers in Boots and WHSmiths.

Which brings me on to the Raspberry Pi.  There has been a desire to try and recreate that era of discovery and ingenuity that the BBC Micro and early home microcomputers generated.  I think that's where the RPi is coming from and it's a nice cheap introduction to computing.  But it still takes a certain type of person to get properly interested in it.

  I saw an article the other day (can't find the source now) which was about making the Raspberry Pi even easier to use.  I balked a bit at that.  I personally think that's the wrong way to go. If you want something easy to use then there's plenty of cheap Android tablets for that.  I think what it needs is to be more basic perhaps running some more basic OS that drops you into a command prompt much like the Beeb did with languages on hand.  Possibly even something like the RiscOS OS from the Archimedes.  (These OS's are practically bullet proof).  But they provide the basic raw materials for learning about computing.   Once those are mastered the desire for more complex OS's and programs may well grow and the RPi would be able to grow with that. 

I have to assume that schools are running computer clubs but I'm not sure what form they take these days. Perhaps that's an area that might be used to get kids interested in programming again if it isn't already. Probably better than forcing everyone to do it. From my experiences with my own children and with quite a number I met when I took my BBC Micros to Maker Faire, kids love using the old machines, some were appalled that they didn't have Facebook, but most liked the basic games and some even had a stab at programming.

I think all is not lost (yet).

//

//images from http://commons.wikimedia.org

Thursday, February 6, 2014

Amazon AWS basics in Rails

Listing Amazon EC2 instances

# Class for VM's 
class Vm
  include ActiveModel::Validations

  validates_presence_of :name, :status

  attr_accessor :id, :name, :dns, :status
  @@ec2 = AWS::EC2.new()

  def self.all
    return @@ec2.instances.inject([]) { |m, i|
      tags = i.tags.to_h
      name = tags['Name']
      m.push Vm.new( i.id, name, i.dns_name, i.status )
    }
  end

  def initialize( id, name, dns,  status )
    @id     = id
    @name   = name
    @dns    = dns
    @status = status
  end

end

Listing Amazon S3 buckets

# Class for S3 Storage
class Storage
include ActiveModel::Validations
 
validates_presence_of :name
 
attr_accessor :name
@@ec2 = AWS::S3.new()
 
def self.all
return @@ec2.buckets.inject([]) { |m, i|
    m.push Storage.new( i.name )
}
end
 
def initialize( name )
@name = name
end
 
end

AWS Config

config/initializers/aws-sdk.rb
AWS.config({
  :secret_access_key => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  :access_key_id => 'YYYYYYYYYYYYYYY',
  :region => 'us-west-2',
})



Thursday, January 31, 2013

Handling and Tyre wear patterns

Racing last night at Bashley the car was still quite unstable. For the last few races I have been changing one setting at a time to pin down which are making improvements. So far I've stiffened the front springs, moved the shock positions on the rear and toed out the steering a little. The car was better but still quite hard to tame the back end..
If you look closely at the tyres you can just about make out that the insides of the tyres are a little duller meaning that the majority of the cars weight has been on the insides even during dynamic handling. This is a big clue to start looking at the camber adjustments.
Camber is the angle of the wheel relative to the track looking from the front of the car. 0 degrees means the wheel is dead vertical. -5 degrees means the top of the wheel is angled toward the centreline of the car. A little negative camber can be useful, but evidently I had too much. I rather unscientifically reduced the amount and in the next heat the car was far more controllable with more power going to the track.

Wednesday, June 22, 2011

NADARS Newbury Radio Rally

Each year on Fathers day the Newbury and District Amateur Radio Society organise their rally which has been at the Newbury Showground for the last few years.


For anyone not familiar, radio rallies or hamfests as they are sometimes known are a show organised by an amateur radio society. They usually take the form of a field with trade stands, a club stand and a car boot section. There is often a very varied mix of things on sale from old wartime radios, military surplus, old broadcast equipment, telecom equipment, components to computers and all manner of bits and pieces.




 This has always been one of the nicest rallies and one which has been on my list of favourites since about 1993, so I thought I'd share a few photos of the day.

We got there a little late, but it was still a good day. I picked up a few bits for the DATV station I'm planning on building, an NDS CSR820 MPEG2 IRD and some L-Band filters and splitters. I also met an old friend which was nice.
It was a bit of a drive (4 hours) but still happy I went.

73 de M1BSC :-) 

NADARS - http://www.nadars.org.uk/ 

Wednesday, March 16, 2011

Maker Faire Newcastle 2011

 Maker Faire Newcastle, UK 2011




Last week Makers and Hackers from all over the world converged on the Centre for Life in Newcastle-Upon-Tyne for the UK's third Maker Faire.  Maker Faire is an event organised by O'Reilly's Make magazine to bring together art, crafts, technology, engineering and science projects and to celebrate and encourage the Do it Yourself mindset.




The BBC's Research and Development and Television Platforms groups were there meeting the public and making friends with other Makers. We had several exhibits ranging from the fun Blink-o-tron with its trapped Weeping Angel, Conduct your own orchestra to the more serious Universal Control which allows subtitles to be sent to mobile devices.




 The Maestro demonstrates in an entertaining way our ability to interface to the Microsoft Kinect and to use thedata provided to control video playback. Basically you use the baton and move your hands in the manner of an orchestral conductor and you can control the volume and tempo of the music.















We also showed a concept device which presented a different way of accessing the BBC's Radio archive. The 'Wayback Machine' is designed to look as much like a traditional radio as possible, retaining simple controls, but allows the date and time to be 'tuned' in.













An example of the BBC's collaboration with Newcastle University was also on show with the Tune Table, a device which was developed by one of the universities students while on placement with R&D.


The Tune Table was built to explore the control metaphore and investigate its applications for areas such as video editing.




We also tried to entertain (and sometimes scare) some of the visiting children with our Blink-o-tron and its trapped Weeping Angel from Doctor Who.  This is an example of some basic microcontroller hacking using an Arduino, some LED's and some pieces of plexiglass which works on he principle of Pepper's Ghost. Don't Blink!









There was also a homebrew tapeless camera system on display which lead us nicely into conversations about how the BBC are moving towards using systems such as INGEX and the Digital Media Initiative (DMI).





We also met with and talked to a great many members of the public about the work we do and we dealt with many enquiries about our employment opportunities at BBC North in Salford.




What the other bloggers are saying:-


http://www.youtube.com/watch?v=Bked4XQz89g
http://vickyteinaki.com/blog/maker-faire-uk
http://zine.openrightsgroup.org/reviews/2011/maker-faire-2011
http://zuzebox.wordpress.com/2011/03/15/maker-faire-uk-2011/
http://www.youtube.com/watch?v=yhNohhCnX2I&feature=related


Credits:
  Video: Brendan Crowther, Laura Chalmers, Ian Calvert, Bruce James
  Photos: Bruce James
  Blog: Bruce James, Yameen Rasul
  Organisation: Max Leonard, Yameen Rasul
  On the stand: Max Leonard, James Barrett, Tom Bartindale, Bruce James Andrew Bowden, Ian Calvert, Mo McRoberts

Wednesday, March 9, 2011

Wayback Machine visits Maker Faire

Getting the Wayback Machine ready for Maker Faire.




Since the last update the radio has gone through some drastic hardware changes.  There is still an Arduino driving the LCD and user interface but the backend has been replaced by a Beagleboard running Angstrom Linux.  This has enabled the radio to stream and play MP3 files and also allows the use of Wifi or 3G data dongle.






BBC R&D North visited Maker Faire in Newcastle on the 12th and 13th of March 2011.


http://www.bbc.co.uk/blogs/researchanddevelopment/2011/03/bbc-rd-at-the-big-bang-science.shtml

http://makerfaireuk.com/

Tuesday, February 8, 2011

Git crib sheet

Been using Git lately. 
Much goodness to be had, but some commands are a little unfamiliar if coming from Subversion.
So, here's my crib sheet of handy Git recipes I think will be useful.


Configure your Git
bash-3.2$ git config --global user.name "CustardCat"
bash-3.2$ git config --global user.email "custard@cpan.org"
bash-3.2$ git config --global -l
user.name=CustardCat
user.email=custard@cpan.org




Create a new project and commit your code...

# Create a project and cd into it..
cd my_project

# Make the project a git project
git init

# Add all the files in the project to git
git add .

# Commit your local files
git commit




Get status, logs & diffs
# Status of changes
git status

# Diffs
git diffs

# Add more files
git add file1 file2 etc..

# See what's been happening
git log
git log --stat --summary
git log --pretty=oneline

# See diffs between versions. nb. only need first few chars of version
git diff 16f8..8bd2
git diff HEAD^..HEAD




Reverting & adding files
# Throw all uncommitted changes away (revert)
git reset --hard

# Edit the commit message
git commit --amend

# Add forgotten files to the last commit
git reset --soft HEAD^
git add forgotten.file.txt
git commit




Ignoring files

#Ignore files - also can use wildcards
vi .gitignore
git add .gitignore
git commit




Branches & Tags
# Making a branch
git branch splendid_branch

# View Branches - asterisk shows the current branch
git branch

# Switch to the new branch
git checkout splendid_branch

# Switch back to master
git checkout master

# Merge the branch into master
git merge splendid_branch

# Tagging - use tag names in place of the revision ids
git tag v1.2.3




Cloning & updating clone
# Clone a repository
git clone git://git.kernel.org/.../blah my_blah
cd my_blah

# Pull changes from origin (update from upstream)
git pull origin

# Check logs since pull
git log -p ORIG_HEAD../some/dir

# Extract patches 
git format-patch HEAD^
git format-patch origin

# Pull from branch and merge
git pull git://git.kernel.org/.../some_branch.git ALL

# Revert a pull
git reset --hard ORIG_HEAD

# Garbage collect
git gc

# Update tags from original
git fetch --tags





Monday, December 6, 2010

Xilinx Coolrunner II & Xubuntu

After a few days wait the Xilinx Coolrunner II kit arrived in the post.


The Coolrunner is a CPLD which contains Macrocells, which are a step up from the basic gate array of a PLD and the XC2C256 on this board has 256 macrocells configured via an interconnect matrix.


Xilinx provide a programming suite, ISE, which is available for Windows and Linux. However they don't directly support Ubuntu. 


Here is a brief howto to get the ISE running on  Xubuntu.


The main hurdle with the ISE is that it requires a USB driver,  windrvr6, in order to use the Platform cable (DLC9G). However it is possible to configure Xubuntu to use libusb and to get the programming tool, iMPACT, to use this instead.


1.Install prerequisites..


apt-get fxload
apt-get libusb


2. Configure the udev rules


These load the correct hex file when the device is attached.


jamesb@Jalapeno:~$ cat /etc/udev/rules.d/xusbdfwu.rules
# version 0003
SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0008", MODE="666"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $tempnode"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $tempnode"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $tempnode"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $tempnode"


3. Install the hex files.


These can be found in the ${XILINX}/ISE/bin/lin directory.


jamesb@Jalapeno:~$ ls -al /usr/share/*.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusbdfwu.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusbdfwu.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusb_emb.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusb_emb.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusb_xlp.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusb_xlp.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusb_xp2.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusb_xp2.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusb_xpr.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusb_xpr.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusb_xse.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusb_xse.hex
lrwxrwxrwx 1 root root 48 2010-12-05 21:32 /usr/share/xusb_xup.hex -> /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/xusb_xup.hex




You can use ln -s to create the symlinks..



4. Setup some scripts to start up ISE and IMPACT


 jamesb@Jalapeno:~/bin$ cat ise
#!/bin/bash

source /opt/Xilinx/12.3/ISE_DS/settings32.sh
export XIL_IMPACT_USE_LIBUSB=1
XIL_IMPACT_USE_LIBUSB=1 /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/ise &





#!/bin/bash

source /opt/Xilinx/12.3/ISE_DS/settings32.sh
export XIL_IMPACT_USE_LIBUSB=1
XIL_IMPACT_USE_LIBUSB=1 /opt/Xilinx/12.3/ISE_DS/ISE/bin/lin/impact &



So, assuming that worked, plug in the platform cable and you should get an orange light.. you're good to go!


I suppose I'd better go off and write some code now.. byee..




My environment :-


Xubuntu  10.10
Linux Jalapeno 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 10:18:49 UTC 2010 i686 GNU/Linux
Xilinx_ISE_DS_Lin_12.3_M.70d.1.0 in /opt/Xilinx/12.3/ISE_DS/
Platform Cable DLC9G


Linky :-


http://www.xilinx.com/support/download/index.htm
http://www.xilinx.com/support/documentation/coolrunner-ii.htm


YMMV etc.

Wednesday, December 1, 2010

Audio board for the Camera A2D project


Started working on the audio board prototype for the Camera A2D project. 
It's based around a pair of NE5532 op amps. The input stage converts the balanced line input from the microphone, and the second stage acts as a preamp with level control to supply the correct levels to the nNovia.
Should be on to some audio tests shortly so time to dig the signal generator and scope out.