0

Starting again isn't always a bad thing

Posted by Chris on Wednesday, September 30, 2009
Since I (stupidly) wiped out the entire www.scoreresults.co.uk website last night, I've been coding like a monkey to get something back up and running.
The most important thing to do was get the league table widget working again. Not just working, but working across domains.

I'd already done this once, so knew it was possible.
I remembered having to do some half-arsed url hack to get the javascript to work across domains. I also remembered having a conversation with a few web-devs who said that iframes are often killed by modern browsers and/or ad-blocker add-ins, so my iframe approach wasn't ideal.
But until last night, at least it worked.

Starting again was quite daunting, particularly since I'd decided to leave iframes out of the widget and to rely solely on ajax for data transfer. Ajax suffers the same security restrictions and so, after asking Mr G for some help, I was pointed towards JSON.

This fantastic technology is also a bit of a hack, but at the very least, it allows cross-domain scripting, with very little effort.

By adapting an existing JSON script I found, I was also able to add in support for css/stylesheets. Not just any old sheets, but consider this:

You want to display a league table of results.
You use the fantastic widget and the results appear on your page.
But where is the style sheet? Should it be on your server, or the scoreresults.co.uk server? (since the actual table is hosting on the www.scoreresults.co.uk website).

Using JSON, the answer is - BOTH!
You can upload your own style sheet to your website/blog and give it any name you like. Below are a list of styles applied to the league table and clickable links (player profile/histories etc). So long as your style sheet includes these, the league table will be rendered exactly how you want it to so it blends in beautifully with your own website/blog. If you don't include css styles, the JSON script will find and replace the class tags with some default inline styling, so that the league table, by default, looks nice even if you can't be bothered with your own custom styling.

Here are some styles used by the widget, which turn the default black/grey tables red and, erm, pale red (ok, pink!) Have a play and try them out on your own site, to see what they do:


body,tr,td,input,select,textarea{font-family:arial,sans-serif;font-size:9pt;}

.results_table{border:1px solid black;width:600px;}
.results_header{background-color:red;color:white;text-align:center;}
.results_subheader{background-color:white;color:black;}
.results_line1{background-color:#FDDBDB;}
.results_line2{background-color:#E6BCBC;}
.results_player{width:360px;}
.results_played{text-align:right;width:30px;padding-right:8px;}

a.results_playerlink{text-decoration:none;color:red;}
a.results_playerlink:hover{text-decoration:underline;}
a.results_historylink{text-decoration:none;color:red;}
a.results_historylink:hover{text-decoration:underline;}

.results_profile{border:1px solid black;width:600px;}
.results_profileheader{background-color:red;color:white;text-align:center;}
.results_profilesubheader{background-color:white;color:black;}
.results_profilesummary_table{border:1px solid black;width:350px;}
.results_profilesummary_header{background-color:red;color:white;text-align:center;}
.results_profilesummary_subheader{background-color:white;color:black;}
.results_profilesummary_value{background-color:#E6BCBC;color:black;text-align:right;}

.results_history_table{border:1px solid black;width:600px;}
.results_history_header{background-color:red;color:white;text-align:center;}
.results_history_subheader{background-color:white;color:black;text-align:right;}

.results_score_won{text-align:right;font-weight:bold;padding-right:10px;}
.results_score_lost{text-align:right;font-weight:normal;padding-right:10px;}
.results_score_drawn{text-align:right;font-weight:normal;padding-right:10px;}


0

Careful with that delete key!

Posted by Chris on Wednesday, September 30, 2009
For those of you who tune in every now and again, you may notice a distinct lack of pictures. I'd like to say that's intentional, that it's the new, minimalist, clean, web2.0, information-only look (can you tell we've had a few websites to build recently?).

Sadly it wasn't intentional. It's all because I jabbed the delete key over the wrong folder. So all the blog images have gone. Not for good - I'm hoping some laptop backup exists somewhere with a few piccies, otherwise a lot of these posts aren't going to make much sense to any new readers who stumble across the blog in future!

Yes, I know, check the recycle bin.
But when working on a server via a remote connection (I was in work at the time of my getting a twitchy trigger finger) you don't get an option to move to the bin, files just get deleted.

Hopefully things will be back to normal before the weekend.
In the meantime, as they say, "move along, move along, nothing to see here...."

0

Score Results new league format

Posted by Chris on Tuesday, September 29, 2009
So far, the scoreresults.co.uk website takes results between two players (or teams) and awards points for a win, lose or draw, depending on the type of league/tournament being played.

There are plenty of league-based games where players take part in a game against a large pool of players, and league points are awarded to different players at the end of the game. A typical example of this is the many different types of pub poker leagues.

This is a format that we'd previously forgotten all about, but have been asked about recently (I don't know how we'd create a ScoreSure device for poker, but casual/home players want to be able to keep track of their successes through the scoreresults.co.uk website, so who are we to stop them?

Work is already under way on this and we hope to reveal a new "poker-compatible" league structure very soon....

0

Score results site ready to launch

Posted by Chris on Tuesday, September 29, 2009
Despite recent posts, it's not all been fun and food at Nerd Towers.
We've actually been doing some work too. And the work this time has been on the new look scoreresults.co.uk website

For a sneak preview of how things will look, visit http://www.scoreresults.co.uk/index_new.asp

As well as putting a new "skin" over the old site, we've also made a few improvements to it; in particular, detecting and questioning duplicate results (where two players log in independently and put the same result on twice - one may put FatBob 3 - SlimJim 7 and the other SlimJim 7 - FatBob 3).
The system now detects duplicate results on the same date and queries them.
(it does allow duplicates on the same date, but does ask for confirmation in case a result has been entered by accident).

0

More culinary delights in Brighton

Posted by Chris on Monday, September 28, 2009
There's not much more to add, than these reviews of Foodilic in Brighton, just down the hill from the Clock Tower. £6 for an all-you-can-eat buffet.

Not a stupid stuff-yourself-til-sick-on-fried-junk kind of buffet either.
This is a real, home-cooked, beautiful meal on a plate. If you've never been, do yourself a favour: forego the cappucinnos for once and spend your money on a proper, healthy, tasty, delicious dinner.

And the best thing? They do take-out too!

0

Quick project, fast turnaround

Posted by Chris on Monday, September 28, 2009
Here's an idea that came up at a recent RobotBrighton meeting - something along the lines of siftables-meets-dice reader (but perhaps a little simpler). We hope the proof-of-concept can be achieved quite quickly, so as not to interrupt our plans for launching the ScoreSure range of devices, but it seemed like a bit of fun, so here we go:

The idea is to build a UI (user interface) that uses physical blocks, placed into a tray/holder. A bit like putting dices into a dice reader (but because that analogy caused all kinds of confusion, we'll never mention dice again). When a block is in place, we need to know:

a) which face is up (or down, as necessary)
b) the orientation of the cube
c) (maybe future development) which cube from a choice of many has been placed

Other "limitations" included how to power each cube, accessing a battery in indeed batteries were to be used (even the little button type batteries).
Because of the way the UI works, each cube would offer 24 (6 faces x 4 degrees of rotation) possibilities: a reasonable number of options from which to make a workable user interface.

Here's what we came up with:


Each cube has three contact pads on each face. When placed in the holder, these pads make contact with one set of four sets of contact pads in the tray.
Each set of contact pads consists of power, ground and a serial data line (TX from the cube, RX in the holder). The holder/tray puts +5v to the first power contact in the tray. The cube contains a PIC which is programmed do nothing except transmit an identity number over serial comms. If the cube is in contact with the pads in "position" one, the tray/holder will start to receive a message from the cube. If no message is received, we know that the cube is not turned around in position one. The holder then puts +5v on the second power contact and waits for a response. If it receives one, it now knows the orientation of the cube is "position two". The holder repeats this process on each of the four sets of pads, over and over again.


The cube has a number of common ground and TX pads. The power connections are joined through a series of diodes and each power connector is sent to an input pin on the PIC. This way, the dice knows which set of power/ground pads caused it to "wake up", and returns this information back to the base along the serial data line.

Because the cube only ever transmits data, and the tray/holder only ever receives data, we need only one serial data line.

When the cube is transmitting, it can broadcast a unique (serial number) identifier plus one byte of data (or even just a few bits superimposed over one of the bytes being sent) to tell the tray holder which set of contacts were used to activate the cube.

On the face of it, this meets all the criteria:
  • The cube knows which set of contacts caused it to wake up - i.e. which face is face down in the holder/tray - and broadcasts this information whenever it is activated.
  • The cube has a unique id number (perhaps in eeprom) which is broadcast along with its "facing" so that we can distinguish the messages of one cube from another.
  • The cube has no need for external (battery) power - it takes power from the tray/holder and when not in place, the PIC inside it does not need to be running.
  • The tray/holder knows which of the four sets of contact pads the cube responded to, and in which case knows which way around in the tray the cube must be.


In future, the tray/holder could be expanded to allow multiple cubes to be used together. An exciting hardware based UI with lots of possibilities. Already we're talking about "disco dice" - each cube face can represent an instrument, and each instrument can have up to four different "riffs" which can be played through a software app. Rock on!

0

ScoreSure is finally mobile!

Posted by Chris on Thursday, September 24, 2009
That's right. No more messy wires, breadboards or power cables - the ScoreSure device is finally mobile. After building a PCB and testing it (can you believe it actually worked first time?) the only thing to do was fill the eeprom with bitmap and menu data.

Bitmap data was generated using a custom VB app and loaded into eeprom by putting the device into "usb mode" and connecting the USB cable to our 4-pin USB header (making sure the D+ and D- connections were the right way around!).

Work is in progress to convert this VB app into a Flash-based/online app.
Already done is the menu generating software. Here's an example of how we generated the menu data:









After drawing the menus and generating a "byte-stream" this data was loaded into eeprom using the same method as we did for downloading bitmap data. Here's a screenie showing (confusing as ever) the ScoreSure Golf Pro opening screen bitmap (it was the only one to hand at the time) and the start menu from the ScoreSure Petanque Pro device.

0

Almost there....

Posted by Chris on Thursday, September 24, 2009

Here's the latest ScoreSure device, running from a lipo battery, in pocket-sized form (off the breadboard) and displaying the opening screen. Confusingly, I coded this particular device up as a petanque score-keeping device but the only image I had to hand (in ready-to-use-for-the-Nokia-byte-array format) was the golfer from the ScoreSure Golf Pro.

That aside, the golfer bitmap appears as expected, without the need to edit anything. What is a little confusing is that the ScoreSure logo is completely messed up (it should look something like this.)

Also the brightness/contrast on this particular shield (it's called Color[sic] LCD shield v2.0) needs tweaking a little bit - I don't know if it's overvoltage from the lipo (i.e. it's giving out more than 5v) or whether it's the shield (which appears to have changed slightly from the earlier version).

That said, it shouldn't be too long before we have a working ScoreSure device of some/any description!

0

Not quite working - but just as expected

Posted by Chris on Wednesday, September 23, 2009
The moment of truth had arrived - a brand new PCB had been made up and installed onto the back of the Nokia shield. All that remained was to connect it to power and go out for a celebratory drink:


Check it out! Powered on and fired up! The screen looks lovely - it's taking its backlight power from the microchip (which in turn tells us that the MCU is working) but where's the little golfer bitmap and our opening menu?


The screen displayed a whole load of vertical lines and very little else.
At first this was a bit disappointing. But then we remembered that the first command in the ScoreSure device (after setting up the LCD and so on) is to draw the opening screen - and that means getting data from eeprom to use for drawing the bitmap.
The brand new eeprom on the PCB reads empty values as 255. So the device is drawing a sequence of 255 pixels in one colour, the flipping the background/foreground colours and drawing another line of 255 pixels. The bitmap routine draws pixels vertically (top-to-bottom) so when you think about it, if every value read back from eeprom is 255, it makes sense that the display shows just a whole bunch of lines and very little else.

How to get the bitmap to show?
That means connecting the device to a USB port and running the various custom-built apps to fill the eeprom with bitmap and menu data. Luckily, doing that shouldn't be too difficult: after all, we have a USB 4-pin header, ready to accept a USB connection.


The device connects and appears in the device manager as a valid USB/HID-compliant device. So all that remains is to drop the bitmap/menu data onto the eeprom chip.
That could be a job that takes ten minutes, or it might prove a bit tricky and take all night. It's not quite midnight as I'm typing this, so it looks like that's a job for the morning..........

0

ScoreSure is (almost) pocket-sized!

Posted by Chris on Wednesday, September 23, 2009
Following the (let's be honest, rather poor) 100th blog post, I spent a bit of time reading through some of the earlier posts. It strikes me that the earlier posts were a lot more in-depth, as ideas were tried out, and learning explained in a step-by-step basis. Some of the earlier posts are really quite informative, with later posts being more along the lines of "this is what we've done, here's an update".

I think it's time we went back to more informative blog posts, so here's one.
It explains how we got the ScoreSure device off the breadboard and into a pocket-sized device:

After designing the PCB layout, the next stage was to print the layout onto some Press-n-Peel. A hot iron and five minutes later, and the PCB is pressed onto the copper clad board ready for etching.


The etching powder we used this time was Ferric Chloride. It's a brilliant yellow/brown colour which stains everything it touches! On the plus side, it can etch a 4-inch square board in just a couple of minutes (just place the etching container inside a hot water bath and jiggle the board around for 3-4 minutes).


We didn't bother with ground and power planes, so the etchant had quite a lot of work to do! (including ground/power planes is a good idea for two reasons: firstly, nice big power tracks reduce the possibility of dips in voltage; secondly, large areas of exposes copper means less etching is needed - which in turn makes the whole process much quicker).


Here's the etched board after it's been drilled. Each hole (count 'em, there are seventy-four!) was hand-drilled using a PCB drill - although it sounds tedious (it was) it's actually just as quick (or slow) as using a Dremmel and pillar stand - although the actual drilling process is slower by hand, positioning and lining up the drill bit is much quicker/easier without a rotating bit to worry about.


The first thing to do after drilling the board was to install the pin header/sockets along the top and bottom edges of the PCB. Once these were in place, it was possible to check the alignment of the board against the Nokia screen and shield. The photo above shows that only some of the pins from the shield were actually used to connect to the PIC.

Here's the etched and drilled board installed onto the reverse of the Nokia screen shield:


Now that we can be sure that our shield fits onto the back of the Nokia board, it's time to install the components - which consist mainly of an 18LF2455 PIC, 24LC256 eeprom (the L in the serial number in both the PIC and the eeprom means it's a low-power version, running off 2.5v-5.5v) a few discrete components (resistors, capacitors, 20Mhz crystal) and some pin headers.


There are two headers on the board - the one at the top, to the right of the PIC, is the 5-pin ICSP header, which allows us to program the PIC without having to remove it from the board to place into the programmer (which is just as well - the PIC is soldered down!)

The 4-pin header at the bottom is for connecting a USB cable to the PC.
This will enable us to transfer data to/from the eeprom chip once the PIC has been programmed with the appropriate ScoreSure device code.


The plug hacked onto the back of the device was added as an afterthought!
With the Nokia shield in place, there was no way of getting power onto the 5v/ground pins - either via the USB header (it is obscured by the screen when it's in place) or any other means. The small plug allows us to connect the device to a lipo 3.7v battery while the screen is in place, even though it's a bit of a kludge! The +5/ground wires from the plug were soldered directly onto pins 1 and 4 of the USB header (which take 5v/ground from the PC when connected). Obviously in a final design we'll need to isolate this for now it's ok, as long as we remember to disconnect the battery before plugging in the USB cable. (in the final design, we'll probably have a simple switch or maybe even use the reset button somehow, so that the device knows the difference between being plugged into a battery - in "mobile" mode - and being plugged into a PC - in "download" mode - and can enable/disable USB comms accordingly).


So far, so good. Everything looks ok but that's no guarantee that anything will happen when we put power onto this thing. In fact, it's pretty well guaranteed to do absolutely nothing just at the moment - after all, we've not programmed the PIC yet!

Luckily, DonkeyProg recognised the PIC as an 18F2455 and programmed it at the first attempt. Validation went through a treat, so as far as we can tell, the PIC now contains our ScoreSure device code. The last thing to do is connect the PCB to the Nokia shield, attach the battery and see what happens.............

0

100th post!

Posted by Chris on Wednesday, September 23, 2009
It was bound to happen wasn't it?
I noticed on the last post that the count went up to 99.
So I thought I'd try to make the 100th post really interesting and informative, rather than just some boring mindless rubbish about how great it is to have posted 100 articles and still actually have kept enough interest to keep posting on this blog.
Then again.........

0

Get your dinner here

Posted by Chris on Wednesday, September 23, 2009
Don't start with the whole dinner/lunch/tea argument (everyone knows that dinnertime is around mid-day when you have your dinner, and tea is at teatime when EggHeads is on). If you're looking for a really nice, good value - i.e. cheap - meal, you'd do a lot worse than The Bell Pub in Hove.

Seriously, don't read cheap=rubbish.

During the daytime, the Bell offer a brilliant lunchtime menu for £5/meal.
An absolute bargain, and the food is really nice. None of your BrakeBros Dross, this is proper homecooked food, by a proper chef. And it's brilliant. Did I mention it was also quite cheap?

Here's the menu:
Brighton Sausage Co, Buffalo sausages + mustard mash + bacon with lentil gravy (yum) AND local smoked mackerel, spinach and asparagus spears = £10.
Add in 2 x desserts (generous-sized slices of lemon meringue pie AND a whacking great lump of vanilla cheesecake and toblerone sauce, mm-mmmm). Two drinks on top and the whole lot was still just £20. Less than a tenner a head.

If you're hungry in Hove and fancy something nice, without breaking the back, get yourself down to The Bell for your dinner!

0

ScoreSure Nokia shield and ICSP

Posted by Chris on Tuesday, September 22, 2009 in , , , ,
Just two days coding and as well as a golf-score-recording-device, we now have the ScoreSure Petanque Pro: a device for recording scores after each "end" in a game commonly known as "boules". (The game itself is called petanque, the boules are the little heavy silver things that get thrown around: this is different to most games, like football, darts, bowls etc., where the game takes its name from the equipment used).
By creating our first ScoreSure Petanque Pro device, we've managed to dovetail beautifully into the Score Results website which is almost complete (since the first lot of results on the Score Results website are all for the Brighton and Hove Petanque Mixed Doubles League.

As well of lots of development in recent weeks, theres' also been talk of getting the local university involved in market research and product development. That means it's time to get the device off the breadboard/prototyping hardware, and packaged up into something that you can hold in your hands! We've been talking about doing this kind of thing for ages now, but this time it's different. This time, we've been given a deadline!


So here's the PCB layout of the shield. A few of the PIC pins have had to be re-mapped. The reason for this is because we're going to make up a few "blank" devices - Nokia screen, batteries, eeprom and PIC, and then program them afterwards. This means that SMT (surface mount technology) can be used for production at a later stage, because the PICs can be programmed in place, using ICSP (in-circuit serial programming).

In fact, it turns out that the programmer we use for dropping code onto our PIC chips uses this anyway - it's a socket-based programmer (see below) but it also has an ICSP header for programming chips this way.

(incidentally if anyone else has one of these programmers, they can be used to write code to both 16F and 18F chips - the way we do it is to keep two different versions of firmware on two different 16F628A chips. Simply swap in the firmware you need (did you notice that the programmer uses a PIC chip itself?) and run the appropriate software. We use DonkeyProg for the 18F series of chips and DIYPack25 for burning to the 16F chips.

The reason for remapping the pins is to make sure that the MCLR, RB6 and RB7 pins are isolated. These are the pins needed to program the chip in place. It is possible to keep using these pins and build simple isolator circuits for when programming takes place (programming requires raising the voltage on the MCLR pin to about 13v so you need to protect the rest of your circuit) but we found it easier to just keep these pins clear and only use them for ICS programming. On the PCB layout we run MCLR, 5v, ground, RB6 and RB7 to a pin header row and then use an old IDE (hard drive) cable to connect to the ICSP header on the PIC programmer.

We've just completed our first test and it was successful! We've managed to program an 18F2455 chip without removing it from the breadboard and dropping it into the socket. So there's nothing stopping us now from building a few "shields" which clip onto the back of the Nokia colour screen from NuElectronics and programming them at a later date!



(for the observant amongst you, comparing this photo to previous ones, you'll see that some extra wires have been added - and the Nokia board removed for testing - which cross over the PIC and create a 5-pin connection on the left hand side of the breadboard: the red wire from MCLR which was previously connected to 5v is now the programming voltage wire and the MCLR fuse on the chip has been turned off so that pin no longer requires 5v to keep the PIC running. The 5v and ground pins have been carried over to the ICSP connection on the left of the breadboard and pins RB6 and RB7 have been taken across via two yellow wires.)

Because the PIC can be programmed without physically putting it into the programmer, there's nothing stopping us from making a circuit board and soldering everything in place. Let's crack open the Ferric Chloride and get etching....

0

Not quite robotics....

Posted by Chris on Tuesday, September 22, 2009 in , ,
...but robots all the same.
These cool little paper creations are bound to appeal to nerds and geeks alike.
Anyone who remembers the 80s is bound to love Terminator/Robocop. Superman is surprisingly cool and the new IronMan just looks awesome.
Articulated joints too, so a variety of poses are possible.

There's even a post on the Brighton Robotics site, to see who'll be the first to actually turn one of these into a fully-working robot:

http://www7a.biglobe.ne.jp/~sf-papercraft/Deforme/Deforme.html

0

Score Results Widget-ified

Posted by Chris on Monday, September 21, 2009 in , , ,
That's right - the fantastic Score Results website (a partner site for the soon-to-be released ScoreSure website) now includes code so that you can display your own league tables on a blog/website as a widget. Just a couple of lines of code (copied and pasted) and you're away!

The trickiest part is the use of an iframe (and its auto-resizing code) to display the league table. Why iframes and not ajax (the most common method suggested when resizing iframes becomes an issue?) Well, every entry in the league table can be clicked on, to display team members, member profiles and so on. Although possible, writing ajax functions and callbacks to handle every clickable link would be a nightmare - iframes are just easier to implement!

The headache comes when you want to include the league table (hosted at www.scoreresults.co.uk) in an iframe hosted on another domain. Obviously scripting across domains isn't possible, so there's a bit of trickery involved, to make sure that the iframe is resized after content has been loaded into it.

Here's an example of the widget in use. The league table below was included in this blog by simply pasting the following two lines of code:

<script type="text/javascript" src="http://www.scoreresults.co.uk/js/leaguetable_widget.js"></script>
<script type="text/javascript">drawFrame("2DD610F1CA7342A0BEF9E50540F2FFB5");</script>



0

France Telecom/Orange Nightmare

Posted by Chris on Friday, September 18, 2009 in , ,
What a nightmare.
Nearly a full whole week with no internet access! And all thanks to France Telecom/Orange. We've been away for a few days at "Le Maison Nerd" and - despite assurances on a previous trip in August that the phone line/internet connection would be up and running this time (it wasn't when we got there last time) - the phone line/internet connection was not working!

In fact, when a problem was reported on our last trip out there, rather than fix the problem, the phone line was cut off! Despite this, Orange (who bought all internet accounts from France Telecom, who in turn had bought out Wanadoo, who originally set up the internet account many years ago) still managed to keep (and charge for) an internet connection, despite the parent company having disconnected the phone line.
To make matters worse, when the phone line was reinstalled - it took less than 24 hours - the DSL part of the line had been disabled and could not be reactivated for 7-10 days.


So we've been paying for a phone line/internet connection which was disconnected some time ago and during our last visit to "Maison Nerd" had no access to the internet at all! That's not to say nothing has been done lately - the ceiling has a new covering of plasterboard and is ready for painting! - and details of progress on the ScoreSure range of devices will be posted here over the coming weekend.....

0

Score Results website

Posted by Chris on Friday, September 11, 2009 in , , ,
A big part of the ScoreSure product range is the website where players can upload results from games and keep a history of their progress over time. By collating players scores, it's also possible to maintain and display league tables (see earlier post) and so on, which has lead to us using a second domain for this service: www.scoreresults.co.uk.

The website is almost complete and should already be useable for anyone wanting to give it a whirl.

0

ScoreSure Golf Pro

Posted by Chris on Wednesday, September 09, 2009 in , , , ,
Here's the first photos of our ScoreSure Golf Pro device (yes, still in development!) running off a 400mAh 3.7v li-polymer rechargeable battery. We think it looks the business! And of course, using a rechargeable battery (whether eventually a li-po or a li-ion) means lots more possibilities for the enclosure, since we no longer have to worry about battery flaps and making the inside accessible.


0

ScoreSure results website

Posted by Chris on Wednesday, September 09, 2009 in , , ,
With the Brighton and Hove Petanque Open Triples results in and recorded, it made sense to use them to try out the new score results website. Progress on this side of the ScoreSure range of products has been slow and steady. To date, results entry has been completed, along with an "invite-a-buddy" system of encouraging people to create their own online profiles.

In progress is a results API to allow anyone to display their results in a league table format, on their own website/blog, using a few simple lines of copy-n-paste code (the same way YouTube embed video idea works).

Below is an example of the Brighton And Hove Open Triples qualifying round results, using the new ScoreSure Results API:

The code used to display the league table here has been superceded. Changes to the Score Results website mean the method originally used to draw the league table no longer works. See later posts for details about how the league table can be included as a blog "widget"


It uses an iFrame to load external content from the scoreresults.co.uk website. In this example, the league table is drawn by putting http://www.scoreresults.co.uk/leaguetable.asp?tournamentid=CA40F460811E4D1FB47A706A4217972A into the iFrame. When hosted on a site where script uploads are possible, it is also possible to have the iframe resize automatically, to fit the frame contents. A simple example of this can be found here.
(you should see that as links are clicked, the iframe grows and shrinks as necessary so that ugly scrollbars are not needed).

From the results league table, it should be possible to drill down and look at each team's results history, individual player profiles and player results histories.
  • Click on a tournament to view the league table standing for that tournament (knockout tournaments haven't been coded yet, but given that the final stage of the BHPC Triples was a form of knockout, this will be done very soon!)
  • Click on a team name to see all the people that make up that team and to see previous results for that team (each team is specific to a single tournament so all results for one team always relate to just one tournament).
  • Click on a player's name to see which team(s) they belong to, which tournaments they have taken part in, and a history of all results for this player, whether individually or as part of a team, across all tournaments.


Obviously some tidying up needs to be completed, and routines put in place to stop anyone accidentally (or maliciously!) entering rogue data which might break the website. But to date, progress has been pretty good and it's encouraging to see how the whole thing is starting to shape up.

0

Brighton and Hove Petanque Open Triples

Posted by Chris on Monday, September 07, 2009 in , , ,
Sunday saw the BHPC Open Triples-By-The-Sea in which eight teams of three players took part in two qualifying leagues of four teams (you keeping up with this?).
Each team in each league played each other once (meaning each team played a total of three games in the league/qualifying stages). After completing the league stages, each team was given a ranking based on the number of times they had won, lost and drawn. Where two or more teams had the same number of wins/draws/losses, points difference was used to rank one above the other.



League One
ALavender Ladies
BYoung at Heart
CWe C.A.N
DThe Trumpeteers


1ABCD
A-13132
B3-137
C52-6
D131313-

League Two
ABursham
BAll The Presidents Men
CWelcome Strangers
DLondon


2ABCD
A-453
B13-1113
C1313-1
D131213-



After the qualifying league round, the results looked something like this:


Team nameWonDrawnLostForAgainstScorePoints
Trumpeteers3003915249
London2013817216
All The Presidents Men201372986
Lavender Ladies201282176
Welcome Strangers2012729-26
Young At Heart1022328-53
We C.A.N.0031339-260
Bursham0031239-270

Below are some videos of the highlights of games played on the day:



0

Li-po batteries are here!

Posted by Chris on Saturday, September 05, 2009 in , , ,
There was a card from the post office, hidden under the welcome mat at Nerd Towers, saying that they'd been delivered a few days ago. So after a quick trip to the sorting office, they were proudly displayed on one of our workbenches. Here's a photo of the prototype batteries with charge circuits, from Xing at NuElectronics:



The charge circuits include over/under voltage protection, to keep the li-po cells operating within safe limits as well as a step-up converter, to provide a regulated 5v output from the 3.7v cell. As you can see from the photo, they're just being charged up at the minute. As soon as they're ready for use, we'll see how they perform (with our SureScore Golf device). We'll try one with our current device (which includes software-controlled auto-standby after two minutes of inactivity) and one with a modified device with no auto-standby code: this should give us a good idea of the kinds of times we can expect our devices to run for between charges in both "normal" and "continuous" use modes.

whos.amung.us

Copyright © 2009 .Nerd Club All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive Supported by Blogger Templates.