STM demo source code