Start with looking at the cpuplot example.

Uwe