2007-02-01

I have a plan




... and a prototype. This is a brave, new prototype for my dancepad sensors, using an off-the-shelf weight/force sensor from a cheap digital scale in a Wheatstone bridge, driving up the voltage differential with a op-amp and then using the other half of the dual op-amp to make it more digital with a Schmitt-trigger.

The protoboard probably has a few extra components that aren't really necessary, the opamp should have enough power to drive two transistors, but in this version the op-amp drives an LM311 comparator, that has an open-collector open-emitter output. Since the differential amp + Schmitt-trigger are connected inverted, this arrangement suits perfectly, as the comparator collector can be inverted using a pull-up resistor.

Now "all" that's left to do is finalize the calculations for gain-resistors in the diff-amp, draw a pcb, order a few parts and duplicate this circut 18 (or 16) times = 2 pads, 9 or 8 contacts each. I haven't really decided on the center button yet. It would be nice, but it's not really that necessary in the near future. The good thing is, if I make the pad-structure properly I could add the 9th sensor pretty easily.

Oh, one thing I forgot in the above list: build the pads. That means lots of plywood, several smaller chunks of wood, polycarbonate and a wide variety of other strange pieces of hardware.

I also have a cunning plan for the player menu controls for the pad, as I don't like the foot-operated switches so many DIY dancepad projects use. And since I'm using force-sensors here, you can be assured that the other parts are going to utilize something weird too.

2006-09-20

Python 2.5 released

Python 2.5 has been released into the wild, now with more features! One of those new features are conditional expressions, similar to the ternary ?: -operator in C/C++ and some other languages. And to show a bad example of how useful a feature it is, here's a small snippet returning a float range generator utilizing anonymous generators, conditional expressions and lambda functions:

frange=lambda start, stop=0.0, step=1.0, include_stop=False:
(
(min if step > 0 else max)((start, stop)) + index*step
for index in xrange(int(abs(start - stop) / abs(step) + 1))
if index*step < (abs(start-stop) + (step if include_stop else 0))
)


Like the xrange() and range() functions, the generated sequence does not include the stop-value. However, since inclusive ranges are quite useful with floats, the default behaviour can be overridden by setting the include_stop argument to True. In this case the stop-value is included in the range if it is a multiple of steps from start.

2006-08-31

Waiting for a better day

I've started to get comment-spam recently more than I care, so until I've upgraded the blog-engine from the ancient MT2.6 to something better, I've disabled comments, as they've not been so often used a feature anyway (partly because I haven't updated my blog in ages).

2006-06-18

Rannoilla Saimaan


Valoisat yöt Saimaan rannalla ovat innoittaneet monia Suomen runoilijoita. Hikiset päivät samaisen rannan läheisyydessä ovat puolestaan jättäneet jälkensä Suomen kansallismaisemaan.

2006-05-09

terassikausi avattu


Kauan sitä saikin odottaa, ennenkuin ehti tänäkeväänä terassille. Aurinkokaan ei oikein enää paista, mutta ei se mitään.

2006-04-08

Kyllä kestää


Muutaman mäntytukin kuoriminen oli hauskaa vaihtelua. Lisäksi lopussa tuli kerättyä viimeisten tukkien päältä pari muovipussillista pettutarpeita talteen. Jalaksen turvakengät tosin eivät kestäneet operaatiota täysin vaurioitta. Onneksi kengän ja sukan väliin mahtui mukavasti muovipussi (ei ne, joihin kerättiin pettua) pitämään jalat suunnilleen kuivina, vaikka lopussa risut tökkivätkin kengän edesmenneen pohjan läpi muutamia reikiä.

2006-03-17

Putty for Symbian OS

There was one thing I didn't like about in s2putty: it didn't take advantage of the full resolution available on the device, but used traditional resolution that was scaled up. The result was a bit fuzzy, and nearly gave me a headache.

I downloaded the latest beta source, as it is supposed to support S60 3rd Ed and the double resolution. A quick browse thru the sources revealed that it should support double resolution on N90 as well, if it provided the proper flag for the OS. Reading the 2nd Ed FP 3 C++ SDK docs I realized all I have to do is recompile the project with the correct SDK, and the ELayoutAwareAppFlag is turned on. The other choice would've been to find the CAknAppUi::BaseConstructL() method and give it the flag, but since this required no source changes it was the way to try out first...

Workes like a charm, the text is crisp and clear, with the 5x7 font it gives a 70x53 terminal window in fullscreen mode.

If you don't want to compile the project your self, you can download s2putty 1.4.1 beta 1 for S60 2nd Edition FP 3 (PGP Signature) and install it on your device, if you trust me enough :-)

Update: it does have a small problem with fullscreen setting, if you store fullscreen mode as default. It won't activate fullscreen UI mode at startup, although the internal state is set to believe it is in fullscreen mode. You have to toggle fullscreen mode twice (off-on) to actually use it in fullscreen mode.