I had to encode a couple of 2009 R6 transponder keys today and I found the instructions on the internet to be a little off so I figured I'd post amended instructions here so maybe they'll show up in a google search for some one else (or myself in about 4 years time when I look them up again).
Read all steps before starting, step 3 & 4 must be done in rapid sucession with no delay, be read for step 4 before you do step 3.
1. Insert the red key into the ignition and turn it to "ON" and start the engine.
2. Shut off the engine and remove the red key. The immobilizer indicator light should start to blink after about 20 to 30seconds.
3. Insert the red key into the ignition and turn it to "ON", then "OFF" immediately, don't wait for the system check / gauge check to complete, just flip it on and off right away with no pause.
4. Insert the black key into the ignition and turn it to "ON" immediately after removing the red key. (With no pause or delay, some say with in 5 seconds, but I think it's more like with in 3 seconds).
5. Wait for the immobilizer indicator light to stop flashing, it will flash consistently about 5 or 6 times and the last flash will be a quick double flash, now remove the key.
6. now put the key back in and the engine should start, error code 52 means you did it wrong, try again, also don't have the red/black key too close like on the same key chain they allegedly interfere if they're too close.
Once I cleaned up the instructions (from the interweb version) to this version, I was able to encode both keys, the other internet instructions were slightly off and I failed about 8 times with those original ones.