Jump to content

WhoMadeWho

Members
  • Posts

    77
  • Joined

  • Last visited

About WhoMadeWho

  • Birthday January 1
  1. Great writeup Hansolo!:thumbup::thumbup:
  2. Switches See attached. I've had these for a few years. Unfortunately I don't recall where I found these. Hopefully these help you out. Switches.zip
  3. Checkout http://www.digikey.com . I've bought many switches from them.
  4. Thanks Warhog, I'll PM you my email address. Here's the dimensions of my RWR. Very tight getting the monitor to fit, but it works. Since using screws would put holes thru the screen, I ended up using strong double-sided tape to stick the entire assembly to my panel. Width (X) = 73.138 mm Height (Y) = 78.89 mm
  5. Thanks Warhog for the RS-487 advice! I have RS-487 8 pin DIPs on order along with sockets for them. I've not been able to find any ready made boards that have RS-487 chips for Arduinos for some reason - only ones with 485s. My RS-487 chips were ordered from Digikey and not eBay, so hopefully I won't run into issues with counterfeit chips running hot or not working at all. I recall reading more than a few threads on here with folks having multiple issues with the 485s.
  6. Hi Boltz, I had trouble finding small display as well. I ended up using a 3.5 inch screen which only has a composite input. Due to this, I'm using a VGA to composite converter I got off Amazon. The monitor itself is from Adafruit - https://www.adafruit.com/product/913 Here are a few photos showing how it went together. The monitor is mounted in portrait orientation in a box I made on my CNC. The screws on the face are fake (just screw heads glued on) due to space issues. The target reticle was done with neon green acrylic on my CNC. Hope this info helps!
  7. Thanks Hans! I'll be sourcing some RS485 chips/boards tonight. I found a few threads on here to get me started. My poor USB bus! :smilewink::smilewink:
  8. Hi jrsteensen, I've not yet tackled the attitude indicator. This is an actual instrument out of a Blackhawk helicopter. Its electrically driven and has no gyros inside. I believe it was a backup indicator incase the gyro indicator on the pilots side went inop. My plans for it are to see if I can drive the original (24-volt I believe) motors with an Ardunio. For this, I believe I'll need something to step-up the voltage. For centering I've been using an IR light sensor on my DG indicator, however this has been somewhat unreliable. Of course if anyone has done a real attitude indicator with DCS-BIOS, I'd love to see it. I've seen many folks using LCD displays, but for me I want the real mechanical indicator.
  9. Thought I'd share some photos of my A10C cockpit build progress. The front panel is partial and on a test stand. I REALLY need to figure out RS485/RS487. 23 COM ports are being used... Sometimes I have issues with them going read-only (per SOCAT). :pilotfly:
  10. Hi all, I've been searching around, reading posts (some 9+ years old) trying to figure out if there is a way to set the default view when you first click the Fly button. I want to see the ALT-F1 viewpoint on start without pressing keys. Is this possible without running a macro program? Thanks!
  11. Thanks again to Blue73 for the code! After adding his custom Switches.h and modifying my sketch, I was finally able to get DCS-BIOS to reflect the state of my switches at startup. Code from my sketch (Master Arm panel from the A10) /* Tell DCS-BIOS to use a serial connection and use interrupt-driven communication. The main program will be interrupted to prioritize processing incoming data. This should work on any Arduino that has an ATMega328 controller (Uno, Pro Mini, many others). */ #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" //// WARNING //// WARNING - using custom Switches.h so switch init reflects current switch positons at init //// WARNING // GUN/PAC GUNARM - SAFE - ARM DcsBios::Switch3Pos ahcpGunpac("AHCP_GUNPAC", 2, 3); // GND = Gray, 2 = White, 3 = Blue // Master Arm TRAIN - SAFE - ARM DcsBios::Switch3Pos ahcpMasterArm("AHCP_MASTER_ARM", 4, 5); // GND = Green + Purple, 4 = White, 5 = Orange // Laser Arm TRAIN - SAFE - ARM DcsBios::Switch3Pos ahcpLaserArm("AHCP_LASER_ARM", 6, 7); // GND = Purple + White, 6 = Blue, 7 = Orange // TGP OFF - ON DcsBios::Switch2Pos ahcpTgp("AHCP_TGP", 8); // GND = Brown, 8 = Yellow // Altimeter Source RADAR - DELTA - BARO DcsBios::Switch3Pos ahcpAltSce("AHCP_ALT_SCE", 9, 10); // GND = Gray, 9 = Blue, 10 = Purple // Hud Mode NIGHT - DAY DcsBios::Switch2Pos ahcpHudDaynight("AHCP_HUD_DAYNIGHT", 11); // GND = Green, 11 = Orange // Hud Mode STBY - NORM DcsBios::Switch2Pos ahcpHudMode("AHCP_HUD_MODE", 12); // GND = White, 12 = Yellow // CICU OFF - ON DcsBios::Switch2Pos ahcpCicu("AHCP_CICU", 14); // GND = White, 14 = Purple // JTRS OFF - ON DcsBios::Switch2Pos ahcpJtrs("AHCP_JTRS", 15); // GND = Orange, 15 = White // IFFCC OFF - TEST - ON DcsBios::Switch3Pos ahcpIffcc("AHCP_IFFCC", 16, 17); // GND = Brown + Green, 16 = Yellow, 17 = Blue unsigned int g_iCounter = 0; void PollAllControls() { ahcpGunpac.pollInputCurrent(); ahcpMasterArm.pollInputCurrent(); ahcpLaserArm.pollInputCurrent(); ahcpTgp.pollInputCurrent(); ahcpAltSce.pollInputCurrent(); ahcpHudDaynight.pollInputCurrent(); ahcpHudMode.pollInputCurrent(); ahcpCicu.pollInputCurrent(); ahcpJtrs.pollInputCurrent(); ahcpIffcc.pollInputCurrent(); } void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); if (++g_iCounter > 60000) { g_iCounter = 0; PollAllControls(); } }
  12. Thanks Blue73 for the reply! I tried inserting your code but get an error at compile time - "Expected class-name before '{' token".. Can you tell me where I went wrong? Sorry, I'm probably missing something really obvious..:helpsmilie: #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" // Start class from Blue73 class Switch2Pos : PollingInput { private: const char* msg_; char pin_; char lastState_; bool reverse_; void init_(const char* msg, char pin, bool reverse) { msg_ = msg; pin_ = pin; pinMode(pin_, INPUT_PULLUP); lastState_ = digitalRead(pin_); reverse_ = reverse; } void pollInput() { char state = digitalRead(pin_); if (reverse_) state = !state; if (state != lastState_) { if (tryToSendDcsBiosMessage(msg_, state == HIGH ? "0" : "1")) { lastState_ = state; } } } public: Switch2Pos(const char* msg, char pin, bool reverse) { init_(msg, pin, reverse); } Switch2Pos(const char* msg, char pin) { init_(msg, pin, false); } void pollInputCurrent() { char state = digitalRead(pin_); if (tryToSendDcsBiosMessage(msg_, state == HIGH ? "0" : "1")) { lastState_ = state; } } }; // End class from Blue73 // TGP OFF - ON DcsBios::Switch2Pos ahcpTgp("AHCP_TGP", 8); // GND = Brown, 8 = Yellow void setup() { DcsBios::setup(); ahcpTgp.pollInputCurrent(); } void loop() { DcsBios::loop(); }
  13. Hello, I'm wondering if anyone has found a way to sync **current** switch positions into DCS-BIOS. Problem is I need to cycle switches back and forth before DCS-BIOS knows where my switch is set. I recall reading something would be added into DCS-BIOS v2 but I know the author is busy with school. Any ideas? Thanks all! :) /* Tell DCS-BIOS to use a serial connection and use interrupt-driven communication. The main program will be interrupted to prioritize processing incoming data. This should work on any Arduino that has an ATMega328 controller (Uno, Pro Mini, many others). */ #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" // GUN/PAC GUNARM - SAFE - ARM DcsBios::Switch3Pos ahcpGunpac("AHCP_GUNPAC", 2, 3); // GND = Gray, 2 = White, 3 = Blue // Master Arm TRAIN - SAFE - ARM DcsBios::Switch3Pos ahcpMasterArm("AHCP_MASTER_ARM", 4, 5); // GND = Green + Purple, 4 = White, 5 = Orange // Laser Arm TRAIN - SAFE - ARM DcsBios::Switch3Pos ahcpLaserArm("AHCP_LASER_ARM", 6, 7); // GND = Purple + White, 6 = Blue, 7 = Orange // TGP OFF - ON DcsBios::Switch2Pos ahcpTgp("AHCP_TGP", 8); // GND = Brown, 8 = Yellow // Altimeter Source RADAR - DELTA - BARO DcsBios::Switch3Pos ahcpAltSce("AHCP_ALT_SCE", 9, 10); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
  14. Checkout http://www.digikey.com. Huge selection and very prompt shipping, usually same day.
×
×
  • Create New...