

byteman59
Members-
Posts
120 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by byteman59
-
First off, I'd like to thank The Warthog Project. My panels are based off of his designs. And thanks to all the members of this site who have helped me along the last few months. I have been at this since January of 22. Special shout out to No1sonuk, thanks for being patient with my questions! I have completed my first panels. The Intercom, Antenna and Stall System Volume Panels. I have run into a couple of issues. When i start game play, not all switches are synced with their current positions in DCS. How do i resolve this? I have uploaded my code file. Second, my encoders tend to turn the knobs in DCS at a faster rate. Is it possible to slow this down? Thanks again! INTERCOM_PANEL.ino
-
Finishing up first panel, the Intercom Panel, including Antenna and EGI Have everything working except for "SAT ANT" and "EGI HQ TOD" switches. Cannot get these switches to move within DCS, either with my panel or within sim. Any ideas? Thanks!
-
Question on the Control Reference, to get Live Data, does DCS World need to be running in a flight?
-
Thanks, got it working, much appreciated!
-
How do i install the FlightPanel Fork vesion?
-
-
Got it to work, thank you! Not sure i understand "Switch the view to "Advanced"." Where?
-
Can you explain this code? Why idon't i see it in DSC-BIOS reference? DcsBios::ActionButton intIffUnmuteToggle("INT_IFF_UNMUTE", "TOGGLE", PIN_SW);
-
The encoder has a built in push button, so i can use volume and mute from one encoder. I thought pin A and B could be CLK and DT for VOL, but wasnt sure about the MUTE using the push button on encoder Perhaps use SW and CLK for MUTE, such as DT and CLK for VOL?
-
Trying to setup the use of encoders for one of my panels. Encoder have -,+,clk,dt, and sw. How do i connect for the following // IFF Volume DcsBios::RotaryEncoder intIffVol("INT_IFF_VOL", "-3200", "+3200", PIN_A, PIN_B); // IFF Un-Mute DcsBios::RotaryEncoder intIffUnmute("INT_IFF_UNMUTE", "DEC", "INC", PIN_A, PIN_B); I want to be able to use the push button on the rotary encoder for the mute. Thanks,
-
Planning on using a dimmer in the circuit. I'm using green LED with a rated Vf of 3.2
-
No1sonuk, I'm using an LED with a Vf of 3.2V. I am getting the following results when calculating R and W. 5V-3.2V/.02mA=90 ohms 5V-3.2V ^2/90 ohms=.169W Should i round up and use a 100ohm 1/4W resistor? btw, newbie to electronics, my area is computer networking and engineering. Thanks!
-
Thanks, Am i calculating resistance based on 5v of the arduino?
-
Question on using an LED with DCSBIOS. Looking to use the Un-Mute's LED's on the Intercom Panel. So that when mute is on, the LED for that control goes off. Code has DcsBios::LED intAimUnmute(0x11a6, 0x0004, PIN); I assume the PIN should run in series with the LED. My LED is a 3.2Vf. Can i run 3.3V to LED, then from LED to 5, with pinMode(5,HIGH) Example: //AIM Un-Mute pinMode(5,HIGH) DcsBios::LED intAimUnmute(0x11a6, 0x0004, 5); Thanks Bob
-
Very nice build! Ok, i will stay with the 186 for now, and leave the 210 for after my build is complete and i'm bored.
-
Hi ALL, Starting my radio build and was wondering if i should build the ARC-210 or stay with the ARC-164 for now? Have not seen any updates for the 210. Thanks
-
How To Program Arduino For Tactile Buttons Without Resistors?
byteman59 replied to Kenpilot's topic in Home Cockpits
Am i to understand that i am to use NO pullup resisitor for switches. Use resistors only for LED? -
ah, SSD seems like a good option. My PC seems to start up a little slow. It will not be my gaming PC. Thanks No1sonuk!
-
Hi All, Is there quick way to bring up the cockpit in order to test panels? Just to check switches, LED's etc. Of if there is antirely differnet method. Thanks in advance!
-
Has anyone been able to get MCP23017 to work with DCSBIOS?, or is it a mute point? Thanks in advance!
-
So i understand this correctly, you are not able to get a Mega working with your sketch? FYI Using a modile from amazon https://www.amazon.com/gp/product/B08YN7T13G/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1 I did ground A0 A1 and A2 for default 0x20 on module.
-
Confirmed connections to pins 20 and 21. I used a RS26 1 Pole Position 12 Selectable Band Rotary Channel Selector Switch, using GND and pins 1, 2, 3, and 4 on the switch for the VHFFM_FREQEMER 0, 1, 2 ,3 respectively. Did not see any moved in DCS. Confirmed, DCS-BIOS running and connected to Arduino.
-
Which library are you using for MCP23017? Tried the following but does not seem to work. I'm using with a Arduino Mega. #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include<Adafruit_MCP23017.h> // ----- 16 bit port expander connected @ IC2 address 0x27 Adafruit_MCP23017 mcp; // Connect pin SCL of the expander to NANO/UNO pin A5 // Connect pin SDA of the expander to NANO/UNO pin A4 // MCP23017 connections // Physial Pin# PinName PinID // 21 GPA0 0 // 22 GPA1 1 // 23 GPA2 2 // 24 GPA3 3 // 25 GPA4 4 // 26 GPA5 5 // 27 GPA6 6 // 28 GPA7 7 // 1 GPB0 8 // 2 GPB1 9 // 3 GPB2 10 // 4 GPB3 11 // 5 GPB4 12 // 6 GPB5 13 // 7 GPB6 14 // 8 GPB7 15 // ----- declaration of variables long lastChangeTime = 0; const byte period = 10; // refresh and send switch positions regularily seconds (value to be multiplied by 1000 to make an integer) const byte debounce = 35; // debounce time, currently used for the preset selector (value to be multiplied by 10 to make an integer) byte VHFFM_FREQEMER = 0; byte prev_VHFFM_FREQEMER = 0; byte VHFFM_MODE = 0; byte prev_VHFFM_MODE = 0; byte VHFFM_PRESET = 0; byte prev_VHFFM_PRESET = 0; byte VHFFM_SQUELCH = 1; byte prev_VHFFM_SQUELCH = 1; // ---------- DCS content here below ---------- // ---------- SETUP Loop ---------- void setup() { DcsBios::setup(); // ----- initialize the 16 bit port expander mcp.begin(); mcp.pinMode(0, INPUT); mcp.pullUp(0, HIGH); mcp.pinMode(1, INPUT); mcp.pullUp(1, HIGH); mcp.pinMode(2, INPUT); mcp.pullUp(2, HIGH); mcp.pinMode(3, INPUT); mcp.pullUp(3, HIGH); mcp.pinMode(4, INPUT); mcp.pullUp(4, HIGH); mcp.pinMode(5, INPUT); mcp.pullUp(5, HIGH); mcp.pinMode(6, INPUT); mcp.pullUp(6, HIGH); mcp.pinMode(7, INPUT); mcp.pullUp(7, HIGH); mcp.pinMode(8, INPUT); mcp.pullUp(8, HIGH); mcp.pinMode(9, INPUT); mcp.pullUp(9, HIGH); mcp.pinMode(10, INPUT); mcp.pullUp(10, HIGH); // ... continue to pin 15 if necessary // ----- first read the VHF FM radio switch positions and save to variables // Frequency Selection Dial FM/AM/MAN/PRE if (mcp.digitalRead(0) == 0) {VHFFM_FREQEMER = 0;} // Emergency FM if (mcp.digitalRead(1) == 0) {VHFFM_FREQEMER = 1;} // Emergency AM if (mcp.digitalRead(2) == 0) {VHFFM_FREQEMER = 2;} // Manual mode if (mcp.digitalRead(3) == 0) {VHFFM_FREQEMER = 3;} // preselected channel mode // Mode OFF/TR/DF if (mcp.digitalRead(4) == 0) {VHFFM_MODE = 0;} // OFF - disables the radio if (mcp.digitalRead(5) == 0) {VHFFM_MODE = 1;} // TR - Transmit and Recieve mode if (mcp.digitalRead(6) == 0) {VHFFM_MODE = 2;} // DF - Direction finding mode for the ADI and HSI // Preset Channel Selector if (mcp.digitalRead(7) == 0) {VHFFM_PRESET = 0;} // decrease channel selection if (mcp.digitalRead(8) == 0) {VHFFM_PRESET = 1;} // increase channel selection // Squelch if ((mcp.digitalRead(9) == 1) && (mcp.digitalRead(10) == 1)) {VHFFM_SQUELCH = 0;} // if no push botton is pressed if (mcp.digitalRead(9) == 0) {VHFFM_SQUELCH = 1;} // Squelch disabled if (mcp.digitalRead(10) == 0) {VHFFM_SQUELCH = 2;} // Squelch tone mode } // ---------- End of SETUP Loop ---------- // ---------- EXECUTION loop ---------- void loop() { readMCP(); // send switch positions on change // send switch positions regularily long now = millis(); if (now > lastChangeTime + (period*1000)) { readMCP(); lastChangeTime = now; } } // ---------- End of EXECUTION loop ---------- // ---------- FUNCTIONS declaration ---------- // read Inputs from MCP23017 and send switch positions only on change void readMCP() { // // Frequency Selection Dial FM/AM/MAN/PRE if (mcp.digitalRead(0) == 0) { VHFFM_FREQEMER = 0; if (prev_VHFFM_FREQEMER != 0) { DcsBios::tryToSendDcsBiosMessage("VHFFM_FREQEMER", "0"); // "tryToSendDcsBiosMessage" or "sendDcsBiosMessage" prev_VHFFM_FREQEMER = VHFFM_FREQEMER; } } if (mcp.digitalRead(1) == 0) { VHFFM_FREQEMER = 1; if (prev_VHFFM_FREQEMER != 1) { DcsBios::tryToSendDcsBiosMessage("VHFFM_FREQEMER", "1"); prev_VHFFM_FREQEMER = VHFFM_FREQEMER; } } if (mcp.digitalRead(2) == 0) { VHFFM_FREQEMER = 2; if (prev_VHFFM_FREQEMER != 2) { DcsBios::tryToSendDcsBiosMessage("VHFFM_FREQEMER", "2"); prev_VHFFM_FREQEMER = VHFFM_FREQEMER; } } if (mcp.digitalRead(3) == 0) { VHFFM_FREQEMER = 3; if (prev_VHFFM_FREQEMER != 3) { DcsBios::tryToSendDcsBiosMessage("VHFFM_FREQEMER", "3"); prev_VHFFM_FREQEMER = VHFFM_FREQEMER; } } // // Mode OFF/TR/DF if (mcp.digitalRead(4) == 0) { VHFFM_MODE = 0; if (prev_VHFFM_MODE != 0) { DcsBios::tryToSendDcsBiosMessage("VHFFM_MODE", "0"); prev_VHFFM_MODE = VHFFM_MODE; } } if (mcp.digitalRead(5) == 0) { VHFFM_MODE = 1; if (prev_VHFFM_MODE != 1) { DcsBios::tryToSendDcsBiosMessage("VHFFM_MODE", "1"); prev_VHFFM_MODE = VHFFM_MODE; } } if (mcp.digitalRead(6) == 0) { VHFFM_MODE = 2; if (prev_VHFFM_MODE != 2) { DcsBios::tryToSendDcsBiosMessage("VHFFM_MODE", "2"); prev_VHFFM_MODE = VHFFM_MODE; } } // // Preset Channel Selector if (mcp.digitalRead(7) == 0) { VHFFM_PRESET = 1; if (prev_VHFFM_PRESET != 1) { DcsBios::tryToSendDcsBiosMessage("VHFFM_PRESET", "DEC"); delay(debounce*10); prev_VHFFM_PRESET = 0; // reset to accept next push botton signal } } if (mcp.digitalRead(8) == 0) { VHFFM_PRESET = 2; if (prev_VHFFM_PRESET != 2) { DcsBios::tryToSendDcsBiosMessage("VHFFM_PRESET", "INC"); delay(debounce*10); prev_VHFFM_PRESET = 0; // reset to accept next push botton signal } } // // Squelch if ((mcp.digitalRead(9) == 1) && (mcp.digitalRead(10) == 1)) // 2 position switch workaround { VHFFM_SQUELCH = 1; if (prev_VHFFM_SQUELCH != 1) { DcsBios::tryToSendDcsBiosMessage("VHFFM_SQUELCH", "1"); prev_VHFFM_SQUELCH = VHFFM_SQUELCH; } } if (mcp.digitalRead(9) == 0) { VHFFM_SQUELCH = 0; if (prev_VHFFM_SQUELCH != 0) { DcsBios::tryToSendDcsBiosMessage("VHFFM_SQUELCH", "0"); prev_VHFFM_SQUELCH = VHFFM_SQUELCH; } } if (mcp.digitalRead(10) == 0) { VHFFM_SQUELCH = 2; if (prev_VHFFM_SQUELCH != 2) { DcsBios::tryToSendDcsBiosMessage("VHFFM_SQUELCH", "2"); prev_VHFFM_SQUELCH = VHFFM_SQUELCH; } } } // ---------- END of FUNCTIONS declaration ----------
-
Vinc, trying to use your code for a mcp23017. I'm getting "no matching function for call to 'MCP23017::MCP23017()'" when i run the sketch as is.
-
No, luck. I'm just going to get some MCP23017, they're cheap enough. thanks