Hi, I want to upload a basic sketch to Arduino Uno R3 board. This is the sketch:
int ON=500;
int OFF=500;
void setup() {
pinMode(7,OUTPUT);
}
void loop() {
digitalWrite(7, HIGH);
delay(ON);
digitalWrite(7, LOW);
delay(OFF);
}
This is simple to do with the IDE but how can I do this with Mathematica?
I know the DeviceConfigure command will do it but I have difficulties to do it...
DeviceConfigure[arduino, "Upload" -> "BootFunction" -> <|"Code" -> {
{"int", "ON" -> 500},
{"int", "OFF" -> 500},
{"void", "setup()"},
{"pinMode(7,OUTPUT)"},
{"void", "loop()"},
{"digitalWrite(7,HIGH)"},
{"delay(ON)"},
{"digitalWrite(7,LOW)"},
{"delay(OFF)"}
}|>]
Thank you for your help.
Marcel Pelletier