lesthegrngo Posted May 23, 2023 Share Posted May 23, 2023 If I want to drive two different LEDs as a particular warning light, can I assign an LED output to more than one pin? Cheers Les Link to comment Share on other sites More sharing options...
Vinc_Vega Posted May 23, 2023 Share Posted May 23, 2023 (edited) 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 May 23, 2023 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
No1sonuk Posted May 23, 2023 Share Posted May 23, 2023 I'd have thought you could just assign two LED code lines to different pins and alter the name slightly. Link to comment Share on other sites More sharing options...
Vinc_Vega Posted May 23, 2023 Share Posted May 23, 2023 Why don't use the advanced code and talk to more than one output? Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
No1sonuk Posted May 23, 2023 Share Posted May 23, 2023 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); 1 Link to comment Share on other sites More sharing options...
lesthegrngo Posted May 24, 2023 Author Share Posted May 24, 2023 Thanks guys, so different ways to do it. It won't be many instances, so even the longer version would be OK, so it's nice to know the ways Cheers Les 1 Link to comment Share on other sites More sharing options...
Recommended Posts