byteman59 Posted April 24, 2022 Posted April 24, 2022 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,
No1sonuk Posted April 24, 2022 Posted April 24, 2022 Try this: - = GND + = 5V (Not sure if this is needed *) CLK = PIN_A DT = PIN_B SW = PIN_SW (the push button) * I think if it has the + and - it's on a board with pullup resistors. That's why it has a 5V supply. What specific encoder is it? As for the Un-mute line, try this: DcsBios::ActionButton intIffUnmuteToggle("INT_IFF_UNMUTE", "TOGGLE", PIN_SW);
byteman59 Posted April 25, 2022 Author Posted April 25, 2022 (edited) 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? Edited April 25, 2022 by byteman59
byteman59 Posted April 25, 2022 Author Posted April 25, 2022 19 hours ago, No1sonuk said: Try this: - = GND + = 5V (Not sure if this is needed *) CLK = PIN_A DT = PIN_B SW = PIN_SW (the push button) * I think if it has the + and - it's on a board with pullup resistors. That's why it has a 5V supply. What specific encoder is it? As for the Un-mute line, try this: DcsBios::ActionButton intIffUnmuteToggle("INT_IFF_UNMUTE", "TOGGLE", PIN_SW); Can you explain this code? Why idon't i see it in DSC-BIOS reference? DcsBios::ActionButton intIffUnmuteToggle("INT_IFF_UNMUTE", "TOGGLE", PIN_SW);
No1sonuk Posted April 25, 2022 Posted April 25, 2022 (edited) 22 hours ago, byteman59 said: 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? No. SW is the push button and is independent of the rotary. Treat it as though it's a separate button. The Actionbutton toggle means a momentary button works as though it's a locking button, i.e. press-on, press-off. 3 hours ago, byteman59 said: Can you explain this code? Why idon't i see it in DSC-BIOS reference? DcsBios::ActionButton intIffUnmuteToggle("INT_IFF_UNMUTE", "TOGGLE", PIN_SW); Switch the view to "Advanced". You'll see that there, as well as a lot more. e.g. you'll see you can read the position of in-game switches, etc. too. Edited April 25, 2022 by No1sonuk
byteman59 Posted April 26, 2022 Author Posted April 26, 2022 15 hours ago, No1sonuk said: No. SW is the push button and is independent of the rotary. Treat it as though it's a separate button. The Actionbutton toggle means a momentary button works as though it's a locking button, i.e. press-on, press-off. Switch the view to "Advanced". You'll see that there, as well as a lot more. e.g. you'll see you can read the position of in-game switches, etc. too. Got it to work, thank you! Not sure i understand "Switch the view to "Advanced"." Where?
No1sonuk Posted April 26, 2022 Posted April 26, 2022 4 hours ago, byteman59 said: Got it to work, thank you! Not sure i understand "Switch the view to "Advanced"." Where? Here:
byteman59 Posted April 27, 2022 Author Posted April 27, 2022 19 hours ago, No1sonuk said: Here: Mine does not look like that.
No1sonuk Posted April 27, 2022 Posted April 27, 2022 Ah. I don't think the "Hub" version of DCS-BIOS has the actionbutton function. My screenshot is from the "FlightPanels Fork", which is actively maintained and updated. I can see now why you were talking about using the rotary encoder function for the mute switch. So with this new information (that you're using Hub), This idea you asked about won't work as you've suggested: On 4/25/2022 at 1:15 AM, byteman59 said: Perhaps use SW and CLK for MUTE, such as DT and CLK for VOL? DT and CLK are really misnamed. They should be A and B. If you use one of them again with SW in another rotary encoder function for the mute, every time you adjust the volume, the mute will turn on or off. To use SW with a rotary encoder code line, you'll need to use an unused IO pin as the second pin.
byteman59 Posted April 27, 2022 Author Posted April 27, 2022 17 minutes ago, No1sonuk said: Ah. I don't think the "Hub" version of DCS-BIOS has the actionbutton function. My screenshot is from the "FlightPanels Fork", which is actively maintained and updated. I can see now why you were talking about using the rotary encoder function for the mute switch. So with this new information (that you're using Hub), This idea you asked about won't work as you've suggested: DT and CLK are really misnamed. They should be A and B. If you use one of them again with SW in another rotary encoder function for the mute, every time you adjust the volume, the mute will turn on or off. To use SW with a rotary encoder code line, you'll need to use an unused IO pin as the second pin. How do i install the FlightPanel Fork vesion?
No1sonuk Posted April 27, 2022 Posted April 27, 2022 Start here: https://github.com/DCSFlightpanels If you're just running Arduinos, all you need are the "dcs-bios" and "dcs-bios-arduino-library" parts. There's a setup guide here: https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/doc/DCS-BIOS-FLIGHTPANELS.pdf THE biggest difference you'll notice is that Flightpanels doesn't have the fancy web interface for connection that Hub has. This is mainly because Flightpanels is based on an older version of DCS-BIOS. HOWEVER, because Flightpanels is actively maintained, it is more up to date than Hub in that it has some new functions (such as SwitchWithCover2Pos), and has the new module support added (including preliminary Apache support).
byteman59 Posted April 28, 2022 Author Posted April 28, 2022 17 hours ago, No1sonuk said: Start here: https://github.com/DCSFlightpanels If you're just running Arduinos, all you need are the "dcs-bios" and "dcs-bios-arduino-library" parts. There's a setup guide here: https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/doc/DCS-BIOS-FLIGHTPANELS.pdf THE biggest difference you'll notice is that Flightpanels doesn't have the fancy web interface for connection that Hub has. This is mainly because Flightpanels is based on an older version of DCS-BIOS. HOWEVER, because Flightpanels is actively maintained, it is more up to date than Hub in that it has some new functions (such as SwitchWithCover2Pos), and has the new module support added (including preliminary Apache support). Thanks, got it working, much appreciated! 1
byteman59 Posted April 29, 2022 Author Posted April 29, 2022 On 4/27/2022 at 3:22 PM, No1sonuk said: Start here: https://github.com/DCSFlightpanels If you're just running Arduinos, all you need are the "dcs-bios" and "dcs-bios-arduino-library" parts. There's a setup guide here: https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/doc/DCS-BIOS-FLIGHTPANELS.pdf THE biggest difference you'll notice is that Flightpanels doesn't have the fancy web interface for connection that Hub has. This is mainly because Flightpanels is based on an older version of DCS-BIOS. HOWEVER, because Flightpanels is actively maintained, it is more up to date than Hub in that it has some new functions (such as SwitchWithCover2Pos), and has the new module support added (including preliminary Apache support). Question on the Control Reference, to get Live Data, does DCS World need to be running in a flight?
No1sonuk Posted April 29, 2022 Posted April 29, 2022 4 hours ago, byteman59 said: Question on the Control Reference, to get Live Data, does DCS World need to be running in a flight? Yes
Recommended Posts