-
Posts
640 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Vinc_Vega
-
How To Program Arduino For Tactile Buttons Without Resistors?
Vinc_Vega replied to Kenpilot's topic in Home Cockpits
Yes, if using the DCS-Bios library the pullups should already be activ for standard inputs. Regards, Vinc -
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
I've reworked the above sketch to work with the A-10C UHF string output only (and not the selectors). Now it shows correctly all frequencies, including guard frequency and presets and the test mode. If the UHF radio is not electrical powered, e.g. switched to OFF or BATT and generators are OFF, the displays are blanked. LED brightness can be dimmed by the LCP Signal Lights switch, variables are adjustable (default: led_intensity = 5). Edit: To show preset UHF frequencies, push the status button when in PRE mode . Than you can see the selected preset a while. Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
It took a while to get those cheap displays from China. I confirm the problem of the rolling numbers and unfortunately the above proposed function "showString_new" is not working. Here is a sketch to display the UHF radio frequency of the A-10C on a LED display of the TM1637 type. Like requested above, the display is blanked while the switch is in the OFF position or no electrical power is supplied. If "GRD" is choosen for the Frequency Mode Dial the 243.000 MHz are displayed, but proper display of pre-programmed frequencies (presets) still have to be checked. As all LED displays only have seven segments, the number 888.888 will be shown in test mode (***.***). Feel free to use the sketch or parts of it! Edit: the display can be dimmed by the LCP SignalLights switch Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
As the Mega pins 50 to 52 may be "reserved" for ICSP connections, try another pin for output. Regards, Vinc
-
Have a look at the older postings for a connected digital clock If you like, I also could share the adapted version for the round 1.28 display. Regards, Vinc
-
Edited post: After updating DCS my Mega works fine again. I have no idea what happened. I herewith confirm the below sketch running on an original Mega2560, using the attached library and the waveshare board. Before connecting to DCS, try to read the switch state by using a simple input example from the MCP library. You are right, when setting up the pullups High within the Setup loop, than switches have to be connected to Ground. If pullups work for you, should be documented in your library. As the original resistors seem to be weak, the module at Amazon is recommended to be used with additional pullup resistors for the I2C connection. Regards, Vinc MCP23017.rar
-
Confirmed: 1) sketch running on a NANO and an UNO. 2) sketch not running on the Mega2560 Sorry for that! Edit: must be something different to the sketch, my Mega is not connecting to DCS-bios. Even the Master Caution example is no longer working PS: In my sketch on previous page (2/18/2022 at 10:26 AM), within the Loop-section the DcsBios::loop(); statement is missing. I corrected that. Nevertheless the MCP connection to DCS should work without the statement. Regards, Vinc
-
Yes, the switch should move. What MCP23017 chip or module do you use? Are you able to read the switch, using the input example from the MCP library? Regards, Vinc
-
Hi Kenpilot, If you mean the display on the Main Panel, you have to look for the CMSC within the control reference. There are 3 messages to display (C/F Amount, JMR status and MWS status). What type of OLED display do you want to use? Are you able to display some plain text from a library example? Regards, Vinc
-
see 6 postings above Edit: use Pins 20 and 21 for I2C connection with the Mega (SDA / SCL)
-
Yes, with the hub version. You only have to change the statement #define DCSBIOS_IRQ_SERIAL into #define DCSBIOS_DEFAULT_SERIAL Most of the libraries should do thier job on the other Arduino boards too. Regards, Vinc Edit: unfortunately they will not work in connection with the RS485 bus.
-
I copied the code from your reply and it compiled without errors. Maybe it's on the library. I use a WaveShare MCP23017 IO Expansion Board (its smaller than a self made PCP for a 28 pin chip) and their MCP23017 library. Regards, Vinc
-
How To Program Arduino For Tactile Buttons Without Resistors?
Vinc_Vega replied to Kenpilot's topic in Home Cockpits
Hi Kenpilot, you still want code for a button matrix? I adapted the code from that forum (credits within the source code below) to my needs. Don't know if the internal pullup is already / still on by DCS-Bios, but that worked fine for me. Regards, Vinc -
This is pretty cool and inspiring! Regards, Vinc
-
Hi there. I think it's a matter of the output not the input. You may adjust the values of the gauge stepper or servo motors. Regards, Vinc
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
As I wrote above, it's documented in the TM1637 library that strings with more than 4 characters will scroll. According to the data sheet the TM is very different to the Max chip. If scrolling could be avoided indeed the authors should talk to each other Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
The Max7219 is controlled by a different library than the TM1637, e.g. LedControl. Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
Have a look in the documentation and see how the function works: That means to me, all strings larger than 4 characters will scroll your display. I propose to split the string into two strings of 3 characters to be send to the respective display groups (digit 1 to 3 and 4 to 6). Try it out and post your results here! Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
I think the first argument in brackets is the number of the chip (0 means the first max7219). Second argument is for the display (0 means the first digit). Regards, Vinc
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
Ups, that's almost what you already did above. But why are there zeros instead of blanks? Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
Okay, that's because the string has seven members (chars), six digits plus the separate space. Try to read out the positions in the string [0] to [2] and [4] to [6] and print that to the respective displays. Than set your colon after the third digit. Have a look at the examples (TM1637-6Digit-Test.ino) from line 192 on. Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
He is already looking into a string. But than the digits from that string were extracted for each single display. Try the showString or showNumber commands. Regards, Vinc- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
Need help with programing tm1637 6 digit 7 segment display
Vinc_Vega replied to Hatiz's topic in Home Cockpits
I would check if the radio is off and than "clear" the display or set brightness to zero. Regards, Vinc Edit: If there is a mode switch on the radio, the output of it's "off" position could be used for the above check.- 29 replies
-
- f-16 uhf radio
- tm1637
-
(and 3 more)
Tagged with:
-
I cannot find a failure but neither have that PCF chip nor the library installed. Wire some switches to the expander and try it out! In case of trouble double-check the wire protocol initiation (I2C) as it is well documented in the library. For more questions please open a new topic. Regards, Vinc
-
DCS BIOS itself does not support port expanders. You have to create your own instances for checking the input states from an expander and than send the command to DCS. That`s how I plan to do the port extension on the VHF Radio Panel switches. I would apply the same logic to the PCF chips as I did for the MCP23017 expander.