Writing a kernel module is very simple indeed. I've written a kernel module for data convertion from ASCII into morse code. The morse code is sent to the LED's from the keyboard. The code is closly explained at How to write linux driver.