memento10 Posted June 20, 2010 Posted June 20, 2010 Has anyone been successful getting the rotary encoders working using OpenCockpits cards and DCS? For example the Abris Cursor and Abris Brightness knobs? If so, I'd really appreciate some instructions on the Lua and Sioc... :helpsmilie: Thanks!
Avilator Posted June 20, 2010 Posted June 20, 2010 I'm interested in the same question, but for the A-10C. I only respond to that little mechanical voice that says "Terrain! Terrain! Pull Up! Pull Up!" Who can say what is impossible, for the dream of yesterday is the hope of today and the reality of tomorrow. -Robert Goddard "A hybrid. A car for enthusiasts of armpit hair and brown rice." -Jeremy Clarkson "I swear by my pretty floral bonet, I will end you." -Mal from Firefly
Jocman Posted June 20, 2010 Posted June 20, 2010 Me too, I've a lot of them to run.... Jocman Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
Alex_rcpilot Posted June 20, 2010 Posted June 20, 2010 oops, never had the pleasure to use OpenCockpits boards, but I'm having problem with my own solution as well. Hopefully someone with the right experience will show up later.
y2kiah Posted June 21, 2010 Posted June 21, 2010 sorry can't answer the original question, but wanted to let anyone know who may be interested - I will have a complete solution available in the near future for those who want to use Arduino for their pit. Switches, buttons, rotaries, encoders, servos, steppers, 7-segs / LEDs... all of them will be implemented. I'll start a thread here when I'm ready to post the download.
PanelBuilder Posted June 25, 2010 Posted June 25, 2010 oops, never had the pleasure to use OpenCockpits boards, but I'm having problem with my own solution as well. Hopefully someone with the right experience will show up later. Well I've got these incremental encoders working fine with the prototype of what I'm grandiosly calling my universal switch interface card. They say these things can read backwards if you turn them fast enough. So the next step is to test one with an electric drill :-) Gray code encoders are also working great. I really like these, even though they take 4 pins. Cheers, Colin
Alex_rcpilot Posted June 26, 2010 Posted June 26, 2010 Well I've got these incremental encoders working fine with the prototype of what I'm grandiosly calling my universal switch interface card. They say these things can read backwards if you turn them fast enough. So the next step is to test one with an electric drill :-) Gray code encoders are also working great. I really like these, even though they take 4 pins. Cheers, Colin Well, it doesn't necessarily take an electric drill to make that point, but it could be fun to demonstrate how reliable your system is in this way. Basically if you're pooling the pulses from the encoder outputs with a regular routine, it all depends on how frequently you poll it in your s/w. If you turn the encoder fast enough so that more than one states make their way into the time slot of one polling interval, your program will miss some pulses and generate false results. And if your program interrupts on edges, you're likely to get better response out of those encoders. But there are still chances that the encoder spins fast enough and overlapps the same interrupt causing problems. I guess you already knew most of what I said, but it's difficult to calculate how long the maximum time is which takes the program to run between two polling routines. Personally, as long as it doesn't go haywire when I spin it as hard as I can, I can live with it. :) Regards, Alex
m0jo Posted June 27, 2010 Posted June 27, 2010 Has anyone been successful getting the rotary encoders working using OpenCockpits cards and DCS? For example the Abris Cursor and Abris Brightness knobs? If so, I'd really appreciate some instructions on the Lua and Sioc... :helpsmilie: Thanks! You can use a potentiometer for the brightness knob of the Shkval and Abris with opencockpits usb card. I modified a bit oakes lua export code and the Shkval pot seem to work fine. I will finish my Shkval panel this week, re-test the code and I will post my little modification.
memento10 Posted June 28, 2010 Author Posted June 28, 2010 You can use a potentiometer for the brightness knob of the Shkval and Abris with opencockpits usb card. I modified a bit oakes lua export code and the Shkval pot seem to work fine. I will finish my Shkval panel this week, re-test the code and I will post my little modification. That would be great to get the details on this... sounds promising.
m0jo Posted June 29, 2010 Posted June 29, 2010 That would be great to get the details on this... sounds promising. All the details of my little modification are inside Oakes thread (http://forums.eagle.ru/showthread.php?t=45377)
NyZuZ Posted March 18, 2011 Posted March 18, 2011 So anybody managed to move Abris cursos with a gray encoder in open cockpits??
PanelBuilder Posted March 19, 2011 Posted March 19, 2011 So anybody managed to move Abris cursos with a gray encoder in open cockpits?? You don't want to use a gray code encoder for the cursor; you want to use a 2-bit incremental encoder. Cheers, Colin
NyZuZ Posted March 22, 2011 Posted March 22, 2011 I have the solution for use a Gray Encoder direct to Master Card for control Abris cursor. In ExportSupport: -- Calls non-clickable commands without parameters for two-position switch function TwoPositionSwitch_NCC_noparam(pValue, pDevice, pCommandNumber) GetDevice(pDevice):SetCommand(pCommandNumber, pValue) end In SiocConfig: [1] = {TwoPositionSwitch_NCC_noparam, 9, 501}, -- Incrementar Abris [2] = {TwoPositionSwitch_NCC_noparam, 9, 502}, -- Decrecer Abris SIOC Code: Var 0400, name CRSdcho Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2 // CRS Derecho { IF &CRSdcho > 0 { &ABRIS_DEC = 1 &ABRIS_DEC = 0 } ELSE { IF &CRSdcho < 0 { &ABRIS_INC = 1 &ABRIS_INC = 0 } } } Var 1, name ABRIS_INC, Link IOCP, Offset 501, Value 0 // Abris Increase Var 2, name ABRIS_DEC, Link IOCP, Offset 502, Value 0 // Abris Decrease Thanks to Oakes and others in this forum for posting all their progress always.
Recommended Posts