hi there!

This is where I post stuff that I find interesting (which is potentially a lot of things!). If you would like to reach me, send an email to jeremy (dot) 006 (at) gmail (dot) com. Thanks!

australia has a female prime minister

sup iceland. (more info here)

2010-06-24 15:42:54 | comments

fun facts about the zimbabwean dollar

In June 2008, the inflation rate was 6.5 quindecillion novemdecillion percent.

In July 2008, a single chicken egg was worth ZW$50 billion.

When the currency was suspended at the end of 2009, US$1 was worth ZW$669 000 000 000 (also: this was the third dollar, with the ratio of first:second being 1 000:1 and the ratio of second to third being 1 000 000 000:1).

The company which provided the Zimbabwe Reserve Bank with the software to print banknotes was required by the EU Union to suspend all licences so that no higher denomination notes could be printed.

As of 1/1/09, an original Zimbabwean dollar was worth US$10-31

2010-06-17 12:28:11 | comments

video of a dendritic cell engulfing conidia

This is an awesome video of a dendritic cell performing phagocytosis on a conidia. Maybe I'm just a little weird (well, almost certainly), I just think it is awesome to see that such tiny things can actually have independent function. A quick explanation:

Dendritic cells are important in the innate (primary) immune system. They basically grab bits of antigens (things that should not be in the body) and present them to the rest of the immune system so that an appropriate response can occur.

Source: Wikipedia
Original video authors: Judith Behnsen, Priyanka Narang, Mike Hasenberg, Frank Gunzer, Ursula Bilitewski, Nina Klippel, Manfred Rohde, Matthias Brock, Axel A. Brakhage, Matthias Gunzer

(can't see the video? try using a real browser)

2010-06-12 23:03:14 | comments

running is good for you!

It's nice to see some people looking at the hard science instead of saying "it didn't work for my cousin/brother/sister/unkle so I won't try at all".

(looks like the linked page doesn't exist anymore, so here is the proper source.)

2010-06-03 13:41:53 | comments

document publishing (and an avr tutorial)

I have been looking for a decent web document publishing system for a while. I toyed with the idea of writing my own at some stage, but I have recently discovered instiki, a great rails sort-of-wiki. I have installed it (you can check it out at docs.jeremyherbert.net) on my server and begun to tackle my AVR Guide, something that I have wanted to do for quite some time. I mean, why should arduino users get all the fun ?

2010-05-20 20:08:32 | comments

an important rule for programming USB HID descriptors

It is very important to remember that when building USB HID device descriptors, you need to make sure the number of bits being sent is divisble by 8. For example, A descriptor for a gamepad with 2 bits for each axis and 4 buttons might look like this:

0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
0x09, 0x05,                    // USAGE (Game Pad)
0xa1, 0x01,                    // COLLECTION (Application)
0x09, 0x01,                    //   USAGE (Pointer)
0xa1, 0x00,                    //   COLLECTION (Physical)
0x09, 0x30,                    //     USAGE (X)
0x09, 0x31,                    //     USAGE (Y)
0x15, 0xff,                    //     LOGICAL_MINIMUM (-1)
0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
0x95, 0x02,                    //     REPORT_COUNT (2)
0x75, 0x02,                    //     REPORT_SIZE (2) ; two bytes to represent each axis
0x81, 0x02,                    //     INPUT (Data,Var,Abs)
0xc0,                          //   END_COLLECTION
0x05, 0x09,                    //   USAGE_PAGE (Button)
0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
0x29, 0x04,                    //   USAGE_MAXIMUM (Button 4)
0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
0x95, 0x04,                    //   REPORT_COUNT (4) ; 4 buttons
0x75, 0x01,                    //   REPORT_SIZE (1)
0x81, 0x02,                    //   INPUT (Data,Var,Abs)
0xc0                           // END_COLLECTION

Hopefully you can see the part up the top specifies the joypad and the bottom specifies the buttons. So if we have 2 axis bits and 4 button bits, we have a total of 8 bits (which is perfect!). However, what if we want to use 5 buttons? If you simply change the USAGE_MAXIMUM and REPORT_COUNT parameters, then we are sending 2*2+5*1 = 9 bits! To fix this, we need to add some padding bits to bring our total number of bits up to 16 (in this case, we want to add 7 more). A descriptor with this fix would look something like this:

0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
0x09, 0x05,                    // USAGE (Game Pad)
0xa1, 0x01,                    // COLLECTION (Application)
0x09, 0x01,                    //   USAGE (Pointer)
0xa1, 0x00,                    //   COLLECTION (Physical)
0x09, 0x30,                    //     USAGE (X)
0x09, 0x31,                    //     USAGE (Y)
0x15, 0xff,                    //     LOGICAL_MINIMUM (-1)
0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
0x95, 0x02,                    //     REPORT_COUNT (2)
0x75, 0x02,                    //     REPORT_SIZE (2) ; two bytes to represent each axis
0x81, 0x02,                    //     INPUT (Data,Var,Abs)
0xc0,                          //   END_COLLECTION
0x05, 0x09,                    //   USAGE_PAGE (Button)
0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
0x29, 0x05,                    //   USAGE_MAXIMUM (Button 5)
0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
0x95, 0x05,                    //   REPORT_COUNT (5) ; 5 buttons
0x75, 0x01,                    //   REPORT_SIZE (1)
0x81, 0x02,                    //   INPUT (Data,Var,Abs)
0x95, 0x07,                    //	REPORT_COUNT (7) ; to pad out the bits into a number divisible by 8
0x81, 0x03,                    //   INPUT (Const,Var,Abs)
0xc0                           // END_COLLECTION

2010-05-15 22:58:45 | comments

note to self

When playing with a new avr, always clear the CKDIV8 fuse because you will try to use uart and subsequently waste hours trying to work out what is wrong with your circuit. If your serial output looks anything like this (hex):

00 80 00 00 80 80 80 00 80 00 00 00 80

then this is your problem.

2010-04-27 10:32:14 | comments

lessons learned wiring a planar el320.240.36 hb to the usb13700

more to come!

2010-04-24 20:53:23 | comments

oh, nice

Look what just found its way across my desk: front, back.

2010-04-19 18:59:30 | comments

climate change

These two guys pretty well sum up how I feel about it. I'm glad there are still sane people out there.

Reproduced for historical purposes:

comment by SuperKendall:

One one side you have people who ignore scientific evidence for financial gain.

On the other side you have... those who ignore scientific evidence for financial gain.

Science got way lost in the middle of this whole debate. Indeed the very term "debate" is laughable, as it is currently a which hunt on both sides.

And you, sir, are not helping by demonizing those who think differently than you.

reply by FooAtWFU:

I want to give you a hug, man. (But I won't. I respect your personal space.)

I'm one of those guys who suspects that global warming is probably a real phenomenon, but that its coverage in the media is mostly-fake, its coverage in science proper is mildly biased and exxagerated as an institutional matter (cf. 'climategate', overrated as it may be) and the public policy prescriptions that are preached by Al Gore are mostly nonsense. But more importantly, the state of the "debate" is shameful.

Do I get to be called a "denialist" too?

 

2010-02-28 19:09:49 | comments
CC 2.5 License Support ScienceCommons!
open