hi.
i have 3 varaibles in a string:
char motor_one_pins[]= "dirA1" "dirB1" "pwm1";
i want to print them in one line one by one. so the output will be:
dirA1, dirB1, pwm1
the actual code looks like that:
int motor_one(){
char motor_one_pins[]= "dirA1" "dirB1" "pwm1"
}
and i want the function "motor_one" to return "dirA1, dirB1, pwm1" so the function ahead will get these pins numbers:
void move_forward(int pinA, int pinB, int speed){
wheels_pwm.setPWM(pinA, 0, angleToPulse(0) );
wheels_pwm.setPWM(pinB, 0, angleToPulse(0) );
wheels_pwm.setPWM(pwm1p, 0, angleToPulse(speed) );
}
so when i call her it will look like this:
move_forward(put here the string);
so the final result will be "move_forward(dirA1, dirB1. pwm1);"
is there a way?
i use these 3 vars a lot in my code in the same order and want to do a little shortcut.
thanks!