metalnwood Posted April 14, 2011 Posted April 14, 2011 Interesting, I will read up on the arduino boards, they seem to be priced quite well, even in New Zealand. I am keen to see what the language is like and what you can do with them. It's been a few years since I have done any embedded stuff. I stil have my Atmel development kit around but I was using C and it looks like this is a different language. No doubt easier to do things with.
y2kiah Posted April 14, 2011 Posted April 14, 2011 The language is C++ with some limitations, anything "Arduino" in the language are just functions in their library
metalnwood Posted April 15, 2011 Posted April 15, 2011 OK, that will be fairly easy for me to play with. I will have a look at the functionality of their boards. Thanks!
metalnwood Posted April 15, 2011 Posted April 15, 2011 I have had a look at that stuff and I am sold! It looks lie a pretty good compromise for ease of use and functionality. I thought there were only a few shields but there appear to be a lot made by third parties including gps etc. Fairly good prices. I might just have to give this all a go. I also see one of them already supports windows keyboard/joysticks etc at a cheaper price that some of the other stuff I have been getting - with the benefit I can add my own code as well.. Thanks for the heads up on this guys!
metalnwood Posted April 15, 2011 Posted April 15, 2011 I changed my mind y2kiah, this is the worst thing that could happen. I have been browsing the sparkfun site and could spend hours mucking around with this stuff :)
icemaker Posted April 15, 2011 Posted April 15, 2011 The language is C++ with some limitations, anything "Arduino" in the language are just functions in their library This "Arduino" cards seems interesting! have you any links to show implementation of this cards?
metalnwood Posted April 15, 2011 Posted April 15, 2011 This site has all of the stuff + additional bits and pieces. http://www.sparkfun.com/categories/103
Michelange Posted April 15, 2011 Posted April 15, 2011 A good way to script Hi, some information concerning LUA and how you can use several scripts together. For example, the folowing was done to use Tactview and Lotact together. - First of all do not use Export.lua to integrate you lua script. Export.lua is a big comment ans should stay as. - Add you export script in a new file (My_script.lua) - Add the folowing line at the end in export.lua to call your script : dofile( "./Config/export/My_script.lua ") - Your export script "My_script.lua" should have the folowing structure to work together with other scripts. Myfunction = { Start=function(self) -- Add here your code who will be executed once at startup (after pause) end, AfterNextFrame=function(self) -- Add here your code who will be executed at each cycle time end, Stop=function(self) -- Add here your code who will be executed when your leaving the simu end, } -- ============= -- Overload -- ============= -- Works once just before mission start. do local PrevLuaExportStart=LuaExportStart; LuaExportStart=function() Myfonction:Start(); if PrevLuaExportStart then PrevLuaExportStart(); end end end -- Works just after every simulation frame. do local PrevLuaExportAfterNextFrame=LuaExportAfterNextFram e; LuaExportAfterNextFrame=function() Myfonction:AfterNextFrame(); if PrevLuaExportAfterNextFrame then PrevLuaExportAfterNextFrame(); end end end -- Works once just after mission stop. do local PrevLuaExportStop=LuaExportStop; LuaExportStop=function() Myfonction:Stop(); if PrevLuaExportStop then PrevLuaExportStop(); end end end 1 EVAC : French fighter school on LockOn: Flaming Cliffs Moding tutorials at C6
pitbldr Posted April 15, 2011 Author Posted April 15, 2011 Thanks Michelange! That's very helpful!! :thumbup:
Meta Posted July 7, 2011 Posted July 7, 2011 I just finished my prototype of an USB output device. It's basically a microcontroller with an USB plug. The clou is that I managed to let DCS communicate via the LUA scripts directly with that device without any other software needed. Actual I'm searching for some documentation how to get the simulation values in the LUA scripts. Then its possible to switch LEDs like they are in the simulation.
ivanwfr Posted July 7, 2011 Posted July 7, 2011 Hi Meta, Look for arg_number in lua files of Aircrafts/A-10C/Cockpit folder, for instance: AirspeedIndicator/device/AirspeedIndicator.lua maximum_IAS_needle.arg_number = 50 ... LightSystem/LightSystem.lua ConsoleLight = { [b]arg_number[/b] = [color="Red"]800 [/color]... } ... mainpanel_init.lua pilot_draw.arg_number = 540 ... NMSP/NMSP_param.lua light_HARS.arg_number = 606 ... StandbyCompass/StandbyCompass.lua heading.arg_number = 6 ... Then, in your Export.lua: local LightSystem = GetDevice(0) local v = LightSystem:get_argument_value([color="red"]800[/color]) ...
Meta Posted July 7, 2011 Posted July 7, 2011 wow thanks... that really helps me a lot understanding the system and getting my values :thumbup:
m0jo Posted July 7, 2011 Posted July 7, 2011 see also ED's wiki for more information about export.lua
agrasyuk Posted November 28, 2012 Posted November 28, 2012 Now that is the thread I've been looking for all along. Thanks guys! (Yes I'm aware it is dated, but still not a bad idea to up it). Looked through cockpit folder and for the life of me I can find arguments pertaining to SAS panel. Any idea what folder is the SAS lua file resides in ? Thanks ! Anton. My pit build thread . Simple and cheap UFC project
Recommended Posts