Changes for page LEGO Mindstorms with leJOS and SCCharts
Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -12,6 +12,12 @@ 12 12 13 13 Several open-source, third-party replacements for the offical Lego firmware have been developed. These support many well known programming languages, such as Java, C/C++, Python, Lua, etc. In the following we will use KIELER SCCharts to program Mindstorms running the Lego Java Operating System ([[leJOS>>url:http://www.lejos.org/||shape="rect"]]). Therefore we will first install leJOS NXJ and flash its firmware. Afterwards we will create a simple SCCharts project in KIELER that we will compile and deploy to the NXT brick. 14 14 15 +If you want to learn the SCCharts langugage first, you can follow these links: 16 + 17 +* [[Introduction to SCCharts>>doc:SCCharts]] 18 +* [[The Textual SCCharts Language SCT>>doc:Textual SCCharts Language SCT]] 19 +* [[SCCharts Examples>>doc:Examples]] 20 + 15 15 ---- 16 16 17 17 == Download and install leJOS == ... ... @@ -40,7 +40,7 @@ 40 40 41 41 The **leJOS NXJ** tools require a **32 Bit** version of Java. However, newer 32 Bit versions of Java are not longer available for Mac. Thus to use leJOS the installation of **Java 1.6 is required**, which is the last one that supports a 32 Bit mode. You can download the installer for Java 1.6 from [[https:~~/~~/support.apple.com/kb/dl1572?locale=en_US>>url:https://support.apple.com/kb/dl1572?locale=en_US||shape="rect"]]. It will install Java 1.6 to ///System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home// so that the environment variable //LEJOS_NXT_JAVA_HOME//, which is set in the installation instructions, points to the correct path. 42 42 43 -The environment variable LEJOS_NXT_JAVA_HOME is set in the installation tutorial by editing ~~/.profile. However, on a Mac the environment variables defined in this file are not visible for GUI Applications, only for apps started from terminal. Thus to use leJOS together with KIELER one either has to start KIELER from terminal or set the environment variable so that all GUI applications can access it ,whichseemsto benottrivial on Mac (see also [[http:~~/~~/stackoverflow.com/questions/135688/setting-environment-variables-in-os-x>>url:http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x||shape="rect"]]).49 +The environment variable LEJOS_NXT_JAVA_HOME is set in the installation tutorial by editing ~~/.profile. However, on a Mac the environment variables defined in this file are not visible for GUI Applications, only for apps started from terminal. Thus to use leJOS together with KIELER, one either has to start KIELER from terminal or set the environment variable so that all GUI applications can access it. However, this does not seem to be trivial on Mac (see also [[http:~~/~~/stackoverflow.com/questions/135688/setting-environment-variables-in-os-x>>url:http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x||shape="rect"]]). 44 44 45 45 ---- 46 46 ... ... @@ -57,7 +57,7 @@ 57 57 58 58 Download and unpack the nightly build of KIELER for your OS. It is available at the [[doc:Downloads]] page.\\ 59 59 60 -**Note:** Java 1.8 is needed on all operating systems ,with Java 1.7 not all plugins of KIELER will be loaded. **On Windows**, you will need to download the **32 Bit version of KIELER** – even if you have a 64 bit operating system! Otherwise flashing the brick and uploading to the brick will fail.66 +**Note:** Java 1.8 is needed on all operating systems. With Java 1.7 not all plugins of KIELER will be loaded. **Furthermore on Windows**, you will need to download the **32 Bit version of KIELER** – even if you have a 64 bit operating system! Otherwise flashing the brick and uploading to the brick will fail. 61 61 62 62 === The Eclipse plugin for leJOS === 63 63 ... ... @@ -71,17 +71,21 @@ 71 71 72 72 If you have an **NXT** **brick**, install the **leJOS NXJ** Plug-in. If you have an **EV3 brick**, install the **leJOS EV3** plugin. 73 73 74 -[[image:attach: lejos_eclipse_plugin.png]]80 +[[image:attach:Screenshot_20171016_130805.png]] 75 75 82 +**Tip:** To speed up the installation, uncheck the option "Contact all update sites during install to find required software". This will reduce the installation time from drastically (around 30 seconds instead 10 minutes). 83 + 84 +\\ 85 + 76 76 After the installation, the plugin requires a **little configuration**. Go to //Window > Preferences > leJOS NXJ// (//Window > Preferences > leJOS EV3 //respectively) and enter the base directory of your **leJOS** **installation** in the **NXJ_HOME field**. 77 77 78 -For EV3 the plugin requires the IP address to connect to the brick (it may work without, but its safer to directly set the name. Reduces headache ). Check **Connect to named brick** and enter the **IP adress** of the brick (displayed on the brick at startup). 88 +For EV3, the plugin requires the IP address to connect to the brick (it may work without, but its safer to directly set the name. Reduces headache ). Check **Connect to named brick** and enter the **IP adress** of the brick (displayed on the brick at startup). 79 79 80 80 ---- 81 81 82 82 == Creating an Example Project == 83 83 84 -The following shows how to create a project, thatwill turn on a light if a button is pressed.94 +The following shows how to create a project, which will turn on a light if a button is pressed. 85 85 86 86 === Create a new project: === 87 87 ... ... @@ -90,7 +90,7 @@ 90 90 1. The project wizard from the leJOS plugin opens. Set the project name to //Flashlight// and click //finish//. 91 91 1. The project is created and the model file is opened in an editor (This might take a few seconds). 92 92 93 -=== Edit the model: ===103 +=== Edit the Model: === 94 94 95 95 Change the contents of the model file to the following code and save it. 96 96 ... ... @@ -115,21 +115,526 @@ 115 115 116 116 The annotations on the input and output variable are used to define which wrapper code is used to set / read them. **@Wrapper TouchSensor, S4** will set the input variable to true iff the touch sensor on the port S4 is pressed. **@Wrapper Floodlight, S1** on the output variable will turn on the red led of the light sensor that is attatched to port S1 iff the variable is true. 117 117 118 -The available wrapper code snippets are defined in the //snippets//directoryof theroject in ftl files (FreeMarker template files).128 +The available wrapper code snippets are defined in the directory //assets/snippets// in ftl files (FreeMarker template files). The table below gives an overview of the available wrapper code snippets. 119 119 120 120 **Note:** The Floodlight of the EV3 has a pretty high latency when switching between on and off. 121 121 122 -**Note: **To view ftl files with highlighting, you may want to install the //FreeMarker IDE// feature from the JBoss Tools. However, this is not necessary to work with KIELER. JBoss Tools is available in the Eclipse Market Place and via update site. The update site for EclipseLuna isupdates/stable/luna/>>url:http://download.jboss.org/jbosstools/updates/stable/luna/||shape="rect"]]132 +**Note: **To view ftl files with highlighting, you may want to install the //FreeMarker IDE// feature from the JBoss Tools. However, this is not necessary to work with KIELER. JBoss Tools is available in the Eclipse Market Place and via update site. The update site for stable releases is [[http:~~/~~/download.jboss.org/jbosstools/neon/stable/updates/ >>url:http://download.jboss.org/jbosstools/neon/stable/updates/||shape="rect"]]. Note that only the //FreeMarker IDE// feature is required (Abridged JBoss Tools > FreeMarker IDE).** 123 123 ** 124 124 125 -=== Launchtheproject: ===135 +=== Build the Project: === 126 126 127 - Withthe mouse over theSCTfile in the projectexplorer,perform//RightClick>RunAs>KiCoCompilation.//137 +The model is now ready to be compiled. Compilation is done in the background when the project is built. There are two ways to build a project: manually using //Project > Build Project//, or automatically via //Project > Build Automatically//. If the automatic build is enabled, resources are built when they are saved. 128 128 129 - A launchconfigiscreated,whichcompilesthemodel toJava code and createswrappercode from the annotationsinthe modelfile.Afterwardsthis outputiscompiledand deployed to the Mindstormsbrick, by using the launch shortcut from the leJOS plugin.If any errors occur, you can see them in the Console View.139 +Building the project will create a new folder //kieler-gen// in which all results are saved. This includes the compiled code from the model, an executable simulation for the model and wrapper code that is ready to be deployed to the Mindstorms Brick. 130 130 131 - For a deeperunderstandingoftheprojectlaunchandinitialization,take alook atthe [[wikipageforProm>>url:http://rtsys.informatik.uni-kiel.de/confluence/pages/viewpage.action?pageId=13762626||shape="rect"]].141 +The simulation is saved as JAR file in //kieler-gen/sim/bin// and can be started via //Right Click > Run as > KIELER Simulation//. Models and variables of a running simulation are displayed in the Data Pool View. 132 132 143 +[[image:attach:Screenshot_20171016_110005.png]] 144 + 145 +Besides the simulation, the finished wrapper code that can be uploaded to the Mindstorms brick is created as part of the project build. It is saved in //kieler-gen/model//. To upload it to the Mindstorms brick, use //Right Click > Run as > leJOS NXT Program//. 146 + 147 +[[image:attach:Screenshot_20171016_120554.png]] 148 + 149 +==== Excluding the Simulation from the NXT Build ==== 150 + 151 +It is necessary to exclude the simulation directory and org.json directory inside kieler-gen from the NXT project specific build via //Right Click > Build Path > Exclude//. Afterwards the project has to be build again to remove all error markers in these directories. 152 + 153 +[[image:attach:Screenshot_20171016_105821.png]] 154 + 155 +Normally the NXT project attempts to compile all Java files in the kieler-gen directory for the platform. However, the simulation that is generated is not targeted at the Mindstorms brick and has compilation errors. It is compiled separately by KIELER. 156 + 157 +=== Available Wrapper Code Snippets === 158 + 159 +There are several wrapper code snippets that can be used as annotations on input and output variables in the model file. These snippets are inserted in the main file template as part of the project build. The available snippets are listed below. 160 + 161 +For sensors, the port has to be on of S1, S2, S3, S4. 162 + 163 +For motors / actuators the port has to be one of A, B, C, D. 164 + 165 +(% class="wrapped" %) 166 +|=((( 167 +Snippet Name and Parameters 168 +)))|=((( 169 +Description 170 +)))|=((( 171 +Use on 172 +)))|=(% colspan="1" %)(% colspan="1" %) 173 +((( 174 +Variable type 175 +)))|=((( 176 +Remark 177 +)))|=(% colspan="1" %)(% colspan="1" %) 178 +((( 179 +Defined in File 180 +))) 181 +|(% colspan="1" %)(% colspan="1" %) 182 +((( 183 +**Clock,** milliseconds 184 +)))|(% colspan="1" %)(% colspan="1" %) 185 +((( 186 +Sets a variable to true for one tick if the time in milliseconds passed since the last time it was set to true. 187 +)))|(% colspan="1" %)(% colspan="1" %) 188 +((( 189 +input 190 +)))|(% colspan="1" %)(% colspan="1" %) 191 +((( 192 +bool 193 +)))|(% colspan="1" %)(% colspan="1" %) 194 +((( 195 +See also ResetClock. 196 +)))|(% colspan="1" %)(% colspan="1" %) 197 +((( 198 +timing.ftl 199 +))) 200 +|(% colspan="1" %)(% colspan="1" %) 201 +((( 202 +**ResetClock,** clockVariableName, autoFalse 203 +)))|(% colspan="1" %)(% colspan="1" %) 204 +((( 205 +Resets a clock, such that the full time intervall of the clock has to elapse, before the clock will be set to true again. 206 + 207 +If autoFalse is true, the reset variable will be set to false automatically. 208 +)))|(% colspan="1" %)(% colspan="1" %) 209 +((( 210 +output 211 +)))|(% colspan="1" %)(% colspan="1" %) 212 +((( 213 +bool 214 +)))|(% colspan="1" %)(% colspan="1" %) 215 +((( 216 +autoFalse is true per default. 217 +)))|(% colspan="1" %)(% colspan="1" %) 218 +((( 219 +timing.ftl 220 +))) 221 +|(% colspan="1" %)(% colspan="1" %) 222 +((( 223 +**Time** 224 +)))|(% colspan="1" %)(% colspan="1" %) 225 +((( 226 +Reads the elapsed time since program start (milliseconds) 227 +)))|(% colspan="1" %)(% colspan="1" %) 228 +((( 229 +input 230 +)))|(% colspan="1" %)(% colspan="1" %) 231 +((( 232 +int 233 +)))|(% colspan="1" %)(% colspan="1" %) 234 +((( 235 +\\ 236 +)))|(% colspan="1" %)(% colspan="1" %) 237 +((( 238 +timing.ftl 239 +))) 240 +|(% colspan="1" %)(% colspan="1" %) 241 +((( 242 +**TickLoopDuration,** targetInMilliseconds 243 +)))|(% colspan="1" %)(% colspan="1" %) 244 +((( 245 +Delays the execution until the tick loop takes at least as long as the given target duration. 246 + 247 +The input variable is set to the actual tick loop duration. 248 +)))|(% colspan="1" %)(% colspan="1" %) 249 +((( 250 +input 251 +)))|(% colspan="1" %)(% colspan="1" %) 252 +((( 253 +int 254 +)))|(% colspan="1" %)(% colspan="1" %) 255 +((( 256 +Should be used on the very first input variable in the model, such that waiting is the last action in the tick loop. 257 + 258 +In case the actual tick loop duration is longer than the target duration, the modeler can provide some error handling. 259 +)))|(% colspan="1" %)(% colspan="1" %) 260 +((( 261 +timing.ftl 262 +))) 263 +|(% colspan="1" %)(% colspan="1" %) 264 +((( 265 +**TickWakeUp** 266 +)))|(% colspan="1" %)(% colspan="1" %) 267 +((( 268 +(% class="content-wrapper" %) 269 +((( 270 +Sets the input variable to the current system time (milliseconds). The model can add to this variable to get a new value. This is the next system time the tick function will be called. 271 + 272 +In other words, the next tick function call is delayed until the wake up time has been reached. 273 + 274 +For instance the statement **nextTickWakeUp += 500** could be used to call the tick function again in 500 milliseconds, if nextTickWakeUp is an input with the corresponding annotation. 275 +))) 276 +)))|(% colspan="1" %)(% colspan="1" %) 277 +((( 278 +input 279 +)))|(% colspan="1" %)(% colspan="1" %) 280 +((( 281 +int 282 +)))|(% colspan="1" %)(% colspan="1" %) 283 +((( 284 +Should be used on the very last input variable in the model, such that waiting and settings the system time is the last action done, before the tick function call. 285 +)))|(% colspan="1" %)(% colspan="1" %) 286 +((( 287 +timing.ftl 288 +))) 289 +|(% colspan="1" %)(% colspan="1" %) 290 +((( 291 +**Sleep** 292 +)))|(% colspan="1" %)(% colspan="1" %) 293 +((( 294 +Lets the current thread sleep the time in milliseconds of the variable value. 295 +)))|(% colspan="1" %)(% colspan="1" %) 296 +((( 297 +output 298 +)))|(% colspan="1" %)(% colspan="1" %) 299 +((( 300 +int 301 +)))|(% colspan="1" %)(% colspan="1" %) 302 +((( 303 +\\ 304 +)))|(% colspan="1" %)(% colspan="1" %) 305 +((( 306 +timing.ftl 307 +))) 308 +|(% colspan="1" %)(% colspan="1" %) 309 +((( 310 +**Print,** autoReset 311 +)))|(% colspan="1" %)(% colspan="1" %) 312 +((( 313 +Prints a string variable if the string is not empty. If autoReset is true then the string variable is set to the empty string after it has been printed 314 +)))|(% colspan="1" %)(% colspan="1" %) 315 +((( 316 +output 317 +)))|(% colspan="1" %)(% colspan="1" %) 318 +((( 319 +string 320 +)))|(% colspan="1" %)(% colspan="1" %) 321 +((( 322 +autoReset is true per default. 323 +)))|(% colspan="1" %)(% colspan="1" %) 324 +((( 325 +print.ftl 326 +))) 327 +|(% colspan="1" %)(% colspan="1" %) 328 +((( 329 +**DrawString,** x, y 330 +)))|(% colspan="1" %)(% colspan="1" %) 331 +((( 332 +Prints a string to the given x and y coordinate on the LCD. 333 +)))|(% colspan="1" %)(% colspan="1" %) 334 +((( 335 +output 336 +)))|(% colspan="1" %)(% colspan="1" %) 337 +((( 338 +string 339 +)))|(% colspan="1" %)(% colspan="1" %) 340 +((( 341 +\\ 342 +)))|(% colspan="1" %)(% colspan="1" %) 343 +((( 344 +print.ftl 345 +))) 346 +|(% colspan="1" %)(% colspan="1" %) 347 +((( 348 +**Button, **buttonId 349 +)))|(% colspan="1" %)(% colspan="1" %) 350 +((( 351 +Sets a variable to true iff the button on the Mindstorms device is pressed. 352 +)))|(% colspan="1" %)(% colspan="1" %) 353 +((( 354 +input 355 +)))|(% colspan="1" %)(% colspan="1" %) 356 +((( 357 +bool 358 +)))|(% colspan="1" %)(% colspan="1" %) 359 +((( 360 +The buttonId has to be one of ENTER, LEFT, RIGHT 361 +)))|(% colspan="1" %)(% colspan="1" %) 362 +((( 363 +touch_and_buttons.ftl 364 +))) 365 +|(% colspan="1" %)(% colspan="1" %) 366 +((( 367 +**TouchSensor**, port 368 +)))|(% colspan="1" %)(% colspan="1" %) 369 +((( 370 +Sets a variable to true iff the touch sensor on the given port is pressed. 371 +)))|(% colspan="1" %)(% colspan="1" %) 372 +((( 373 +input 374 +)))|(% colspan="1" %)(% colspan="1" %) 375 +((( 376 +bool 377 +)))|(% colspan="1" %)(% colspan="1" %) 378 +((( 379 +\\ 380 +)))|(% colspan="1" %)(% colspan="1" %) 381 +((( 382 +touch_and_buttons.ftl 383 +))) 384 +|(% colspan="1" %)(% colspan="1" %) 385 +((( 386 +**LightSensor,** port, percentValue 387 +)))|(% colspan="1" %)(% colspan="1" %) 388 +((( 389 +Reads the value of a light sensor. 390 + 391 +If percentValue is true, the a percent value is retured, based on the light sensor calibration. 392 +)))|(% colspan="1" %)(% colspan="1" %) 393 +((( 394 +input 395 +)))|(% colspan="1" %)(% colspan="1" %) 396 +((( 397 +int 398 +)))|(% colspan="1" %)(% colspan="1" %) 399 +((( 400 +percentValue is not available on EV3 401 +)))|(% colspan="1" %)(% colspan="1" %) 402 +((( 403 +light.ftl 404 +))) 405 +|(% colspan="1" %)(% colspan="1" %) 406 +((( 407 +**CalibrateLightSensor,** port, signal 408 +)))|(% colspan="1" %)(% colspan="1" %) 409 +((( 410 +Calibrates a light sensors high or low values. This means if the variable is true, the current value of the light sensor is taken as its reference high / low value. 411 +)))|(% colspan="1" %)(% colspan="1" %) 412 +((( 413 +output 414 +)))|(% colspan="1" %)(% colspan="1" %) 415 +((( 416 +bool 417 +)))|(% colspan="1" %)(% colspan="1" %) 418 +((( 419 +signal has to be one of High, Low 420 +)))|(% colspan="1" %)(% colspan="1" %) 421 +((( 422 +light.ftl 423 +))) 424 +|(% colspan="1" %)(% colspan="1" %) 425 +((( 426 +**Floodlight,** port 427 +)))|(% colspan="1" %)(% colspan="1" %) 428 +((( 429 +Reads / Sets the state of the red lamp of the light sensor. 430 +)))|(% colspan="1" %)(% colspan="1" %) 431 +((( 432 +input 433 + 434 +output 435 +)))|(% colspan="1" %)(% colspan="1" %) 436 +((( 437 +bool 438 +)))|(% colspan="1" %)(% colspan="1" %) 439 +((( 440 +\\ 441 +)))|(% colspan="1" %)(% colspan="1" %) 442 +((( 443 +light.ftl 444 +))) 445 +|(% colspan="1" %)(% colspan="1" %) 446 +((( 447 +**RCXLamp,** port 448 +)))|(% colspan="1" %)(% colspan="1" %) 449 +((( 450 +Turns an RCX lamp on (variable is true) or off (variable is false) 451 +)))|(% colspan="1" %)(% colspan="1" %) 452 +((( 453 +output 454 +)))|(% colspan="1" %)(% colspan="1" %) 455 +((( 456 +bool 457 +)))|(% colspan="1" %)(% colspan="1" %) 458 +((( 459 +\\ 460 +)))|(% colspan="1" %)(% colspan="1" %) 461 +((( 462 +light.ftl 463 +))) 464 +|(% colspan="1" %)(% colspan="1" %) 465 +((( 466 +**MotorSpeed,** port, brake 467 +)))|(% colspan="1" %)(% colspan="1" %) 468 +((( 469 +Reads / Sets the speed of the motor in degrees per minute. If the speed value is negative, the motor will drive backwards. If the speed is zero, the motor will actively brake until it stops (brake is true) or remove all power and rollout (brake is false). 470 +)))|(% colspan="1" %)(% colspan="1" %) 471 +((( 472 +input 473 + 474 +output 475 +)))|(% colspan="1" %)(% colspan="1" %) 476 +((( 477 +int 478 +)))|(% colspan="1" %)(% colspan="1" %) 479 +((( 480 +brake is true per default. 481 +)))|(% colspan="1" %)(% colspan="1" %) 482 +((( 483 +motor.ftl 484 +))) 485 +|(% colspan="1" %)(% colspan="1" %) 486 +((( 487 +**MotorIsMoving,** port 488 +)))|(% colspan="1" %)(% colspan="1" %) 489 +((( 490 +Sets a variable to true iff the motor on the given port is moving. 491 +)))|(% colspan="1" %)(% colspan="1" %) 492 +((( 493 +input 494 +)))|(% colspan="1" %)(% colspan="1" %) 495 +((( 496 +bool 497 +)))|(% colspan="1" %)(% colspan="1" %) 498 +((( 499 +\\ 500 +)))|(% colspan="1" %)(% colspan="1" %) 501 +((( 502 +motor.ftl 503 +))) 504 +|(% colspan="1" %)(% colspan="1" %) 505 +((( 506 +**MotorRotation,** port 507 +)))|(% colspan="1" %)(% colspan="1" %) 508 +((( 509 +Lets a motor rotate the variable value in degrees. This is only done if the value is unequal zero. If the value is negative, the motor rotates backwards. The variable is set to zero afterwards, such that setting the variable once to a value //X//, will let the motor rotate //X// degrees. 510 +)))|(% colspan="1" %)(% colspan="1" %) 511 +((( 512 +output 513 +)))|(% colspan="1" %)(% colspan="1" %) 514 +((( 515 +int 516 +)))|(% colspan="1" %)(% colspan="1" %) 517 +((( 518 +\\ 519 +)))|(% colspan="1" %)(% colspan="1" %) 520 +((( 521 +motor.ftl 522 +))) 523 +|(% colspan="1" %)(% colspan="1" %) 524 +((( 525 +**Beep,** volume 526 +)))|(% colspan="1" %)(% colspan="1" %) 527 +((( 528 +Plays a beep sound as long as the variable is true. 529 +)))|(% colspan="1" %)(% colspan="1" %) 530 +((( 531 +output 532 +)))|(% colspan="1" %)(% colspan="1" %) 533 +((( 534 +bool 535 +)))|(% colspan="1" %)(% colspan="1" %) 536 +((( 537 +default volume is 10 538 +)))|(% colspan="1" %)(% colspan="1" %) 539 +((( 540 +sound.ftl 541 +))) 542 +|(% colspan="1" %)(% colspan="1" %) 543 +((( 544 +**Buzz,** volume 545 +)))|(% colspan="1" %)(% colspan="1" %) 546 +((( 547 +Plays a buzz sound as long as the variable is true. 548 +)))|(% colspan="1" %)(% colspan="1" %) 549 +((( 550 +output 551 +)))|(% colspan="1" %)(% colspan="1" %) 552 +((( 553 +bool 554 +)))|(% colspan="1" %)(% colspan="1" %) 555 +((( 556 +default volume is 10 557 +)))|(% colspan="1" %)(% colspan="1" %) 558 +((( 559 +sound.ftl 560 +))) 561 +|(% colspan="1" %)(% colspan="1" %) 562 +((( 563 +**BeepSequence,** direction, volume 564 +)))|(% colspan="1" %)(% colspan="1" %) 565 +((( 566 +Plays a sequence of tones in either ascending or descending tone frequency if the variable is true. 567 + 568 +The variable is set to false automatically. 569 +)))|(% colspan="1" %)(% colspan="1" %) 570 +((( 571 +output 572 +)))|(% colspan="1" %)(% colspan="1" %) 573 +((( 574 +bool 575 +)))|(% colspan="1" %)(% colspan="1" %) 576 +((( 577 +direction has to be one of Up, Down 578 + 579 +default volume is 10 580 +)))|(% colspan="1" %)(% colspan="1" %) 581 +((( 582 +sound.ftl 583 +))) 584 +|(% colspan="1" %)(% colspan="1" %) 585 +((( 586 +**UltrasonicSensor,** port 587 +)))|(% colspan="1" %)(% colspan="1" %) 588 +((( 589 +Reads the distance that an ultrasonic sensor measures. 590 +)))|(% colspan="1" %)(% colspan="1" %) 591 +((( 592 +input 593 +)))|(% colspan="1" %)(% colspan="1" %) 594 +((( 595 +int 596 +)))|(% colspan="1" %)(% colspan="1" %) 597 +((( 598 +\\ 599 +)))|(% colspan="1" %)(% colspan="1" %) 600 +((( 601 +ultrasonic.ftl 602 +))) 603 +|(% colspan="1" %)(% colspan="1" %) 604 +((( 605 +**Gyro,** port, mode 606 +)))|(% colspan="1" %)(% colspan="1" %) 607 +((( 608 +Reads the value of a gyroscope. 609 +)))|(% colspan="1" %)(% colspan="1" %) 610 +((( 611 +input 612 +)))|(% colspan="1" %)(% colspan="1" %) 613 +((( 614 +int 615 +)))|(% colspan="1" %)(% colspan="1" %) 616 +((( 617 +Not available on NXT 618 + 619 +mode hat to be one of Angle, Rate 620 +)))|(% colspan="1" %)(% colspan="1" %) 621 +((( 622 +gyro.ftl 623 +))) 624 +|(% colspan="1" %)(% colspan="1" %) 625 +((( 626 +**CalibrateGyro,** port, autoReset 627 +)))|(% colspan="1" %)(% colspan="1" %) 628 +((( 629 +Resets a gyroscope if the variable is true. 630 + 631 +If autoReset is true, the variable is set to false automatically. 632 +)))|(% colspan="1" %)(% colspan="1" %) 633 +((( 634 +output 635 +)))|(% colspan="1" %)(% colspan="1" %) 636 +((( 637 +bool 638 +)))|(% colspan="1" %)(% colspan="1" %) 639 +((( 640 +autoReset is true per default 641 +)))|(% colspan="1" %)(% colspan="1" %) 642 +((( 643 +gyro.ftl 644 +))) 645 + 646 +\\ 647 + 133 133 ---- 134 134 135 135 == Using the Remote Console (RConsole) == ... ... @@ -146,6 +146,7 @@ 146 146 147 147 The following presents typical issues and how to solve them. 148 148 664 +(% class="wrapped" %) 149 149 |=((( 150 150 Issue 151 151 )))|=((( ... ... @@ -171,7 +171,7 @@ 171 171 Uploading to the brick does not respond 172 172 )))|(% colspan="1" %)(% colspan="1" %) 173 173 ((( 174 - 690 +\\ 175 175 )))|(% colspan="1" %)(% colspan="1" %) 176 176 ((( 177 177 You compile a file successfully and when uploading the result, the connected brick is found. Anyway the upload does not terminate and does not react. ... ... @@ -197,7 +197,7 @@ 197 197 Brick does nothing after program finished and prints "Program exit" 198 198 )))|(% colspan="1" %)(% colspan="1" %) 199 199 ((( 200 - 716 +\\ 201 201 )))|(% colspan="1" %)(% colspan="1" %) 202 202 ((( 203 203 A program was uploaded and finished without errors. Afterwards the brick prints "Program exit" but does not open the main menu. ... ... @@ -206,6 +206,6 @@ 206 206 This is normal behaviour if uploading a program in debug mode instead run mode (//Debug As// instead //Run As// in Eclipse). To get back to the main menu, press the ENTER and ESCAPE button of the brick at the same time. 207 207 ))) 208 208 209 - 725 +\\ 210 210 211 - 727 +\\
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 155322301 +37814289 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 15532230/LEGO Mindstorms with leJOS and SCCharts1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/37814289/LEGO Mindstorms with leJOS and SCCharts