Added sine wave plotting to demonstrate motor timing