Jump to content

Hansolo

Members
  • Posts

    1775
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Hansolo

  1. Found a very neat solution for making own mag switches on another site. That is truely beautiful work http://www.checksix-forums.com/viewtopic.php?f=286&t=176874&start=350 Cheers Hans
  2. Not an expert but looks like you are defining the Mega as both RS485 Master and serial communication at the same time. I believe this is the DCS-BIOS RS485Master sketch /* Tell DCS-BIOS this is a RS-485 Master. You will need to flash this to a Mega 2560. */ #define DCSBIOS_RS485_MASTER /* Define where the TX_ENABLE signals are connected. You can connect up to three half-duplex RS-485 transceivers. Arduino Pin RS-485 Transceiver Pin TXn ------------------- DI (driver input) RXn ------------------- RO (Receiver Output) UARTn_TXENABLE_PIN ---- /RE, DE (active low receiver enable, driver enable) If you have less than three transceivers connected, comment out the corresponding #define UARTn_TEXENABLE_PIN lines for receivers that are not present. */ #define UART1_TXENABLE_PIN 2 #define UART2_TXENABLE_PIN 3 #define UART3_TXENABLE_PIN 4 #include "DcsBios.h" void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } But you have also included #define DCSBIOS_DEFAULT_SERIAL I am fairly sure you shouldn't use this along with the RS485 master sketch. Cheers Hans
  3. Neat looking construction you have made on your cnc Boltz. Looking forward to seeing them run. Cheers Hans
  4. +1. Nicely explained Tekkx. Thanks for sharing. Rep inbound Sir. Cheers Hans
  5. Agree with Ian. In end of this short YT you can see the problem. Cheers Hans
  6. Beautiful work as always RomeoKilo. Really Nice setup you have there. Cheers Hans
  7. First og all Tekkx I am very glad you got it solved despite hardware issues :cry: Can it be because my code has double '}' ?? void keypadEvent(KeypadEvent KEY){ switch (keypad.getState()) { // gives PRESSED, HOLD or RELEASED case PRESSED: switch(KEY) { //CDU case 'A': sendDcsBiosMessage("CDU_A", "1"); break; ... }} switch (keypad.getState()){ // gives PRESSED, HOLD or RELEASED case RELEASED: // LMFD switch(KEY) { // Released KEYs or Neutral Rockers signal is sent //CDU case 'A': sendDcsBiosMessage("CDU_A", "0"); break; ... }} } Anyway glad you got it solves :thumbup: Cheers Hans
  8. Hi Tekkx, This is the backplate for the CDU which rest's on top of the DZUS rails; This is the back side of the button unit which sit's on top of the backplate; As you can see there are buttons ontop of the DZUS but above the DZUS which is why the button unit is that thick. Inside of button unit with PCB removed; Buttons; PCB from push side; If you need more specific pictures let me know. I can disassemble the unit. Thanks seem there is a typo in post 173 This is the one I bought; https://www.ebay.com/itm/MEGA-2560-R3-ATmega2560-16AU-CH340G-Develope-Board-W-Cable-for-Arduino/201383981895?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649 Cheers Hans
  9. Hi Tekkx, That is very strange indeed. I am currently not running the helo CDU as I miss a screen for it, but just plugged it in. This is what I get when DCS is paused; The only difference I noticed it that you are using a <Keypad2.h> and I am running a <Keypad.h>. All the places both of us are Keypad. I have absolutely no idea but should you be calling Keypad2 in these places or is that completely irrelevant? Cheers Hans
  10. Holycat(IIAF) does you stepper motor have a mechanical stop? If it has a mechanic stop then it I don't think it will work with the altimeter. Do you have a datasheet for the stepper motor? Also when you include code try and use the wrap code function. The the code will stand out and you don't get smileys in the code. Cheers Hans
  11. Excellent news and a really good initiative @Ian. Sound like a really good opportunity to hang around and learn. I hope to be online from time to time to pick your brain. Cheers Hans
  12. My initial though is you have too few pins; Volumen: 1 analog input OR 2 digital inputs (encoder) Tone/Sq: 2 digital inputs Freq selection dial: 3 or 4 digital inputs Freq Mode: 2 or 3 digital inputs Preset wheel: 2 digital inputs (encoder) Freq selection: 8 digital inputs (encoder) That 19 digital inputs or 17 inputs plus one analog. Then you also need to run the 7-segment. You cannot use pin 0 and 1 on the Arduino since they are used for USB communication. The analogs can be used as digital but then you still only have 18 available which leave you none for the 7-segment. There are ways to expand the pins but I have not ventured down that road yet. Personally I would go for a Mega for this panel as it has plenty of pins and only cost about two Nano on Ebay from China. Price is about half of the one you listed. Can an LCD be used instead of 7-segment. Yes just take a look here; As mentioned earlier this is not the simplest panel to start with. I would suggest start with a less complicated panel to get a feel for DCS-BIOS and the hardware. Cheers Solo
  13. EXERCISE GREEN SWORD #1 EXERCISE GREEN SWORD Exercise GREEN SWORD is a tactical exercise designed to put the various squadrons in the 132nd into a war-like scenario. This exercise is intended as a advanced training. EXERCISE GREEN SWORD Scenario: BLUELAND is the EASTERN part of GEORGIA (TBLISI area). REDLAND is WESTERN part of GEORGIA. There have been tensions between REDLAND and BLUELAND the last year, a conflict over important natural resources. REDLAND have the last weeks been building up forces on the border of BLUELAND. REDFOR (REDLAND Forces) have been conducting high intensity warfare exercises, and BLUELAND is assessing that REDLAND is preparing an invasion of BLUELAND territory. REDFOR have their stronghold around bases at KUTAISI airfield, and TKIBULI area. BLUELAND have decided to initiate the conflict with a pre-emptive strike in order to surprise REDFOR. Air assets will be tasked with striking vital parts of C2 structure of REDFOR to reduce their ability for commando and control. Current FLOT is depicted on the picture below: EXERCISE THREATS: SAM REDFOR have a robust integrated SAM network protecting KUTAISI and TKIBULI. In addition to SAM's shown on this picture, there are reports of a SA-9 moving between the SA-13 in DIDI-GUPTA and the SA-8 in TSKHINVALI. Furthermore, there are reports of a mobile SA-9 in the vicinity of KASHURI (its reported locations are shown in Google Earth). Note: ALL SAM's will use missile script. Only SAM's in TSKHINVALI area are considered targets. All other SAM's are not to be targeted at any time Air threats: The REDFOR Airforce consist of 2 squadrons of Mirage2000C Aircraft. One Squadron is located at SUKHUMI airfield, while the other squadron is located at Kobuleti Airfield. In addition, REDFOR is supported by Tankers and AWACS. On a mission-to-mission basis, REDFORCE may be supported by other aircrafts, this will be briefed in the event information. Event 1: Attack against enemy territory (Outbreak of War) Weather: Forecast: Clouds: FEW at FL160. Wind: SE, 8kts. , QNH29.93. Time of day: Server will be started at 1700Z. Time in-game will then be 1300G. KA-50 Mission: BLADE: SEAD against REDFOR EWR in view of TSKHINVALI. Location IVO: N42 14.950 E043 55.480 COBRA: Escort BEAR flight during SOF insertion. Part of package BRAVO. Package commander for Package BRAVO. Mirage 2000C Mission: NINJA: Escort REBEL and STEEL during Air Interdiction mission. Part of Package ALPHA. Package Frequency GRAY10. METAL: Primary mission, set up CAP to protect ALPHA package coming into TKIBULI between 1950Z-2010Z (1550G-1610G). Part of Package ALPHA. Package Frequency GRAY10. ANGRY: AGGRESSOR. Tasking and information provided through discrete channels. A-10C Mission: REBEL (FWIT): Air interdiction at TGT: REDFOR Headquarter (Tkibuli Air Interdiction target#1 / TKI.01). Part of Package ALPHA. TOT: 1952Z (1552G). Package Frequency GRAY10. STEEL (FWIT): Air Interdiction at TGT: REDFOR Air Defence installation (Tkibuli Air Interdiction target #7 / TKI.07). Part of Package ALPHA. Air Mission Commander for Package ALPHA. TOT: 1950Z (1550G). Package Frequency GRAY10. CLAW: Air Interdiction at TGT: REDFOR Tkbiuli Bridge (TKI.12). TOT:1956Z (1556G). Part of Package ALPHA. Package Frequency GRAY10. DEVIL: Air Interdiction at TGT: REDFOR Ammunition factory1 (Tkibuli Air Interdiction target #4 / TKI.04). TOT: 2000Z (1600G). Part of Package ALPHA. Package Frequency GRAY10. FURY: Air Interdiction at TGT: REDFOR Ammunition factory2 (Tkibuli Air Interdiction target #9 / TKI.09). TOT: 2004Z (1604G). Part of Package ALPHA. Package Frequency GRAY10. MI-8 Mission: BEAR: Insertion of SOF patrol's. SOF teams currently located at SOF FOB KILO, WEST of the TMA (see Google Earth link for location). SOF Team's to be inserted into LZ HAWK. (IVO N42 19.825 E043 45.083). SOF Insertion to be conducted as covert as possible. Part of package BRAVO. DUSTOFF: 15 min ground alert for MEDEVAC/CASEVAC or transport assignments. Exercise seen from REBEL 1-1 Enjoy
  14. DcsBios::Switch2Pos ufcMasterCaution("UFC_MASTER_CAUTION", PIN); Should be for when you press the master caution to reset alarms. I am now not sure what you are trying to accomplish? Do you want to have your 7-segment showing Master Caution all the time and only flash when when alarm occurs? Cheers Hans
  15. Hi Roger01, I think you should use this; DcsBios::Switch2Pos ufcMasterCaution("UFC_MASTER_CAUTION", PIN); Cheers Hans
  16. Hi Tekkx, That's odd. I used the same setup as yours (MFCD) for my CDU; /* /* The following #define tells DCS-BIOS that this is a RS-485 slave device. It also sets the address of this slave device. The slave address should be between 1 and 126 and must be unique among all devices on the same bus. */ #define DCSBIOS_RS485_SLAVE 15 /* The Arduino pin that is connected to the /RE and DE pins on the RS-485 transceiver. */ #define TXENABLE_PIN 2 #include <Keypad.h> #include "DcsBios.h" /* paste code snippets from the reference documentation here */ const byte ROWS = 8; //four rows const byte COLS = 9; //three columns char keys[ROWS][COLS] = { {'!','"','#','c','%','F','L','R','X'}, {'&','E','K','Q','W','Z'}, {'|','D','J','P','V','Y','('}, {')','C','I','O','U','=','@','£','$'}, {'{','A','B','G','H','M','N','S','T'}, {':','3','6','9','[','>','/',',','*'}, {';','2','5','8','0','-','<','}','½'}, {'+',']','_','a','b','1','4','7','.'}, }; byte rowPins[ROWS] = {13, A0, A1, 12, A2, A3, A4, A5}; //connect to the row pinouts of the keypad byte colPins[COLS] = {11, 9, 7, 10, 8, 6, 5, 4, 3}; //connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); void setup() { DcsBios::setup(); keypad.addEventListener(keypadEvent); // Add an event listener. keypad.setHoldTime(100); // Default is 1000mS keypad.setDebounceTime(50); // Default is 50mS } void loop() { DcsBios::loop(); char key = keypad.getKey(); } void keypadEvent(KeypadEvent KEY){ switch (keypad.getState()) { // gives PRESSED, HOLD or RELEASED case PRESSED: switch(KEY) { //CDU case 'A': sendDcsBiosMessage("CDU_A", "1"); break; case 'B': sendDcsBiosMessage("CDU_B", "1"); break; case 'C': sendDcsBiosMessage("CDU_C", "1"); break; case 'D': sendDcsBiosMessage("CDU_D", "1"); break; case 'E': sendDcsBiosMessage("CDU_E", "1"); break; case 'F': sendDcsBiosMessage("CDU_F", "1"); break; case 'G': sendDcsBiosMessage("CDU_G", "1"); break; case 'H': sendDcsBiosMessage("CDU_H", "1"); break; case 'I': sendDcsBiosMessage("CDU_I", "1"); break; case 'J': sendDcsBiosMessage("CDU_J", "1"); break; case 'K': sendDcsBiosMessage("CDU_K", "1"); break; case 'L': sendDcsBiosMessage("CDU_L", "1"); break; case 'M': sendDcsBiosMessage("CDU_M", "1"); break; case 'N': sendDcsBiosMessage("CDU_N", "1"); break; case 'O': sendDcsBiosMessage("CDU_O", "1"); break; case 'P': sendDcsBiosMessage("CDU_P", "1"); break; case 'Q': sendDcsBiosMessage("CDU_Q", "1"); break; case 'R': sendDcsBiosMessage("CDU_R", "1"); break; case 'S': sendDcsBiosMessage("CDU_S", "1"); break; case 'T': sendDcsBiosMessage("CDU_T", "1"); break; case 'U': sendDcsBiosMessage("CDU_U", "1"); break; case 'V': sendDcsBiosMessage("CDU_V", "1"); break; case 'W': sendDcsBiosMessage("CDU_W", "1"); break; case 'X': sendDcsBiosMessage("CDU_X", "1"); break; case 'Y': sendDcsBiosMessage("CDU_Y", "1"); break; case 'Z': sendDcsBiosMessage("CDU_Z", "1"); break; case '0': sendDcsBiosMessage("CDU_0", "1"); break; case '1': sendDcsBiosMessage("CDU_1", "1"); break; case '2': sendDcsBiosMessage("CDU_2", "1"); break; case '3': sendDcsBiosMessage("CDU_3", "1"); break; case '4': sendDcsBiosMessage("CDU_4", "1"); break; case '5': sendDcsBiosMessage("CDU_5", "1"); break; case '6': sendDcsBiosMessage("CDU_6", "1"); break; case '7': sendDcsBiosMessage("CDU_7", "1"); break; case '8': sendDcsBiosMessage("CDU_8", "1"); break; case '9': sendDcsBiosMessage("CDU_9", "1"); break; case '.': sendDcsBiosMessage("CDU_POINT", "1"); break; case '/': sendDcsBiosMessage("CDU_SLASH", "1"); break; case '!': sendDcsBiosMessage("CDU_LSK_3R", "1"); break; case '"': sendDcsBiosMessage("CDU_LSK_5R", "1"); break; case '#': sendDcsBiosMessage("CDU_LSK_7R", "1"); break; case 'c': sendDcsBiosMessage("CDU_LSK_9R", "1"); break; case '+': sendDcsBiosMessage("CDU_LSK_3L", "1"); break; case ']': sendDcsBiosMessage("CDU_LSK_5L", "1"); break; case '_': sendDcsBiosMessage("CDU_LSK_7L", "1"); break; case 'a': sendDcsBiosMessage("CDU_LSK_9L", "1"); break; case '[': sendDcsBiosMessage("CDU_PG", "2"); break; case '½': sendDcsBiosMessage("CDU_PG", "0"); break; case 'b': sendDcsBiosMessage("CDU_SYS", "1"); break; case '{': sendDcsBiosMessage("CDU_NAV", "1"); break; case ')': sendDcsBiosMessage("CDU_WP", "1"); break; case '|': sendDcsBiosMessage("CDU_OSET", "1"); break; case '&': sendDcsBiosMessage("CDU_FPM", "1"); break; case '%': sendDcsBiosMessage("CDU_PREV", "1"); break; case '(': sendDcsBiosMessage("CDU_MK", "1"); break; case '}': sendDcsBiosMessage("CDU_CLR", "1"); break; case '=': sendDcsBiosMessage("CDU_BCK", "1"); break; case '@': sendDcsBiosMessage("CDU_SPC", "1"); break; case '$': sendDcsBiosMessage("CDU_FA", "1"); break; }} switch (keypad.getState()){ // gives PRESSED, HOLD or RELEASED case RELEASED: // LMFD switch(KEY) { // Released KEYs or Neutral Rockers signal is sent //CDU case 'A': sendDcsBiosMessage("CDU_A", "0"); break; case 'B': sendDcsBiosMessage("CDU_B", "0"); break; case 'C': sendDcsBiosMessage("CDU_C", "0"); break; case 'D': sendDcsBiosMessage("CDU_D", "0"); break; case 'E': sendDcsBiosMessage("CDU_E", "0"); break; case 'F': sendDcsBiosMessage("CDU_F", "0"); break; case 'G': sendDcsBiosMessage("CDU_G", "0"); break; case 'H': sendDcsBiosMessage("CDU_H", "0"); break; case 'I': sendDcsBiosMessage("CDU_I", "0"); break; case 'J': sendDcsBiosMessage("CDU_J", "0"); break; case 'K': sendDcsBiosMessage("CDU_K", "0"); break; case 'L': sendDcsBiosMessage("CDU_L", "0"); break; case 'M': sendDcsBiosMessage("CDU_M", "0"); break; case 'N': sendDcsBiosMessage("CDU_N", "0"); break; case 'O': sendDcsBiosMessage("CDU_O", "0"); break; case 'P': sendDcsBiosMessage("CDU_P", "0"); break; case 'Q': sendDcsBiosMessage("CDU_Q", "0"); break; case 'R': sendDcsBiosMessage("CDU_R", "0"); break; case 'S': sendDcsBiosMessage("CDU_S", "0"); break; case 'T': sendDcsBiosMessage("CDU_T", "0"); break; case 'U': sendDcsBiosMessage("CDU_U", "0"); break; case 'V': sendDcsBiosMessage("CDU_V", "0"); break; case 'W': sendDcsBiosMessage("CDU_W", "0"); break; case 'X': sendDcsBiosMessage("CDU_X", "0"); break; case 'Y': sendDcsBiosMessage("CDU_Y", "0"); break; case 'Z': sendDcsBiosMessage("CDU_Z", "0"); break; case '0': sendDcsBiosMessage("CDU_0", "0"); break; case '1': sendDcsBiosMessage("CDU_1", "0"); break; case '2': sendDcsBiosMessage("CDU_2", "0"); break; case '3': sendDcsBiosMessage("CDU_3", "0"); break; case '4': sendDcsBiosMessage("CDU_4", "0"); break; case '5': sendDcsBiosMessage("CDU_5", "0"); break; case '6': sendDcsBiosMessage("CDU_6", "0"); break; case '7': sendDcsBiosMessage("CDU_7", "0"); break; case '8': sendDcsBiosMessage("CDU_8", "0"); break; case '9': sendDcsBiosMessage("CDU_9", "0"); break; case '.': sendDcsBiosMessage("CDU_POINT", "0"); break; case '/': sendDcsBiosMessage("CDU_SLASH", "0"); break; case '!': sendDcsBiosMessage("CDU_LSK_3R", "0"); break; case '"': sendDcsBiosMessage("CDU_LSK_5R", "0"); break; case '#': sendDcsBiosMessage("CDU_LSK_7R", "0"); break; case 'c': sendDcsBiosMessage("CDU_LSK_9R", "0"); break; case '+': sendDcsBiosMessage("CDU_LSK_3L", "0"); break; case ']': sendDcsBiosMessage("CDU_LSK_5L", "0"); break; case '_': sendDcsBiosMessage("CDU_LSK_7L", "0"); break; case 'a': sendDcsBiosMessage("CDU_LSK_9L", "0"); break; case '[': sendDcsBiosMessage("CDU_PG", "1"); break; case '½': sendDcsBiosMessage("CDU_PG", "1"); break; case 'b': sendDcsBiosMessage("CDU_SYS", "0"); break; case '{': sendDcsBiosMessage("CDU_NAV", "0"); break; case ')': sendDcsBiosMessage("CDU_WP", "0"); break; case '|': sendDcsBiosMessage("CDU_OSET", "0"); break; case '&': sendDcsBiosMessage("CDU_FPM", "0"); break; case '%': sendDcsBiosMessage("CDU_PREV", "0"); break; case '(': sendDcsBiosMessage("CDU_MK", "0"); break; case '}': sendDcsBiosMessage("CDU_CLR", "0"); break; case '=': sendDcsBiosMessage("CDU_BCK", "0"); break; case '@': sendDcsBiosMessage("CDU_SPC", "0"); break; case '$': sendDcsBiosMessage("CDU_FA", "0"); break; }} } https://forums.eagle.ru/showpost.php?p=3236594&postcount=159 I think I removed something from your original code but can't remember what it was. Got both L/R MFCD and the CDU running with this setup. Which version of Arduino and DCS-BIOS are you running? Cheers Hans
  17. Maybe the 476th NTTR range mission is something for you; http://www.476vfightergroup.com/downloads.php?do=file&id=403 Cheers Hans
  18. Hi Regnad517, Warhog is correct Q1) so you need a 485 for each arduino board. - A: yes need one MAX487 per panel and on per master Q2) you then just wire up the arduino normally per switch, buttons, etc... A: Yes Rest is same way but don't use pin 0, 1 and 2 which are used for communication. Q3) can you still utilize i2c components with this such as lcd? A: I haven tried but are pretty sure you can. If I have time over the weekend I can see if I can get my CMSP up and running with I2C LCD. No promisses made though. Q4) your schematic you left was a huge eye opener. If I'm reading that properly, those 4 arduinos will now work over 1 com port? A: Yes but you can have more. The exact limit I don't remember but have following running on this setup; Left console: Fuel control panel (real one) LASTE panel (mockup but with 1x mag switches) Auxiliary Lighting Control Panel (mockup) SAS panel (mockup w. 4x mag switches and light) Emergency flight control panel (mock up with light) MIP: Armament Hud Control Panel (mockup missing some of the A-lock flat heads) Landing gear panel (mockup w. 1x mag switch) Navigation Mode Selection Panel (mockup backplate, real light plate and switches. Lenses are wrong) MFCD bezels (real F-16) Right console: Electrical power panel (real) Aux Avionics Panel (real) ILS panel (simulator one) Lighting control panel (real w. 1x mag switch) Cheers Hans
  19. Dear Regnad517 I made a post a while back trying to explain how I have been doing it; https://forums.eagle.ru/showpost.php?p=3247704&postcount=171 Would it be smarter to make a generic PCB that can take most of the panels. Yes it it would but I haven't ventured down that road yet. Take a look at the post and see if a few of your questions get answered. Cheers Hans
  20. No need to shut it down Deadman unless it cost you money to have running of cause. Eventually word will spread around and you have lots of costumers but as you know cockpit building is a loooong process. I haven't had time to install my very nice oxygen panel levers I purchased from the knob shop. The quality is really nice but for the remaining knobs I already have a full set of your cast knobs I purchased from you years ago but still haven't gotten around to painting :music_whistling: All the best Hans
  21. No need to throw anything out just yet. I am not sure if I read this correct? You say Adrian's code was woking on dcs-bios-arduino-library v0.2.0 but Warhog/Ian's code is not working on dcs-bios-arduino-library v0.2.11? I tried to compile Warhog/Ian's code using Arduino library 0.2.10 and get no errors at all. @Holycat(IIAF) I am a little reluctant to downgrade dcs-bios-arduino-library to v0.2.0 just to try and compile since its from March of last year. Have you tried to convert into a later version of dcs-bios-arduino-library? Cheers Hans
  22. Whoa Calum you are swiftly moving toward the first having a full engine running with real instruments :thumbup: Very nicely done Sir Cheers Hans
  23. Very nicely done Sir. Keep the pictures comming as you progress Cheers Hans
  24. Man I look away for a few seconds and all sorts of good stuff pops up. Nicely done WhoMadeWho. Keep it comming Sir Cheers Hans
  25. Beautiful work as always RomeoKilo. Looks awesome with the real jettison switch, knob and flat heads inserts on. I have been looking at that as well. I think I'll just drop in a Mega on that panel. Keep up the good work Sir Cheers Hans
×
×
  • Create New...