I defined an extention which has a parameter of type “drop list”. Its name is “mydirection”.
its values are:
a,1
b,2
stop,3
I’d like to convert it as arduino c code, how can I use it in “code” section?
I tried the guidance of javascript, such as {mydirection}, but it doesn’t work.
This my declare section:
void control_my_motr(int direction){
if(direction ==1){
digitalWrite(16,0); digitalWrite(17,1);
}else if(direction ==2){
digitalWrite(16,1); digitalWrite(17,0);
} else {
digitalWrite(16,0); digitalWrite(17,0);
}
}
And this is the code section:
control_my_motr({mydirection});