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
-
... ... @@ -22,8 +22,14 @@ 22 22 23 23 === Known issues === 24 24 25 +== Linux == 26 + 25 25 On Linux there is an issue when uploading the firmware because of a kernel module ([[http:~~/~~/ubuntuforums.org/showthread.php?t=1123633>>url:http://ubuntuforums.org/showthread.php?t=1123633||shape="rect"]]). If you can't upload the firmware with your Linux OS, add **blacklist cdc_acm**{{code language="none"}}{{/code}} at the very end of the file **{{code language="none"}}/etc/modprobe.d/blacklist.conf{{/code}}**. Afterwards execute **{{code language="none"}}sudo rmmod cdc_acm{{/code}}**. This will remove the cdc_acm module from the kernel and prevent its restart. Now try to flash the firmware again. 26 26 29 +Another issue is that the development package of **libusb** has to be installed. On Ubuntu you can do this by using **{{code language="none"}}sudo apt-get install libusb-dev{{/code}}**. 30 + 31 +Furthermore, to use USB connection, a java library has to be compiled via ant. To do this perform **cd /path/to/leJOS/build** and start ant. If the ant build tool is not installed on your system, you can do so via **sudo apt-get install ant**. 32 + 27 27 ---- 28 28 29 29 == Test the Mindstorm == ... ... @@ -70,9 +70,9 @@ 70 70 71 71 == Creating an Example Project == 72 72 73 -The following shows how to create simpleproject, that will turn on a light if a button is pressed.79 +The following shows how to create a project, that will turn on a light if a button is pressed. 74 74 75 - **Create a new project:**81 +=== Create a new project: === 76 76 77 77 1. Choose //File > New > Project > SCCharts Project// 78 78 1. In the project creation wizard that opens, select //Mindstorms NXJ// as environment and hit //finish// ... ... @@ -79,11 +79,11 @@ 79 79 1. The project wizard from the leJOS plugin opens. Set the project name to //Flashlight// and click //finish//. 80 80 1. The project is created and the model file is opened in an editor (This might take a few seconds). 81 81 82 - **Edit the model:**88 +=== Edit the model: === 83 83 84 84 Change the contents of the model file to the following code and save it. 85 85 86 -{{code title="Floodlight.sct" theme="Eclipse"}} 92 +{{code title="Floodlight.sct" theme="Eclipse" language="sct"}} 87 87 scchart Flashlight { 88 88 89 89 @Wrapper TouchSensor, S4 ... ... @@ -105,7 +105,7 @@ 105 105 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.** 106 106 ** 107 107 108 - **Launch the project:**114 +=== Launch the project: === 109 109 110 110 With the mouse over the SCT file in the project explorer, perform //Right Click > Run As > KiCo Compilation.// 111 111
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -13763 3561 +13763409 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/13763 356/LEGO Mindstorms with leJOS and SCCharts1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/13763409/LEGO Mindstorms with leJOS and SCCharts