Jump to content

Roger01

Members
  • Posts

    236
  • Joined

  • Last visited

Posts posted by Roger01

  1. Hi,

     

    What MEGA do you use for Master RS485?

     

    There's :

    https://fr.aliexpress.com/item/Mega-2560-PROMINI-5V-ATmega2560-16AU-with-male-pinheaders-Compatible-for-Arduino-Mega-2560/32802310906.html

     

    With pin BUT only 6/9v VIN

     

    And this MEGA :

    https://fr.aliexpress.com/item/Free-shipping-MEGA-2560-R3-ATmega2560-R3-AVR-USB-board-Free-USB-Cable-for-Arduino-2560/32714983256.html

     

    6/12v VIN but without pin

     

    I think the best is to use 12v for all Arduino board in VIN.

    5V won't run (6v mini) if I use an old PC powerDC.

     

    Thanks a lot, and nice to see your cockpit!

  2. Thanks for pictures. For the LCD, it's not a problem vite my 3D Print. I can make a support plate.

     

    For the UFC and CDU I was making a pcb to do a matrix output, but I need to buy UFC and CDU to get the dimensions (milimeters) to do that.

     

    And I have a glue gun if needed to maintain the pcb.

    I note for the annunciator.

     

    [Edit] Wow 12€ for shipping cost only for the annunciator even if I buy panels, 12€ in addition of the other shipping cost.

  3. The next best choice if you wanted to stay with that model would be if they made a white LCD with a black background. Then you could have used a green plastic filter to place on top of it but a filter only works if the color is white. If you place a green filter on top of the orange then you’d just get a different shade of orange color. But I like the Adafruit 3.5” TFT. The CDU only shows green text so I haven’t knoticed any off angle viewing issues with it. The other thing I liked was the size. You don’t want to use a LCD that’s bigger than 3.5” because then you wouldn’t have room to place your line select keys that are on the sides. Also total width of the CDU should be no larger than 5.75” or it would be too large to fit in right console. The only complaint I have with the Adafruit LCD is the resolution. It’s 320 x 480. Means the font characters are a little blocky looking and not very sharp as compared to a modern computer monitor. But it’s not too bad.

    https://www.walmart.com/ip/Neewer-Photographic-12-Piece-Set-Universal-Flash-Speedlite-Color-Filter-Kit-for-Canon-Nikon-Sony-Pentax-Olympus-Panasonic-Camera-Flash/721455979?wmlspartner=wlpa&selectedSellerId=12355&adid=22222222227093273249&wmlspartner=wmtlabs&wl0=&wl1=s&wl2=t&wl3=207568380400&wl4=pla-338136951823&wl5=9028743&wl6=&wl7=&wl8=&wl9=pla&wl10=117437230&wl11=online&wl12=721455979&wl13=&veh=sem

     

    Thanks again for the reply.

    I think I go to use an Adafruit 3.5" for the 3.3v and a DUE arduino.

     

    (this must work no? : https://fr.aliexpress.com/item/Shippping-libre-LCD-module-3-5-pouce-TFT-LCD-cran-3-5-UNO-R3-Conseil-et/32679537214.html )

     

    I'm looking to buy this :

     

    http://pcflights.com/index.php?main_page=product_info&cPath=47_62_64&products_id=358

     

    (and by extension, this : http://pcflights.com/index.php?main_page=product_info&cPath=47_62_65&products_id=340 )

     

    Because thinking about building the panel drives me crazy (a lot of engraved button, don't find any button like this). So it's noticed : "Panel is designed for using with 3.5" LCD/TFT display."

     

    It's not the cheaper solution, but I don't have a CNC machine etc.. juste a small 3D Print.

  4. The shifters are super fast because it’s just a single transistor gate making the shift. I don’t know of any other LCDs but if they make an orange one I would think maybe they make a green one as well. Well good luck with your Cockpit.

     

    I ask if they have a Green LCD, but they don't have. :(

     

    He (vendor) say to buy a TFT (beurk!) or a OLED. But there's no 160*120 (minimum pixel) OLED Screen.

     

    So, I think about to make everything in orange.

  5. Thanks for the tip, I did't know this thing.

     

    I just need to buy 2 of it (8 Canals)

    https://fr.aliexpress.com/item/I2C-IIC-8-Channel-Logic-Level-Converter-Module-Bi-Directional-for-Arduino/32783676584.html

     

    But using a shifter like this, that will not cause interference?

     

    You confirme for now, the 160*128 LCD + an arduino (Due is better than Zero no? More frequency CPU) + this shifter, can run the CDU display?

     

    (If you know a LCD 160*120/128 GREEN/BLACK background, I don't say no for a link! :D )

     

    [EDIT] I prefere do not buy a TFT Screen because of that thing :

     

    5_7E-o-film.jpg

  6. With the Max7219 chip you can built this :

     

     

    The code I use :

     

    #define DCSBIOS_IRQ_SERIAL
    #include <DcsBios.h> 
    #include <LedControl.h>
    unsigned long previousMillis = 0;
    unsigned long currentMillis = millis();
    
    // Arduino Pin 5 to DIN, 7 to Clk, 6 to LOAD, no.of devices is 1
    LedControl lc=LedControl(5,7,6,1);
    
    
    void setup()
    {
     DcsBios::setup();
    // Initialize the MAX7219 device
     lc.shutdown(0,false);   // Enable display
     lc.setIntensity(0,5);  // Set brightness level (0 is min, 15 is max)
     lc.clearDisplay(0);     // Clear display register
     
    }
    
    DcsBios::Switch2Pos eppApuGenPwr("EPP_APU_GEN_PWR", 10);
    
    
    void onMasterCautionChange(unsigned int newValue) 
     {
       if (newValue==1)
       {
       previousMillis = currentMillis;
       }   
     }
     
    DcsBios::IntegerBuffer masterCautionBuffer(0x1012, 0x0800, 11, onMasterCautionChange);
    
    
    void loop()
     {
     currentMillis = millis();
     
     if (currentMillis - previousMillis < 400)
       {
       lc.setRow(0,7,B01110110);
       lc.setRow(0,6,B01110111);
       lc.setRow(0,5,B01011011);
       lc.setRow(0,4,B00001111);
       lc.setRow(0,3,B01001111);
       lc.setRow(0,2,B00000101);
       lc.setRow(0,1,B10000000);
       lc.setRow(0,0,B01001110);
       }
    
     else     
       {
       lc.setRow(0,7,B01011011);
       lc.setRow(0,6,B00111011);
       lc.setRow(0,5,B11011011);
       lc.setRow(0,4,B00000000);
       lc.setRow(0,3,B01111110);
       lc.setRow(0,2,B01010111);
       lc.setRow(0,1,B00000000);
       lc.setRow(0,0,B00000000);
       }
    
       DcsBios::loop();
     
    }
    
    

     

     

    The important part is :

     

    #include <LedControl.h>

     

    LedControl lc=LedControl(5,7,6,1); // Arduino Pin 5 to DIN, 7 to Clk, 6 to LOAD, no.of devices is 1

    lc.shutdown(0,false); // Enable display

    lc.setIntensity(0,5); // Set brightness level (0 is min, 15 is max)

    lc.clearDisplay(0); // Clear display register

     

    lc.setRow is for controling every segment but there are others command like this.

     

     

    lc.setDigit

    lc.setLed

    lc.setChar

    etc..

  7. Hoo RS485 is already included in dcs bios, perfect! I found the RS485 exemple, thanks!

     

    Using a PC power supply is a good idea.

    I read for powering Arduino is :

     

    5v by USB port

    6-20V (7-12v better) by the Vin pin or the jack. (not 5v cause Arduino do a -1v, drop of tension by this way)

     

    So, how can I send 5v by the 5v pin? It's not a 5v out?

     

    Else, If I powering all arduino with the 5v, so the 12v no use at all?

     

    Thanks again!

  8. Adafruit 3.5” TFT LCD is a closer match. I’d recommend lighted push buttons or a taller non lighted one so you could insert a lighting strip underneath.

     

    Ok thanks a lot for your precision.

     

    Ian;3280781']For driving a TFT display for the CDU over a SPI interface' date=' I'd look into Arduino-compatible boards with an ARM processor. An ATMega328 can drive one, but you'll get a lot of lag when it has to push lots of pixels on a full display update (e.g. when switching to another page).[/quote']

     

    And the Arduino Due (or Zero) is not more powerfull for this?

  9. Is there a thread who explain the code we need for the rs485 lan?

     

    I see this :

     

    #define DCSBIOS_RS485_SLAVE XX

     

    For the slave, but I don't find what I must write for the master.

     

    Any help?

     

    And so, I need 2/3 Mega 2560 Pro for RS485 Master:

    https://fr.aliexpress.com/item/Mega-2560-PRO-Embed-CH340G-ATmega2560-16AU-with-male-pinheaders-Compatible-for-Arduino-Mega-2560/32801785024.html?

     

    And, X unit of 2560 Pro MINI and Micro for Slave :

    https://fr.aliexpress.com/item/Mega-2560-PROMINI-5V-ATmega2560-16AU-with-male-pinheaders-Compatible-for-Arduino-Mega-2560/32802310906.html?

    https://fr.aliexpress.com/item/Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-For-Arduino-Pro-Mini-With-2-Row-Pin-Header/32808519179.html

     

    Right?

     

    A 12v transformer with 3A, it's enough to power everything (all arduino board)?

    Thanks a lot!

  10. I found this (orange.. no green lcd ):

     

    https://fr.aliexpress.com/item/2pcs-lots-1pcs-UNO-R3-MEGA328P-with-usb-2-4-Inch-TFT-Touch-LCD-Screen-Module/2029995980.html?

     

    160 * 128 dots orange (black background).

    I think it work with arduino and dcs bios?

     

    UT8QpeDXmNcXXagOFbXY.jpg?

     

    UT8cR1DXXRXXXagOFbXl.jpg?

     

    Why I want to use a LCD on arduino? Because with the LCD 5" the writing font is affected by the anti aliasing and it's not very clear. And the backlight of the 5" LCD (TFT) is bad (too shinny, etc...)

  11. Hi

     

    I have a 5" hdmi screen (216*160mm visible) and I want to use it for the CDU.

    But, there's another best way?

     

    I mean the 5" screen is a TFT LCD and have not a real black background coz angles, like this :

     

    http://cdn2.ubergizmo.com/wp-content/uploads/2016/06/tft-vs-ips-view-angle.jpg

     

    So, is there any other solution like a screen with only green dot/led or other?

     

    If not, I have this screen :

     

    http://www.kumantech.com/kuman-5quot-inch-resistive-800x480-hdmi-tft-lcd-display-screen-module-with-touch-panel-pen-sd-card-for-raspberry-pi-3-2-model-b-rpi-1-b-b-a-a-sc5a_p0088.html

     

    I think I can't connect it to an Arduino, right?

     

     

    And for keayboard, I think this buttons are great?

     

    https://fr.aliexpress.com/item/50-pcs-B3F-Tactile-Bouton-Poussoir-A14-couleur-chapeau-50-pcs-transparent-cap-50-pcs-Momentan/32831037675.html?

     

    Thanks a lot!

  12. It works!

     

    Thanks for your help!

     

     

    It's not a clear code, but it's better than nothing.

     

     

    #define DCSBIOS_IRQ_SERIAL
    #include <DcsBios.h> 
    #include <LedControl.h>
    unsigned long previousMillis = 0;
    unsigned long currentMillis = millis();
    
    // Arduino Pin 5 to DIN, 7 to Clk, 6 to LOAD, no.of devices is 1
    LedControl lc=LedControl(5,7,6,1);
    
    
    void setup()
    {
     DcsBios::setup();
    // Initialize the MAX7219 device
     lc.shutdown(0,false);   // Enable display
     lc.setIntensity(0,5);  // Set brightness level (0 is min, 15 is max)
     lc.clearDisplay(0);     // Clear display register
     
    }
    
    DcsBios::Switch2Pos eppApuGenPwr("EPP_APU_GEN_PWR", 10);
    
    
    void onMasterCautionChange(unsigned int newValue) 
     {
       if (newValue==1)
       {
       previousMillis = currentMillis;
       }   
     }
     
    DcsBios::IntegerBuffer masterCautionBuffer(0x1012, 0x0800, 11, onMasterCautionChange);
    
    
    void loop()
     {
     currentMillis = millis();
     
     if (currentMillis - previousMillis < 400)
       {
       lc.setRow(0,7,B01110110);
       lc.setRow(0,6,B01110111);
       lc.setRow(0,5,B01011011);
       lc.setRow(0,4,B00001111);
       lc.setRow(0,3,B01001111);
       lc.setRow(0,2,B00000101);
       lc.setRow(0,1,B10000000);
       lc.setRow(0,0,B01001110);
       }
    
     else     
       {
       lc.setRow(0,7,B01011011);
       lc.setRow(0,6,B00111011);
       lc.setRow(0,5,B11011011);
       lc.setRow(0,4,B00000000);
       lc.setRow(0,3,B01111110);
       lc.setRow(0,2,B01010111);
       lc.setRow(0,1,B00000000);
       lc.setRow(0,0,B00000000);
       }
    
       DcsBios::loop();
     
    }

  13. Hi,

     

    I was makking a 7-segment for the Master Caution.

     

    But, I have only found the Master Caution LED and the 7-segment twinkle:

     

     

    How can I do, to run a code then Master Caution is active? (not the LED but the Master Caution itself).

     

    I want to showing the Master Caution all the time among other things.

     

    Any idea? Thanks!:thumbup:

  14. Thanks for reply.

     

    The

     

    DcsBios::Switch2Pos ufcMasterCaution("UFC_MASTER_CAUTION", PIN);

     

    Is only when I push the Master Caution reset button, no?

     

    I have trying with this code and It work (LCD 7 segment) only if I push the reset button.

  15. Hi guys!

     

    DCS Bios is very perfect for me, but is there a command line for the Master Caution? (not the led!)

     

    Cause this :

     

    void onMasterCautionChange(unsigned int newValue) {

    /* your code here */

    }

    DcsBios::IntegerBuffer masterCautionBuffer(0x1012, 0x0800, 11, onMasterCautionChange);

     

    It's work only if the LED (ingame) is ON, so the code inside "twinkle" like this :

     

     

    I want a code who works all the time then the Master Caution (the fonction, not the led) is ON.

     

    Any idea? Thanks a lot!

     

    Ps: I'm noob with C and programmation.

×
×
  • Create New...