Rapti

Untitled

Apr 1st, 2023
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #define DCSBIOS_IRQ_SERIAL
  2.  
  3. #include "DcsBios.h"
  4. #include <TM1637TinyDisplay.h>
  5.  
  6. DcsBios::RotaryEncoder tacan10("TACAN_10", "DEC", "INC", 5, 4);
  7. DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", 7, 6);
  8. DcsBios::Switch2Pos tacanXy("TACAN_XY", A1);
  9. const byte tacanModePins[5] = {8, 9, 10, 11, 12};
  10. DcsBios::SwitchMultiPos tacanMode("TACAN_MODE", tacanModePins, 5);
  11. DcsBios::Switch2Pos tacanTestBtn("TACAN_TEST_BTN", 13);
  12. DcsBios::Potentiometer tacanVol("TACAN_VOL", A0);
  13.  
  14. TM1637TinyDisplay tm1637(2,3); //CLK,DIO This creates an instance of a single controller named "tm1637" for the UHF Channel
  15.  
  16. void onTacanChannelChange(char* newValue) {
  17. tm1637.showString(newValue);}
  18. DcsBios::StringBuffer<4> tacanChannelBuffer(0x1162, onTacanChannelChange);
  19.  
  20. void setup(){
  21. DcsBios::setup();
  22. tm1637.setBrightness(0x0f);
  23. tm1637.clear();
  24.  
  25. }
  26. void loop()
  27. {
  28. DcsBios::loop();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment