I'm an old hand at AVR coding, but I'm new with the Arduino platform.
My board is an industrial version of the mega (2560).
I have a pair of stepper motors that I need to control, with acceleration and deceleration as well as limiting max speed and setting up small differences in speed.
The good news is that all the heavy lifting is handled by the KL-5056 modules which drive the motors. I need to set up a pulse rate one pin for each motor.
I need to set up a timer to toggle pins 44 and 45, with the possibility of toggling them at slightly different rates later on. For now I'll be happy to have both pins working at the same time.
Given that I'm not going to use the servo library, how can I be sure that timer 5 is open for me to use without conflicts in the other libraries?
Here's my included libraries. At the moment I am not using most of this.
#include <Arduino.h>
#include <SPI.h>
#include <SD.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <PLDuino.h>
#include <PLDTouch.h>
#include <PLDuinoGUI.h>
#include <using_namespace_PLDuinoGUI.h>
#include <Time.h>
#include <Wire.h>
#include "utils.h"
My main I/O is working, my major struggle is now to figure out how to get at the timer in the Arduino environment and use its interrupts to get the job done.