Jump to content

Vinc_Vega

Members
  • Posts

    488
  • Joined

  • Last visited

Everything posted by Vinc_Vega

  1. @No1sonuk How can we tell Bort to use the new library? Thanks in advance. Regards, Vinc
  2. Hi Ken, to output the data, you cannot use the simplified code fragments. Unfortunately, it's a bit trickier. Within the sketch header you have to declare the display driver and then initialize it in the setup loop. If you don't know how to do this, please provide us with your display description (kind of driver) and how it is connected to your microcontroller (the wiring). For a simple 2x16 character LCD module the ->LiquidCrystal library<- should do most things for us. Please try the examples to ensure that the display works correctly for you. That kind of display mostly is initialized by the "lcd" object and you may print to either the first (0) or the second (1) line. The Arduino code in the DcsBios section than should look something like this: // ----- print CMSP Display Line 1 to the LCD display ----- void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); // ----- print CMSP Display Line 2 to the LCD display ----- void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Regards, Vinc
  3. I did it the way around: drawing in 3D, exporting to a 2D vector graphic program and than importing into fritzing Regards, Vinc
  4. Hi Ken, For the actionbutton function have a look into the below linked DcsBios documentation. Scroll down and find some examples. To make it short, an actionbutton is a pushbutton that can toggle between ON and OFF. That's what you need to enable or disable the respective rotary by its pushbutton. https://dcs-bios.readthedocs.io/en/latest/code-snippets.html A state machine is a piece of code that enables you to switch between several known states to do something. For your application a dedicated rotary should be responsive or not. That already are two states. So the rotary's pushbutton may be programmed to send either the ON or the OFF state of the respective rotary to DcsBios. You than read in either 1 or 0 into a variable and can use an if-else loop or case-switch to activate or de-activate the rotary. Edit: The solution is simpler after I had a detailed look into Bort, because we have the opportunity to use the Mute/Unmute function for the Intercom Panel switches. So the "state machine" is already provided to us by DcsBios. Example for the INT switch and rotary encoder: // ----- INT Un-Mute input and output, INT volume adjustment ----- DcsBios::ActionButton intIntUnmuteToggle("INT_INT_UNMUTE", "TOGGLE", 10); // INT switch on pin 10 for the INT Un-Mute switch DcsBios::RotaryEncoder intIntVol("INT_INT_VOL", "-3200", "+3200", 11, 12); // INT volume rotary is connected to pins 11 and 12 DcsBios::LED intIntUnmute(0x1194, 0x8000, 13); // a LED shows if the volume adjustment is active That's all for one of the Intercom Panel switches. Regards, Vinc Intercom_example_01.ino
  5. Hi Janis, If you have the option to export the panel's faceplate (or better a prepared PCB from your CAD system) as jpg or an other supported graphic format, you may import it into the PCB software and place your components. Edit: for fritzing: Go to the PCB tab, adjust the size of your board and load your image file to to the PCB. Only svg files are supported for import. See below for example of the Warthog's CMSC panel. Regards, Vinc
  6. @No1sonuk Agreed, the microcontroller depends on your application. Most panels may be driven by Nanos but the deeper you dive into cockpit building the powerfuler your controllers need to be. Look at the various applications with HID or the IPS Lcd displays. That's too much for the small and old Nano processors. Regards, Vinc
  7. Hi Ken, You need 4 pins for each of the functions: 2 digital pins for the rotary, 1 digital pin for the switch and 1 pin for the corresponding LED. All can have a common pin to the GND signal. The (+) mostly is not necessary as the positive voltage is provided from the digital pins (internal pullup). Some rotaries do have (+) pin, that is to be connected to the Arduino 5V rail. For the DcsBios part you may work with the "action button" function and "state machines". Regards, Vinc
  8. @Strale Have you tried another USB port? Are other USB devices running at the new rig without problems? Regards, Vinc
  9. This should be a code and sketches repository post to help cockpit builders, but nevertheless you may try the above Search function and filters and get something like this: Than open the hidden content for a DED sketch. Regards, Vinc
  10. Don't your account has to possibility to use Solidworks Connected? If logged in, that can be downloaded and installed from the 3D Experience Platform welcome site. Nevertheless, your computer needs to be online everytime Solidworks Connected is started. But you definitely can open and work with your old files and assemblies and have the possibility to save to your local harddrive. Hint, if no shortcut is available at your desktop: After the installation go back to the welcome site and push the blue round button in the top left corner, than go to your Role page (ME). Scroll down and under the "Apps" tab you can create a shortcut from the red Solidworks Connected field by a click at the small arrow right to the "3DEXPERIENCE R2024x..." text. Regards, Vinc
  11. Have a look into the their oline purchase support. Maybe one of the FAQs fits your need. https://www.3ds.com/store/faq Regards, Vinc Edit: Your issue seems to be solved. PS: Don't you have the opportunity to save your files locally?
  12. Automatically connection is only possible with the outdated Hub version. The more recent FP version of DcsBios connects by the mentioned program/ script. Regards, Vinc
  13. Another possibility is using LED driver chips, like the Max7219. They have built-in intensity logic, that may be controlled (dimmed) by your code. Advantages are also that LEDs would be external powered, so you don't have to care the pin current limit, or you may use a LED matrix to maximise the output count for boards like Nano or Uno. Regards, Vinc
  14. Yes, and with the radar altimeter of the MiG-21 Regards, Vinc
  15. There may be no noticeable effect for the brightness curve of your LEDs, let's say between 255 and 190 and below 40 or so. It's not easy to adjust that non-linear mapping. One way to do so is to use the multimap function. Here is a link to the respective library and documentation: https://github.com/RobTillaart/MultiMap Regards, Vinc
  16. It's exactly the the kind of answer I already had in the pipeline. Using global variables and one function to update all LEDs out of the loop. That way the brightness affects LEDs, even if their status has not changed. Ensure that you only use PWM capable pins as output, but a Mega should have enough of them. Regards, Vinc
  17. Hi there, sorry, I can't see a pic of your circuit but only a link to aliexpress , Master and Slave sketches and the screenshot of the serial protocol. Btw. you will not see any RS485 events on the Serial Monitor. Please tell us first if you ever have successfully connected the switch in question to DcsBios via an USB interface. A working sketch easily may be "converted" to RS485 by commenting the line #define DCSBIOS_IRQ_SERIAL and including #define DCSBIOS_RS485_SLAVE 1 (or the number of the respective slave) and #define TXENABLE_PIN 2. The rest of the sketch normally should be untouched. Second, please post a schematic of your circuit, if you are not sure of the wiring. TX (transmit to the bus)-> DI (driver in) RX (receive from bus)-> RO (receiver out) D2 -> DE (driver enable) and RE (receiver enable) Third, use TX1 (pin 18) and RX1 (pin 19) of the Master (Mega) for the first RS485 bus. If that doesn't work, swap the pins (18 and 19) of the master, as you may have a Mega clone and not an original. If all won't work, try to use the second RS485 bus with pins 16 and 17: #define UART2_TXENABLE_PIN 3 Edit: Thereby, the Master (Mega) is not powered by 12V but only by the USB port. A slave must not be connected to RS485 and USB at the same time! Powering a Nano via USB will limit the current to a max of 0.5 A by it's internal fuse and the voltage to 5 V. It's better to use the VIN pin, that tolerates up to 12 Volts and uses the internal regulator to supply (and protect) the microcontroller. For the wiring, I personally use something like the second sketch from here. Kind Regards, Vinc
  18. Hi, PCBway is okay, but not cheap. A good European based company is Aisler. https://aisler.net/ You even can upload Fritzing, KiCad or Eagle files and they have a good preview for the PCBs. It's a while ago when I last ordered there, but round about 12 Euros for 3 double sided boards was okay for me. No idea if the "Beautiful Board Budget" still is available as an option. Delivery mostly took them two to three weeks. Regards, Vinc
  19. The 5V output bypasses the onboard regulator in case the Uno or Nano is supplied via USB alone. Regular USB ports (e.g. a computer output) have a current limit. Therefore, the developer decided to add a fuse to the Uno (maybe and to the Nano) to not draw more than 500mA. That should be the overall limit of these boards! As you want to supply 30 LEDs in total, each with round about 20mA, that may be too much for an Arduino. @No1sonuk already proposed some elegant solutions. Btw. the max current per I/O pin is limited to 40mA. Regards, Vinc
  20. No, there is a limit in current drawing per pin, depending on which type of Arduino is in use. Regards, Vinc
  21. How about extracting textures from the zip.files of the DCS folder ...\Mods\aircraft\A-10C_2\Cockpit\Textures ? Regards, Vinc
  22. As your UV sensor seems to be connected to the I2C bus too, you may include the LCD expander's address into the constructor. Something like this hd44780_I2Cexp lcd(0x27); Regards, Vinc
  23. Hi there, at Amazon I've found that encapsulated rings, which give you endless rotation for 3, 4, 6, 8 or 12 wires. Unfortunately I only have German links to the products. https://www.amazon.de/Schleifring-Nimoa-Mini-Schleifring-Drähte-Windkraftanlagen/dp/B085Y8DJ8Y/ref=dp-upsell-widget_sccl_3_3/259-0666416-2118544?pd_rd_w=asCiD&content-id=amzn1.sym.da6a3555-3917-42ee-92a6-9f4fea00ae66&pf_rd_p=da6a3555-3917-42ee-92a6-9f4fea00ae66&pf_rd_r=Q6YAG0YGQEZVCBBGHY3Z&pd_rd_wg=SuMXR&pd_rd_r=95ad4794-e4f3-4d0a-935b-e6e0d24045d9&pd_rd_i=B085Y8DJ8Y&psc=1 https://www.amazon.de/dp/B0BHYYCYTG/ref=sspa_dk_detail_3?psc=1&pd_rd_i=B0BHYYCYTG&pd_rd_w=T3zyd&content-id=amzn1.sym.ae2317a0-2175-4285-af64-66539858231f&pf_rd_p=ae2317a0-2175-4285-af64-66539858231f&pf_rd_r=ZQGTV517PZS091EWHASQ&pd_rd_wg=nd8Z4&pd_rd_r=3adc46e8-df96-4829-9032-5d94a2b16d7a&s=industrial&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWw https://www.amazon.de/WayinTop-Schleifring-Schleifringe-Durchmesser-Robotik-Projekt/dp/B07GCNK2XY/ref=asc_df_B07GCNK2XY/?tag=googshopde-21&linkCode=df0&hvadid=380201824048&hvpos=&hvnetw=g&hvrand=14830251268282557579&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9114984&hvtargid=pla-828409835708&psc=1&mcid=847c777d29813fff8e4d02eeca8b6fdc&th=1&psc=1&tag=&ref=&adgrpid=74966709742&hvpone=&hvptwo=&hvadid=380201824048&hvpos=&hvnetw=g&hvrand=14830251268282557579&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9114984&hvtargid=pla-828409835708 https://www.amazon.de/BQLZR-Durchmesser-Schaltungen-Schleifringe-Bohrungsgroesse/dp/B01CJJNJSE/ref=asc_df_B01CJJNJSE/?tag=googshopde-21&linkCode=df0&hvadid=309900741810&hvpos=&hvnetw=g&hvrand=14830251268282557579&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9114984&hvtargid=pla-697991016947&psc=1&mcid=2e3f85a44fab37aa8941be1856141296&th=1&psc=1&tag=&ref=&adgrpid=62379242115&hvpone=&hvptwo=&hvadid=309900741810&hvpos=&hvnetw=g&hvrand=14830251268282557579&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9114984&hvtargid=pla-697991016947 https://www.amazon.de/BQLZR-Draehte-Micro-Kollektor-Ring-Schleifring-Pruefgeraete/dp/B01CJJNOXO/ref=dp-upsell-widget_sccl_3_1/259-0666416-2118544?pd_rd_w=asCiD&content-id=amzn1.sym.da6a3555-3917-42ee-92a6-9f4fea00ae66&pf_rd_p=da6a3555-3917-42ee-92a6-9f4fea00ae66&pf_rd_r=Q6YAG0YGQEZVCBBGHY3Z&pd_rd_wg=SuMXR&pd_rd_r=95ad4794-e4f3-4d0a-935b-e6e0d24045d9&pd_rd_i=B01CJJNOXO&psc=1 Additionally, there are NEMA stepper motors at the market, that have hollow shafts to route some wires though it. Regards, Vinc
  24. Hi Unbound, you don't use a compare statent within the onCanopyUnlockedChange section. Just try the double "==" like this: if (newValue == 0) { usMotor_Status = CCW; } else if (newValue == 1) { usMotor_Status = CW; } Regards, Vinc
  25. Do you have any references on round OLEDs of 2 or more inches in size? Regards, Vinc
×
×
  • Create New...