Hello,
I am a complete Novice to programming arduino and I am struggling to understand the programming language.
I have bought myself the below listed items with intention of having them operate a set of 4 nanotec SC4118L1804-KPRO Stepper Motors from conventional G-Code.
List of items:
Arduino UNO
Adafruit Motor Sheild V2.3 (another is on order)
4x SC4118L1804-KPRO
I have read through the adafruit guide and have come up with the following so far:
//void setup() {
// put your setup code here, to run once:
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include //void setup() {
// put your setup code here, to run once:
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_StepperMotor *myMotor = AFMS.getStepper (200, 1);
setSpeed(uint16_t = 100)
step(uint16_t = 400, uint8_t = FORWARD, uint8_t = MICROSTEP)
}
My logic behind this was predominantly taken from the instructions provided by adafruit but again I am a complete novice. I understand that my motors are 3.15V 1.8A 2 Coil 4 Wire Stepper motors and they are therefore attatched to the M1 and M2 pins on the Motor Sheild. I copied the sketch files as instructed on the adafruit page and noticed immediately that the line reading #include "utility/Adafruit_PWMServoDriver.h"' is incorrect as the file name was in fact Adafruit_MS_PWMServoDriver.h hence the alteration there. I then set the motor values as instructed (1.8 degrees per step equates to 200 steps per revolution) meaning 200 as the steps per rev and 1 because I am using M1 and M2 as the motor connections. From there I got confused as to how it should go and just fiddled until the error messages stopped as much as possible. what else do I need to do/change to get to my goal of operating from G-Code?
Many thanks to anyone who can help me with this.
regards
mike