User Tools

Site Tools


doc:lua:tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
doc:lua:tutorial [2011/06/19 19:57] – created admindoc:lua:tutorial [2014/03/02 07:27] (current) – removed admin
Line 1: Line 1:
-====== The OOBD Lua Tutorial ====== 
  
-FIXME under construction 
- 
-While the page [[start|Lua scripts in OOBD]] tells you the basics about how Lua works inside OOBD, this tutorial will show you how to use Lua to realize your own ideas in OOBD. 
- 
-In this tutorial we'll read the VIN number from a vehicle. While doing that, we'll create a menu, identify the hardware, use the OOBD Lua function library, talk to the vehicle and show the result. 
- 
-First we'll need a Menu on the screen to be able to start anything at all. That we'll do with the following code sequence 
- 
- 
-<code lua> 
-function Start(oldvalue,id) 
- identifyOOBDInterface() 
- openPage("VIN Test") 
- addElement("VIN Number", "vin","-",0x2, "") 
- pageDone() 
- return oldvalue 
-end 
-  
-  
------------------ Do the initial settings -------------- 
-  
-Start("","") 
-return 
-</code> 
doc/lua/tutorial.1308506269.txt.gz · Last modified: 2011/06/19 19:57 by admin