I do have an update on this actually. I’m trying to utilize the Shield Shield, and this Ardumoto shield from Sparkfun: https://www.sparkfun.com/products/9815 as well as dive into the Web Build platform.
I’m basically trying to port some of my arduino code that drives this shield to the SC, by defining alternate pins and with my own digital and analogWrites in the rcCarControl function, based on the Spark Core RC example code. I’m a little unfamiliar with the pin initialization for SC and whether I’m defining the proper pins correctly. The moto shield uses 3, 11, 12, and 13.
My original arduino inits:
const int driveSpeedPin = 3; //PWM for Forward / Reverse Speed
const int driveDirPin = 12; //Control Forward / Reverse Direction
const int steerSpeedPin = 11; //PWM for Steering Speed
const int steerDirPin = 13; //Direction control for Left / Right
Seem to work here, but the end result is that my car doesn’t move after sending a seemingly correct POST. I noticed in other examples that pins are typically defined similar to:
int pinZero = D0;
I tried to emulate this, but D11,D12, and D13 aren’t recognized by the Web Builder. The app does seem to compile and deploy with the arduino init code. I can post with:
curl -k "https://api.spark.io/v1/devices/<id>/rccar" \ -d "<token>" \ -d args=rc,FORWARD"
and receive:
{
"id": "<id>",
"name": "BlueLou_1",
"last_app": null,
"connected": true,
"return_value": 1
}
So that part seems to be working. There’s a ton of moving parts I’m sure, but so far the only thing not moving is my car!
Any tips, or incredibly obvious things I should try?