pappavis Posted October 31, 2017 Posted October 31, 2017 (edited) visual programming I'm working on visual programming for DCS-BIOS. The idea is drag-and-drop programming negating the need for C++ programming skills. Thats the high-level goal. I've made such tooling for arduino + javascript. See my website --> https://github.com/pappavis/EasyBlocks4Kids try out here --> http://erasmus-ict.nl/easylab4kids How it works --> https://www.facebook.com/EasyBlocks4Kids/ Installation instructions; 1. Downloads and install NodeJS. 2. do a "npm install johnny-five" in your home dir. 3. Write a program, see above screenshot. 4. Copy-paste the generated programcode into texteditor, and execute with node whatever.js 5. Order an EasyLab here --> https://goo.gl/hUQvhV A trial DCS-BIOS implementation will come "soon". all feedback, suggestions welcome. #easylab4kids #easyblocks4kids Edited October 31, 2017 by pappavis 1 met vriendelijke groet, Михель "умный, спортсмен, комсомолетс" [sIGPIC][/sIGPIC] [TABLE]SPECS: i9-9900K 32gigs RAM, Geforce 2070RTX, Creative XFi Fata1ity, TIR5, Valve Index & HP Reverb, HOTAS Warthog, Logitech G933 Headset, 10Tb storage.[/TABLE]
BravoYankee4 Posted November 1, 2017 Posted November 1, 2017 would be very grateful if you can help with this matter. Already a lot of branches on the forum reviewed, but the solution to the problem never found. I updated the my original thread with the solution.
Gliptal Posted November 13, 2017 Posted November 13, 2017 The documentation only provides an example related to an Arduino set up: what if I wanted to code a CLI/script (in C++ I guess?) and send commands without going through an Arduino? Is that possible at all?
Mr_Burns Posted November 15, 2017 Posted November 15, 2017 Hi guys, sorry to ask a couple of questions i could search for am sure I will get straighter answers just asking: 1. Does this run on a nano 2. I have a hud, it needs 7 pots for dim/volume, has 3 on-off-on, 3 on-off and 26 push buttons. Can this be done with one Nano (although I have 3 if reuired. Thanks
Tekkx Posted November 15, 2017 Posted November 15, 2017 (edited) ... 1. Does this run on a nano 2. I have a hud, it needs 7 pots for dim/volume, has 3 on-off-on, 3 on-off and 26 push buttons. Can this be done with one Nano? ... Dear Mr_Burns (and others). Maybe it helps a little: I opened a new Thread with a potential answer to your questions (there is also a link to the userguide available). :book: https://forums.eagle.ru/showthread.php?p=3292776#post3292776 Please read there and answer (and maybe ask further) there. :) (NOT here) :music_whistling: Thank you. :thumbup: Edited November 15, 2017 by Tekkx Manual for my version of RS485-Hardware, contact: tekkx@dresi.de Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.
Mr_Burns Posted November 15, 2017 Posted November 15, 2017 Cant give you rep, must have given it to you before! Wil take a good read and thanks for the link matel
geebeer2 Posted November 16, 2017 Posted November 16, 2017 dcs bios Ikarius Hi, anyone use dcs-bios and Ikarius togheter? my dcs bios stop to work when I use Ikarius to extract the gauges. thank you Dan
BravoYankee4 Posted November 16, 2017 Posted November 16, 2017 I have done that without any issues when flying the MIG-21 previously. Since then I have bought a new PC bu didn't install DCS-Bios yet since I only fly the Viggen for the moment, so can't tell if something has changed with the current versions. Can't remeber exactly how the export script was configured, but I believe it was pretty simple to get it running properly.
geebeer2 Posted November 16, 2017 Posted November 16, 2017 Hi, I configured export.Lua add a line how suggested by Ikarius....but doesn't works..... best Dan
molevitch Posted December 13, 2017 Posted December 13, 2017 On the right track, DCS-BIOS, Mi-8 and rewired ARC-9 Box? Hi DCS-Bios Users, Moved my post here.... My name is Molevitch and I fly helicopters in DCS, mostly Mi-8, sometimes Huey. I hope you can help me. I fly in VR, Rift, but am building a pit in anticipation of the Mi-24 (fingers crossed) which I can use for Mi-8 also, as there is so much crossover on Russian equipment. I have been building radio panels and so far I have created R-863, R828, SPU-7 and Jadro. These are all managed through a Bodnar 64 Button board, and all work perfectly. Now, I bought a genuine ARC-9 Radio Nav box on eBay. I want to retain the main freq dials with their original mechanical switches, as they feel great, a fantastic clunky feedback. Other tuner pots have been replaced with rotary encoders, as has volume. Mode selector was busted, and has been replaced with a rotary switch. So I have not used DCS-BIOS.... or Arduino.... yet. In my research into this, I have discovered Mi-8 JSON files, and am just now reading and beginning to understand DCS-BIOS and Arduino Sketch. My question, and hope for help. Will the Mi-8 JSON script enable the correct use of the original dial-switches? I have now rewired the originals to create simple switches on the 100Khz and 10Khz dialers on the top wafers (not shown in pic). This creates 21 switches per dial set, 10 + 11, In DCS Mi-8 Controls options, only Increase or Decrease is offered. I want the dials to select the correct frequency when switched/turned. Wiring has been terminated with female duponts for connection to Bodnar BBI 64. This can be changed to male pins for an Arduino board. I have ordered an Arduino board to use. I am not asking you to do it all for me, of course! I just want to check I am on the right path before I invest hours of time on this.... Thank you for your consideration of my question. I hope you will give me a little guidance. Yours, Molevitch. SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2. Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit. [sIGPIC][/sIGPIC] www.blacksharkden.com
Alburg Posted December 30, 2017 Posted December 30, 2017 Hi guys, is it actually possible to invert a switch within DCS Bios or its Arduino programing? For an example I've wired up the Aerial Refueling Slipway Control Lever switch as normally open. Having it in normally open makes the lever move to closed in DCS instead of open, when activated. Yes I know I could just reconnect the switch to be normally closed, but it don'T have enough space for that. Thanks and cheers Sven
Alburg Posted December 30, 2017 Posted December 30, 2017 Hi guys, is it actually possible to invert a switch within DCS Bios or its Arduino programing? For an example I've wired up the Aerial Refueling Slipway Control Lever switch as normally open. Having it in normally open makes the lever move to closed in DCS instead of open, when activated. Yes I know I could just reconnect the switch to be normally closed, but it don'T have enough space for that. Thanks and cheers Sven Thanks to a small hin from Hansolo the problem is solved. I don't know if it is the correct way but it worked. const byte fscpRcvrLeverPins[2] = {39,}; DcsBios::SwitchMultiPos fscpRcvrLever("FSCP_RCVR_LEVER", fscpRcvrLeverPins, 2);
Chain Posted January 26, 2018 Posted January 26, 2018 (edited) I did some experimenting with DCS-BIOS, Arduino UNO, Adafruit Motor Shield V2 and 2Deg bipolar stepper motors. Here is my example code. This code reads the A-10C VVI value and moves the stepper motor according to the value. I used code from this thread as a baseline: https://forums.eagle.ru/showpost.php?p=3188826&postcount=3 //---------------------------------------------------- //****DCS-BIOS ADAFRUIT MOTOR SHIELD V2 EXAMPLE CODE**** // This example is for Adafruit Motorshield v2 only! // Will not work with v1 shields //---------------------------------------------------- #define DCSBIOS_IRQ_SERIAL #include <Wire.h> #include <AccelStepper.h> #include <Adafruit_MotorShield.h> #include "DcsBios.h" //*****ADAFRUIT MOTOR SHIELD V2 SPECIFIC SETTINGS***** //---------------------------------------------------- Adafruit_MotorShield AFMStop(0x60); // Only one Adafruit Motor Shield in use. Default address, no jumpers. // Stepper with 180 steps per revolution (2.0 degree) connected to position 2 (M3 and M4) on the board // Only one shield is in use so it is named as AFMStop. If you have another you can name it AFMSbot, AFMSmed etc Adafruit_StepperMotor *myStepper2 = AFMStop.getStepper(180, 2); // Wrappers for the motor! // You can change steps to DOUBLE, INTERLEAVE or MICROSTEP void forwardstep2() { myStepper2->onestep(FORWARD, DOUBLE); } void backwardstep2() { myStepper2->onestep(BACKWARD, DOUBLE); } //---------------------------------------------------- //*****ADAFRUIT MOTOR SHIELD V2 SPECIFIC SETTINGS END HERE***** //This example code is from Eagle Dynamics Forums. I do not know the author. I modified it a little. struct StepperConfig { unsigned int maxSteps; unsigned int acceleration; unsigned int maxSpeed; }; class AdafruitStepper : public DcsBios::Int16Buffer { private: AccelStepper& stepper; StepperConfig& stepperConfig; unsigned int (*map_function)(unsigned int); unsigned char initState; public: AdafruitStepper(unsigned int address, AccelStepper& stepper, StepperConfig& stepperConfig, unsigned int (*map_function)(unsigned int)) : Int16Buffer(address), stepper(stepper), stepperConfig(stepperConfig), map_function(map_function), initState(0) { } virtual void loop() { if (initState == 0) { // not initialized yet stepper.setMaxSpeed(stepperConfig.maxSpeed); stepper.setAcceleration(stepperConfig.acceleration); stepper.moveTo(-((long)stepperConfig.maxSteps)); initState = 1; } if (initState == 1) { // zeroing stepper.run(); if (stepper.currentPosition() <= -((long)stepperConfig.maxSteps)) { stepper.setCurrentPosition(0); initState = 2; stepper.moveTo(stepperConfig.maxSteps/2); } } if (initState == 2) { // running normally if (hasUpdatedData()) { unsigned int newPosition = map_function(getData()); newPosition = constrain(newPosition, 0, stepperConfig.maxSteps); stepper.moveTo(newPosition); } stepper.run(); } } }; /* Define stepper parameters multiple AdafruitStepper instances can share the same StepperConfig object */ struct StepperConfig stepperConfig = { 180, // maxSteps 1200, // maxSpeed 10000 // acceleration }; // define AccelStepper instance AccelStepper stepper(forwardstep2, backwardstep2); // define AdafruitStepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name (A-10C vertical velocity indicator in this example) // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance AdafruitStepper vvi(0x106e, stepper, stepperConfig, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, 0, 65535, 0, stepperConfig.maxSteps); }); void setup() { DcsBios::setup(); AFMStop.begin(); // Start the top Adafruit motor shield. } void loop() { DcsBios::loop(); } Edited January 27, 2018 by Chain System: Windows 10 | i7-7700K @ 4.5 Ghz | 32GB of RAM | Nvidia GTX 1080, 3440x1440 | DELL Ultrawide U3415W | Samsung 960 Evo M.2 and 2 TB Seagate Barracuda | TM Warthog Hotas | SLAW F-16 Pedals | Oculus Rift CV1 and HTC Vive PRO VR + High fidelity F/A-18C simpit :)
rocketeer Posted February 3, 2018 Posted February 3, 2018 In the past i got basic dcsbios working for switches for push buttons, toggles, rotary switches and encoders. then when i tried to get rs485 working via Hansolo's method of max487, that is a new level of difficulty. I consulted him many times with questions on wiring, compiling errors. He was very helpful and patient. Thanks Hans! I even got the master mega to compile, and separately the slave nano to compile. Then when linked up and they lit up and started the master com port, then nothing happens except the annoying couldn't compute fast_cwd pointer error. after several tries, checking wiring and sketches etc. i deleted the dcsbios folder. tried to reinstall and it can't even find the dcsbios.h file. many of you have done this dcsbios install, and some even tried the rs485 successfully. instead of keep on bothering Hansolo and Ian, can you guys share how should dcsbios be properly installed? and after that the sequence of running the rs485? At github we have the v.0.7.1 for download. it will download dcs-bios-v.0.7.1.zip. to install a library one clicks on the zip file. but when i do that, the library name becomes dcs-bios-v.0.7.1 in the IDE, does that matter? must it be just dcsbios? then at the download page, there's the second link for the source code. that will download dcs-bios-0.7.1.zip with the 'v'. the folders inside look identical to the dcs-bios-v.0.7.1.zip file's. do i have to bother with this second zip file? then there's the tar.gz. do i have to bother with that? and i read something about socat. i tried to run it and it extracted a folder. i ran socat.exe and nothing happened. can i know which files above i need to bother with? do i need to rename the zip file? or the folder inside? they all contain the version number. and after i get dcsbios properly installed, no more errors, and it can find dcsbios.h etc. how to best run the rs485? if both master and slave can compile when connected to usb, i disconnect slave's usb, link up the maxchip, then just run com port cmd for master, and push some switch on the slave and i should see stuff running on the cmd prompt like when the arduino is a standalone board? can warning errors like the can't compute be ignored or must be fixed? sorry many questions. but if i figure this out i hope it'd help others going to attempt rs485 too. My A10C cockpit thread
rocketeer Posted February 4, 2018 Posted February 4, 2018 nobody can comment on the dcs bios install procedure? My A10C cockpit thread
Alburg Posted February 4, 2018 Posted February 4, 2018 Hi rocketeer, you aren't alone! I have the same issue you have.
Patriot Posted February 4, 2018 Posted February 4, 2018 This code is work: #define DCSBIOS_IRQ_SERIAL #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "DcsBios.h" #define digits_00_32x64_width 32 #define digits_00_32x64_height 64 const PROGMEM unsigned char digits_00_32x64_bits[] = { // cut }; #define digits_1to9_32x64_width 32 #define digits_1to9_32x64_height 704 const PROGMEM unsigned char digits_1to9_32x64_bits[] = { //cut }; #define digits_32x64_width 32 #define digits_32x64_height 704 const PROGMEM unsigned char digits_32x64_bits[] = { // cut }; DcsBios::ProtocolParser parser; Adafruit_SSD1306 display(4); void onAlt10000ftCntChange(unsigned int newValue) { drawDigit(0, newValue, digits_1to9_32x64_bits); } void onAlt1000ftCntChange(unsigned int newValue) { drawDigit(1, newValue, digits_32x64_bits); } void onAlt100ftCntChange(unsigned int newValue) { drawDigit(2, newValue, digits_32x64_bits); } DcsBios::IntegerBuffer alt10000ftCntBuffer(0x1080, 0xffff, 0, onAlt10000ftCntChange); DcsBios::IntegerBuffer alt1000ftCntBuffer(0x1082, 0xffff, 0, onAlt1000ftCntChange); DcsBios::IntegerBuffer alt100ftCntBuffer(0x1084, 0xffff, 0, onAlt100ftCntChange); void drawDigit(unsigned int index, unsigned int offset, unsigned char* bits) { unsigned int y_offset_lines = offset / 103; display.fillRect(32*index, 0, 32, 64, BLACK); display.drawXBitmap(32*index, 0, &bits[4*y_offset_lines], 32, 64, WHITE); display.display(); } void setup() { DcsBios::setup(); display.begin(SSD1306_SWITCHCAPVCC); display.clearDisplay(); drawDigit(0, 0, digits_1to9_32x64_bits); drawDigit(1, 0, digits_32x64_bits); drawDigit(2, 0, digits_32x64_bits); drawDigit(3, 0, digits_00_32x64_bits); } void loop() { DcsBios::loop(); } But why not work this code? Not run method onDcsBiosWrite. I use last version of DCS-BIOS #define DCSBIOS_IRQ_SERIAL #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "DcsBios.h" #define digits_00_32x64_width 32 #define digits_00_32x64_height 64 const PROGMEM unsigned char digits_00_32x64_bits[] = { // cut }; #define digits_1to9_32x64_width 32 #define digits_1to9_32x64_height 704 const PROGMEM unsigned char digits_1to9_32x64_bits[] = { //cut }; #define digits_32x64_width 32 #define digits_32x64_height 704 const PROGMEM unsigned char digits_32x64_bits[] = { // cut }; DcsBios::ProtocolParser parser; Adafruit_SSD1306 display(4); void drawDigit(unsigned int index, unsigned int offset, unsigned char* bits) { //double y_offset = (double)offset / 65535.0d; //unsigned int y_offset_lines = y_offset * 640; unsigned int y_offset_lines = offset / 103; display.fillRect(32*index, 0, 32, 64, BLACK); display.drawXBitmap(32*index, 0, &bits[4*y_offset_lines], 32, 64, WHITE); display.display(); } void onDcsBiosWrite(unsigned int address, unsigned int value) { address = address & 0xffff; value = value & 0xffff; if (address == 0x1080) { unsigned int alt10000ftCntValue = (value & 0xffff) >> 0; drawDigit(0, alt10000ftCntValue, digits_1to9_32x64_bits); } if (address == 0x1082) { unsigned int alt1000ftCntValue = (value & 0xffff) >> 0; drawDigit(1, alt1000ftCntValue, digits_32x64_bits); } if (address == 0x1084) { unsigned int alt100ftCntValue = (value & 0xffff) >> 0; drawDigit(2, alt100ftCntValue, digits_32x64_bits); } } void setup() { DcsBios::setup(); display.begin(SSD1306_SWITCHCAPVCC); display.clearDisplay(); drawDigit(0, 0, digits_1to9_32x64_bits); drawDigit(1, 0, digits_32x64_bits); drawDigit(2, 0, digits_32x64_bits); drawDigit(3, 0, digits_00_32x64_bits); } void loop() { DcsBios::loop(); } My cockpit A-10C Строю кокпит A-10C i7 7700k, 32Gb RAM, SSD NVMe, GTX 1080, Hotas Warthog, HTC Vive. ----------------- With love from Russia
rocketeer Posted February 6, 2018 Posted February 6, 2018 Alburg, maybe mega to mega is impossible or at least difficult. why don't you try mega to nano first? hansolo has many panels set up that way. if you can at least make it work for mega to nano, that can be your backup set up. i know some panels need many input or output. my plan is to use 2 nanos when needed instead of a mega slave. nanos are much cheaper anyway. My A10C cockpit thread
Patriot Posted February 6, 2018 Posted February 6, 2018 Ian, do you plan to add support for STM32 boards in the future? These boards have the same price as arduino nano, but are several times more powerful. My cockpit A-10C Строю кокпит A-10C i7 7700k, 32Gb RAM, SSD NVMe, GTX 1080, Hotas Warthog, HTC Vive. ----------------- With love from Russia
cBass Posted February 10, 2018 Posted February 10, 2018 TCP commands Using zerobrane to open tcp connection to send commands to pull t handles. I can see a tcp socket open through netstat but no joy on dcs getting the commands any hints? while true do local server = assert(s.bind("127.0.0.1",7778)) print("waiting for connection on port 7778 ") local client = server:accept() print("connected") client:send("FIRE_EXT_DISCH INC \n") client:send("FIRE_EXT_DISCH DEC \n") -- sleep(10) client:send("FIRE_LENG_PULL INC\n") client:send("FIRE_LENG_PULL DEC\n") client:settimeout(10) end
frogger Posted March 9, 2018 Posted March 9, 2018 just a quick question from a newbie. i have the m2000c library and im working with the rpm gauge needle DcsBios::ServoOutput nRpm(0x6058, 9, 544, 2400); i can control a servo just fine but id like to control a small dc motor from a playstation controller in my joystick to add slight vibration. when i connect the motor to gnd and pin 9 it whines as its not being supplied enough voltage? i have some L298N h bridges and if i understand correctly i should be able to use them to control the motors speed with pulse width modulation. this is where im lost. ive been watching tutorials on how to do it standalone but linking it to dcs bios has got me stuck. could anyone point me in the right direction. again im very new to this and basicly just winging it :P
frogger Posted March 11, 2018 Posted March 11, 2018 ok i got the idea to work. i just need to figure out motor speed as atm its not spinning fast enough to transfer noticeable vibrations
aymen Posted April 6, 2018 Posted April 6, 2018 hi im trying to build my own F-5e cockpit i need the appropriete files to add it to dcs-bios
Recommended Posts