SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Kits category should be posted in this forum.
User avatar
By TS-Mark
#204922
Hi RBEKHOUT,

Are you sending negative values (-130 to -255) in the serial monitor? If you are seeing the motor start and stop quickly, try turning on "No Line Ending" in the serial monitor and then re-send the speed values. That should resolve the issue.
User avatar
By RBEKHOUT
#204945
Hi TS-Mark,
I've gone back over the wiring and code again and noticed a difference in the wiring picture in the SFIK book compared to the code.
the SFIK book wiring picture shows a green wire from motor driver PWMA to digital pin 13, however, the code tells AIN2 to be pin 13.


what is in the code:
Code: Select all
//PIN VARIABLES
//the motor will be controlled by the motor A pins on the motor driver
const int AIN1 = 13;           //control pin 1 on the motor driver for the right motor
const int AIN2 = 12;            //control pin 2 on the motor driver for the right motor
const int PWMA = 11;            //speed control pin on the motor driver for the right motor

what should be in the code:
Code: Select all
//PIN VARIABLES
//the motor will be controlled by the motor A pins on the motor driver
const int AIN1 = 12;           //control pin 1 on the motor driver for the right motor
const int AIN2 = 11;            //control pin 2 on the motor driver for the right motor
const int PWMA = 13;            //speed control pin on the motor driver for the right motor

Interestingly, the code history on GitHub shows the correct code at some point. the most recent (including the library downloaded to my system) has the error.

A lesson for me in checking logic as I go from now on.
User avatar
By TS-Mark
#204970
Good catch! There are a few errors in the SIK Guidebook that comes with the kit that should be covered in the included Errata sheet. What I recommend for you and other users of the SIK is to follow the Online Experiment Guide. That will have the most up-to-date and correct circuits and code.

Let us know if you run into any other issues with your Inventor's Kit or if you have any questions about it and we would be happy to help.