Mon Mar 07, 2016 2:45 pm
I recall finding it fairly confusing to work with that document, but I put together a program that operates a PWM-controlled linear motor on the Gertbot. You can find my stuff at [url]https:experix.sourceforge.net[/url] in the Download files section. Get the latest experix distribution and look at sources and help files in dist/source/xpx_local. The C code to operate the gertbot is in gpioRPI.c and this has comments on addressing and so on. One thing about using the UART for this sort of stuff-- you are doing many short input and output transactions, and if you do it via the /dev file, each one involves the whole operating system call, context switch business, which takes a lot of time. So I moved those operations into user-space and got about 7x speed improvement. It's rather rough code right now but it works.