Here are som links to get you started. I have no idea how modules are programmed, so I haven't actually read these guides. But I remembered seeing some free books some weeks ago, so I googled for them again. There are some examples in at the end of the first link. The second link is a free book you can buy or download.
I know theres at least one more free book out there, somewhere. But you probably have enough pages to read now