<
From version < 20.1 >
edited by ybe
on 2012/04/25 11:30
To version < 7.1 >
edited by ybe
on 2012/04/23 12:45
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,7 @@
1 +{{warning}}
2 +This page is not migrated yet. Try the [[old wiki>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler||shape="rect"]] until someone fills me with content.
3 +{{/warning}}
4 +
1 1  {{panel title="Project Overview" borderStyle="dashed"}}
2 2  Responsible:
3 3  
... ... @@ -22,13 +22,13 @@
22 22  
23 23  For more information about the leJOS NXJ project and especially the leJOS tutorial and NXT Programming API please visit the [[leJOS NXJ website>>url:http://lejos.sourceforge.net/||shape="rect" class="ext-link"]].
24 24  
25 -**Note that KLOTS currently uses leJOS NXJ v0.8.5, not the brand new v0.9.0.** You can download the v0.8.5 API from (% class="confluence-link" %) (% class="confluence-link confluence-link" %)[[here>>attach:leJOS_v0.8.5_API.zip]](% class="confluence-link" %) (% class="confluence-link noprint confluence-link" %)[[image:attach:download.png]][[attach:leJOS_v0.8.5_API.zip]](% class="noprint confluence-link" %) (%%).
29 +**Note that KLOTS currently uses leJOS NXJ v0.8.5, not the brand new v0.9.0.** You can download the v0.8.5 API from here [[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KLOTS/leJOS_v0.8.5_API.zip||title="Attachment 'leJOS_v0.8.5_API.zip' in Projects/KLOTS" shape="rect" class="attachment"]](% class="noprint" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/chrome/common/download.png]][[attach:leJOS_v0.8.5_API.zip]](%%).
26 26  
27 27  ----
28 28  
29 29  == Getting Started ==
30 30  
31 -The KLOTS is part of the KIELER Rich Client Application (RCA) which can be found in the [[Downloads>>url:http://www.informatik.uni-kiel.de/rtsys/kieler/downloads/||shape="rect"]]. It is a standalone application containing all KLOTS features.
35 +The KLOTS is part of the KIELER Rich Client Application (RCA) which can be found in the [[Downloads>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Downloads||shape="rect" class="wiki"]]. It is a standalone application containing all KLOTS features.
32 32  
33 33  The required Eclipse plug-ins can also be downloaded from the KIELER update page. To get the full functionality of the KLOTS several plug-ins are required:
34 34  
... ... @@ -41,9 +41,6 @@
41 41  * de.cau.cs.kieler.sim.kiem.config
42 42  * de.cau.cs.kieler.sim.kiem.ui
43 43  * de.cau.cs.kieler.sim.table
44 -* de.cau.cs.kieler.sim.signals
45 -* de.cau.cs.kieler.sim.syncsignalreset
46 -* de.cau.cs.kieler.sj
47 47  * net.sf.antcontrib.cpptasks
48 48  * org.apache.bcel
49 49  * org.bluecove
... ... @@ -64,7 +64,7 @@
64 64  
65 65  Then you should be able to start KIELER and select the //KLOTS perspective// (Window->Open Perspective->Other...->KLOTS).
66 66  
67 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/perspective.png]]
68 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/perspective.png]][[attach:perspective.png]]
68 68  
69 69  ----
70 70  
... ... @@ -94,23 +94,20 @@
94 94  
95 95  If you are running KLOTS from a non-root user, you will need to ensure that you have read and write access for the NXT USB device in ///dev/bus/usb//. If you can identify the device in ///dev/bus/usb//, you can do this by:
96 96  
97 -{{code language="bash"}}
98 -sudo chmod a+w /dev/bus/usb/xxx/yyy
99 -{{/code}}
98 +{{{sudo chmod a+w /dev/bus/usb/xxx/yyy
99 +}}}
100 100  
101 101  However, the //yyy// number will count up each time the NXT is disconnected and reconnected. A better solution is to use **udev rules**. How to do this may vary with different Linux systems. To use //udev rules//, set up a file such as ///etc/udev/rules.d/70-lego.rules// and populate it with the following lines:
102 102  
103 -{{code language="bash"}}
104 -# Lego NXT
105 -BUS=="usb", SYSFS{idVendor}=="03eb", GROUP="a Linux user group", MODE="0660"
106 -BUS=="usb", SYSFS{idVendor}=="0694", GROUP="a Linux user group", MODE="0660"
107 -{{/code}}
103 +{{{# Lego NXT
104 +BUS=="usb", SYSFS{idVendor}=="03eb", GROUP="a Linux user group", MODE="0660"
105 +BUS=="usb", SYSFS{idVendor}=="0694", GROUP="a Linux user group", MODE="0660"
106 +}}}
108 108  
109 109  You should replace the //a Linux user group// entry with the user group to witch your Linux user account belongs. The two vendors are LEGO and Atmel (for the Sam-Ba driver used in firmware update mode). You may need to reload the rules or restart //udev//. On some Linux systems, the command to reload the rules is:
110 110  
111 -{{code language="bash"}}
112 -sudo udevadm control --reload-rules
113 -{{/code}}
110 +{{{sudo udevadm control --reload-rules.
111 +}}}
114 114  
115 115  === (optional) Bluetooth set-up on Linux systems ===
116 116  
... ... @@ -123,8 +123,8 @@
123 123  
124 124  In order to be able to download and execute Embedded Java programs, the leJOS NXJ firmware should be installed on your NXT brick. KLOTS provides an easy firmware flash feature. To install the leJOS NXJ firmware connect the NXT with the computer via USB and turn it on. Then select //Window->Preferences->KIELER->Lego execution->Firmware flash// and follow the instructions. You do not need to set the NXT brick in firmware-update mode, although doing so may help in case you are getting errors during the flash procedure. The whole process should not take more than a minute and after that the new firmware is permanently saved on the NXT's flash memory, so that the original Lego firmware is fully removed. If you want to remove the leJOS NXJ firmware and switch back to the original Lego firmware, you have to flash it on the NXT brick. More information on how to do so can be found on the [[Lego Mindstorms website>>url:http://mindstorms.lego.com/en-us/support/default.aspx||shape="rect" class="ext-link"]].
125 125  
126 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_firmware_flash1.png]](%%)
127 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_firmware_flash2.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_firmware_flash3.png]]
124 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_firmware_flash1.png]][[attach:preferences_firmware_flash1.png]]
125 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_firmware_flash2.png]][[attach:preferences_firmware_flash2.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_firmware_flash3.png]][[attach:preferences_firmware_flash3.png]]
128 128  
129 129  ----
130 130  
... ... @@ -132,7 +132,7 @@
132 132  
133 133  Next you must specify how KLOTS shall communicate with the NXT brick. There are two possible options: communication via USB or communication via Bluetooth. Select //Window->Preferences->KIELER->Lego execution// and choose your favored connection type. In addition you can specify the brick's hardware address or friendly name. To save you all the manual selections, you can simply click on the //Search for NXTs// button and then choose your NXT from the list of found bricks. Note that for establishing Bluetooth connection, your NXT and computer should be already paired. The pairing procedure may vary with different operating systems and Bluetooth stacks. However you should always initiate it from the computer, not from the NXT brick. The default NXT PIN for the Bluetooth connection is set to **1234**.
134 134  
135 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_connection1.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_connection2.png]]
133 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_connection1.png]][[attach:preferences_connection1.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/preferences_connection2.png]][[attach:preferences_connection2.png]]
136 136  
137 137  ----
138 138  
... ... @@ -140,7 +140,7 @@
140 140  
141 141  In order to be able to write your first program, you should create a new Embedded Java project. To do so, select //File->New->Project...->KIELER->Embedded Java Project//. Then specify the new project's name and click on //Finish//. The project will be then automatically created and appears in the //Project Explorer View// on the right site.
142 142  
143 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_project.png]]
141 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_project.png]][[attach:new_embedded_java_project.png]]
144 144  
145 145  ----
146 146  
... ... @@ -148,34 +148,17 @@
148 148  
149 149  You are now ready to create a new Embedded Java file. Click on the project and package in witch you wish to create the new file and select //New->Other...->KIELER->Embedded Java File//. Type in a name for the new file and click on //Finish//. Note that the file name should not exceed 20 characters including the file extension.
150 150  
151 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file.png]]
149 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file.png]][[attach:new_embedded_java_file.png]]
152 152  
153 153  ----
154 154  
155 155  == Introducing the KLOTS Editor ==
156 156  
157 -{{section}}
158 -{{column width="90%"}}
159 -When the KLOTS perspective is activated, Embedded Java files //(.java)// will be automatically associated with the //KLOTS Editor//. To open an Embedded Java file simply double-click on it. The KLOTS Editor offers the full functionality of the //standard Eclipse Java Editor// as well as means to build, download and execute Embedded Java programs on the NXT brick. The easiest way to check if a file is displayed in the KLOTS Editor is to look at the editor's toolbar. There should be four new buttons.
160 -{{/column}}
155 +[[~[~[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/buttons_all.png~]~]>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KLOTS/buttons_all.png||shape="rect"]]When the KLOTS perspective is activated, Embedded Java files //(.java)// will be automatically associated with the //KLOTS Editor//. To open an Embedded Java file simply double-click on it. The KLOTS Editor offers the full functionality of the //standard Eclipse Java Editor// as well as means to build, download and execute Embedded Java programs on the NXT brick. The easiest way to check if a file is displayed in the KLOTS Editor is to look at the editor's toolbar. There should be four new buttons.
161 161  
162 -{{column width="10%"}}
163 -[[image:attach:buttons_all.png]]
164 -{{/column}}
165 -{{/section}}
157 +[[~[~[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/buttons_build.png~]~]>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KLOTS/buttons_build.png||shape="rect"]]You can now write your code in the corresponding section and click on the **Build Embedded Java Program** button. Your program will then be build and linked with the leJOS NXJ library. An executable file named //<your_program's_name>.nxj// should appear in the project's //bin// folder.
158 + Sometimes, while running your program on the NXT brick, you may get a "blue screen", i.e. the brick plays an error tune and a message like
166 166  
167 -{{section}}
168 -{{column width="90%"}}
169 -You can now write your code in the corresponding section and click on the **Build Embedded Java Program** button. Your program will then be build and linked with the leJOS NXJ library. An executable file named //<your_program's_name>.nxj// should appear in the project's //bin// folder.
170 -{{/column}}
171 -
172 -{{column width="10%"}}
173 -[[image:attach:buttons_build.png]]
174 -{{/column}}
175 -{{/section}}
176 -
177 -Sometimes, while running your program on the NXT brick, you may get a "blue screen", i.e. the brick plays an error tune and a message like
178 -
179 179  |(((
180 180  Java Exception:
181 181  )))
... ... @@ -191,45 +191,22 @@
191 191  
192 192  appears on the display. This indicates that an uncaught Java //Runtime Exception//, e.g. (% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)//NullPointerException//(% style="color: rgb(0,0,0);" %),(%%) occurred somewhere in your program. The error message indicates the kind of the exception and the method where it was thrown. This information is produced by the program build procedure and you can see it by clicking on the //Details// button. It can be very helpful for debugging your programs.
193 193  
194 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/build_program_output.png]]
175 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/build_program_output.png]][[attach:build_program_output.png]]
176 +\\
195 195  
196 -{{section}}
197 -{{column width="90%"}}
198 -By clicking on the **Download Embedded Java Program to NXT** button the executable file will be downloaded to your NXT brick. The file will then appear in the //Files// submenu on the brick. Note that for the downloading process the NXT should be turned on and connected to the computer via USB. (You can also download programs via Bluetooth.)
199 -{{/column}}
178 +[[~[~[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/buttons_download.png~]~]>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KLOTS/buttons_download.png||shape="rect"]]By clicking on the **Download Embedded Java Program to NXT** button the executable file will be downloaded to your NXT brick. The file will then appear in the //Files// submenu on the brick. Note that for the downloading process the NXT should be turned on and connected to the computer via USB. (You can also download programs via Bluetooth.)
200 200  
201 -{{column width="10%"}}
202 -[[image:attach:buttons_download.png]]
203 -{{/column}}
204 -{{/section}}
205 -
206 -{{section}}
207 -{{column width="90%"}}
208 -To run the program on your NXT brick, in case the program uses the //remote print// option and you want to enable remote printing, you should click on the **Run Embedded Java Program on NXT** button. The program will then be started on the NXT and you should specify **on the brick** whether or not you want to enable remote printing and the protocol for the connection with the computer (USB or Bluetooth). Then you should make the corresponding selection in KLOTS.
180 +[[~[~[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/buttons_run.png~]~]>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KLOTS/buttons_run.png||shape="rect"]]To run the program on your NXT brick, in case the program uses the //remote print// option and you want to enable remote printing, you should click on the **Run Embedded Java Program on NXT** button. The program will then be started on the NXT and you should specify **on the brick** whether or not you want to enable remote printing and the protocol for the connection with the computer (USB or Bluetooth). Then you should make the corresponding selection in KLOTS.
209 209  **Remember to do the connection selection always on the NXT site first, since doing otherwise can trigger connection abort!**
210 -{{/column}}
211 211  
212 -{{column width="10%"}}
213 -[[image:attach:buttons_run.png]]
214 -{{/column}}
215 -{{/section}}
183 +[[~[~[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/buttons_console.png~]~]>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KLOTS/buttons_console.png||shape="rect"]]The remote prints will be then displayed on the //KLOTS Console// on the right site of the KLOTS Perspective. You can temporary disable the remote printing by clicking on the **Disable Console** button. You can then enable remote printing at any time by simply clicking on that button again.
216 216  
217 -{{section}}
218 -{{column width="90%"}}
219 -The remote prints will be then displayed on the //KLOTS Console// on the right site of the KLOTS Perspective. You can temporary disable the remote printing by clicking on the **Disable Console** button. You can then enable remote printing at any time by simply clicking on that button again.
220 -{{/column}}
185 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_console1.png]][[attach:new_embedded_java_file_example_console1.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_console2.png]][[attach:new_embedded_java_file_example_console2.png]]
221 221  
222 -{{column width="10%"}}
223 -[[image:attach:buttons_console.png]]
224 -{{/column}}
225 -{{/section}}
226 -
227 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_console1.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_console2.png]]
228 -
229 229  If you are not using remote printing, or do not want to enable communication with a computer, you can also start a program by choosing it from the //Files// submenu on the NXT brick.
230 230  
231 231  === An Embedded Java sample program ===
232 232  
233 -(% class="confluence-link" %)[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_editor1.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_editor2.png]]
191 +[[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_editor1.png]][[attach:new_embedded_java_file_example_editor1.png]][[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KLOTS/new_embedded_java_file_example_editor2.png]][[attach:new_embedded_java_file_example_editor2.png]]
234 234  
235 235  ----
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -885214
1 +885154
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/885214/Lego On-Line Testing System (KLOTS)
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/885154/Lego On-Line Testing System (KLOTS)