Go Down

Topic: can someone help me writing the matlab code for this arduino program ? Please (Read 502 times) previous topic - next topic

int ledCount = 3;
int ledPins[] = {  11, 12, 13 };
int ledDelay = 1000;

void setup() {
  for (int thisLed = 0; thisLed < ledCount; thisLed++) {
    pinMode(ledPins[thisLed], OUTPUT);
  }
}

void loop() {
  for (int thisLed = 0; thisLed < ledCount-1; thisLed++) {
    digitalWrite(ledPins[thisLed], HIGH);
    delay(ledDelay);
    digitalWrite(ledPins[thisLed], LOW);
  }
  for (int thisLed = ledCount-1; thisLed > 0; thisLed--) {
    digitalWrite(ledPins[thisLed], HIGH);
    delay(ledDelay);
    digitalWrite(ledPins[thisLed], LOW);
  }
}

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


AWOL

You posted "the code" (badly, but you can go back and correct it) in your original post.
What are you asking for?
Should this be in the "Interfacing" section, or in "Gigs and collaborations"?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

i wanna contol my LEDs in the arduino board through matlab. now what should i post and where ?

PaulS

Quote
now what should i post and where ?

It sounds like you should be posting an offer to pay someone to write code for you, in Gigs and collaboration. Here, we're willing to help you understand the issues well enough to write the code yourself. But, it sounds like you have no clue about matlab and no interest in getting such a clue.

Go Up