Jump to content

Using more than one Arduino pin as LED output


lesthegrngo

Recommended Posts

Yes, you have to declare the pins as output in the setup routine and than just set it High or Low as usual.

Regards, Vinc


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Because this is simpler:

DcsBios::LED masterCautionA(0x1012, 0x0800, 2);
DcsBios::LED masterCautionB(0x1012, 0x0800, 3);

than this:

//  In setup routine:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);

 

void onMasterCautionChange(unsigned int newValue) {
    digitalWrite(2,newValue);
    digitalWrite(3,newValue);
}
DcsBios::IntegerBuffer masterCautionBuffer(0x1012, 0x0800, 11, onMasterCautionChange);

 

 

  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...