Group Abstract Group Abstract

Message Boards Message Boards

Configuring Arduino Uno R3 board?

Posted 9 years ago

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

POSTED BY: Marcel Pelletier
2 Replies
POSTED BY: Ian Johnson
POSTED BY: Marcel Pelletier
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard