Im trying to write more efficient code, but I get
cannot convert 'String' to 'uint8_t {aka unsigned char}' for argument '1' to 'void digitalWrite(uint8_t, uint8_t)'
the code will tell it all,
Is there a way to do this right?
Thank you friends,
Mitch
// RELAY BUTTONS
#define MOTOR_ON_PIN 24 // WHITE- K1
#define MOTOR_DIR_PIN 26 // GRAY K2
#define CLUTCH_UP_PIN 28 // PUROPLE K3
#define CLUTCH_KEAD_PIN 46 //BLUE K4
#define CLUTCH_TAP_PIN 48 // GREEN K5
#define K6_PIN 52 // YELLOW K6
#define K7_PIN 50 // ORANGE K7
#define K8_PIN 22 // BROWN K8
String Outputs [] = {"0", "MOTOR_ON_PIN", "MOTOR_DIR_PIN", "CLUTCH_UP_PIN","CLUTCH_KEAD_PIN","CLUTCH_TAP_PIN","K6_PIN","K7_PIN","K8_PIN","","", };
void setup() {
Serial.begin (115200);
pinMode(MOTOR_ON_PIN, OUTPUT);
pinMode(MOTOR_DIR_PIN, OUTPUT);
pinMode(CLUTCH_UP_PIN, OUTPUT);
pinMode(CLUTCH_KEAD_PIN, OUTPUT);
pinMode(CLUTCH_TAP_PIN, OUTPUT);
pinMode(K6_PIN, OUTPUT);
pinMode(K7_PIN, OUTPUT);
pinMode(K8_PIN, OUTPUT);
for (int i=1; i<9; i++)
{
digitalWrite(Outputs[i], HIGH);
delay (1000);
}
}
void loop() {
// put your main code here, to run repeatedly:
}