Site banner image; A pool of blue smoke.



Reading Geek Night 13


This was my third time presenting at Reading Geek Night and my enjoyment of doing so has barely diminished. I felt this talk was a considerable improvement over my talk at Reading Geek Night 11, even if I did over-run by 20 minutes! Me and a former colleague co-presented on hardware and software integration.

The reason Sam and myself presented this talk was to highlight that integration between hardware and software isn't an abstract or complex process. With the wide variety of developer tools available, be it the free Visual Studio Express IDE, or indeed the open-source Arduino project.

The code files that both me and Sam created on the night are below, there is also a link to the back-up's we had coded before the event. This latter set of files are well-commented and considerably more 'polished' than the files we created live.

Arduino live-coded files
WPF live-coded files

Considerable differences between my live files and the complete files are listed below:

For completeness I have included both Sam's and my back-up code files below. I strongly recommend using these, rather than the live files above, for any actual tinkering you may do. However, it makes very interesting reading to see the differences between code written under pressure, and code written well!

Arduino complete files
WPF complete files

Finally, I planned to give the custom-built arduino shield (the board layout for which is above) away, but never quite managed it. I therefore decided to run a competition in the comments section of this post. The first blog comment for this post will be the question you have to answer, which I shall post at 8.00PM GMT on the 25th of November 2010. The first correct answer posted in the comments section of this article after that deadline, will win the shield. Do remember to use an accurate E-Mail address, otherwise I will not be able to contact you regarding shipping (which I shall be paying for, within the confines of the UK).

Josh said:

Time for the competition question!

If we denote a supply voltage 'Vs', the forward voltage drop of an LED as 'Vf' and the recommended forward current of that same LED as 'If', what is the equation to determine a suitable resistance of current-limiting series resistor?

Good luck!

Are you asking the Ohm's law? R = (Vs - Vf) / If

OK, after a respectful silence, I'll bite:

To find the value of resistor "R":
Where: vS = supply voltage vL = LED voltage L = LED current Ensure the chosen LED current is less than the maximum permitted, and convert the current measurement to amps (A) so the calculation gives the resistors value in ohms.

Josh said:

Well, well, well! I finally got my act together and can formally announce the winner of the competition. Who, as you can see above, is Pedro! So my congratulations, and the custom-built Arduino shield go to him.

While the equation is not technically Ohms Law, it has been derived from Ohms Law, which of course stipulates that a current is equal to the voltage across a load divided by the resistance of that load. At a given, constant temperature.