We now have created a platform on Hackster.IO for the Pulse Train Hat, if you could help us by becoming a member, then it would help us a lot as we need 25 members to get it featured.
Pulse Train HAT changing speed on the fly example using Instant Commands
With this example, we show how to use the PTHAT being used to control the speed of a Closed Loop Servo motor and Closed Loop Stepper Motor.
This also shows the resolution of the pulse train enables precision speed, down below 1 RPM
Within the application you first connect to your Raspberry Pi serial port by clicking the Connect button.
Now you can click on the Start button and the motor will spin up to the speed you have set by sending a Set Axis Command and a Start Axis Command.
Changing the speed is easy, simply choose the resolution of the RPM you wish to use and click on the arrow keys. This will send a Change Speed on the Fly command and the motor will change it’s speed to the new speed that has been set.
Commands used in this example are:
Set Axis Command Start Axis Command Stop Axis Command Pause/Resume Axis Command Change Axis Speed on the fly Command Request Firmware Version Reset PTHAT
In this video we demonstrate the application.
The end developer has easily modify this example to build their own application.
The example application was developed in Visual Studio 2015 that can be used with Windows 10 IOT on the Raspberry Pi or compiled to x86/x64 for use on a PC.The example has been written in C# as a Universal Windows Platform (UWP).
Please use the following link to download the full source code.