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
-
... ... @@ -42,12 +42,10 @@ 42 42 43 43 == The Eclipse plugin for leJOS == 44 44 45 -There is an Eclipse plugin for leJOS which adds a project creation wizard and launch configuration to the platform. You can install it via the Eclipse Marketplace (//Help > Eclipse Marketplace...//) . If you have an **NXT** **brick**, install the **leJOS NXJ** Plug-in.45 +There is an Eclipse plugin for leJOS which adds a project creation wizard and launch configuration to the platform. You can install it via the Eclipse Marketplace (//Help > Eclipse Marketplace...//) 46 46 47 47 [[image:attach:lejos_eclipse_plugin.png]] 48 48 49 -After the installation, the plugin requires a little configuration. Go to //Window > Preferences > leJOS NXJ //and enter the base directory of your **leJOS** **installation** in the **NXJ_HOME field**. 50 - 51 51 ---- 52 52 53 53 == Configure KIELER == ... ... @@ -54,16 +54,28 @@ 54 54 55 55 With the Eclipse plugin for leJOS installed, you can now use KIELER SCCharts for an model-based approach of programming. 56 56 57 -First check the environment settings for NXJ of the KIELER tool (//Window > Preferences > KIELER > Environments//). On the**Execute**tab,ensure thatonlythe commandsforyouroperatingsystemare checked.55 +First check the environment settings for NXJ of the KIELER tool (//Window > Preferences > KIELER > Environments//). Ensure that the commands of the execute tab have correct paths. They have to use the lib directory of your leJOS installation. 58 58 59 - Hit the //Variables// buttonand searchfor **nxj.home**. If the variableexists, your good. If it doesot exist,ensure that you installed and configuredthe Ecplise pluginfor leJOS NXJ correctly.57 +[[image:attach:lejos_nxj_environment.png]] 60 60 61 - [[image:attach:environments_preferences.png]]59 +Create a first project using the SCCharts project wizard (//File > New > Project > KIELER SCCharts > SCT Project//) and select the environment for leJOS NXJ. When pressing the finish button, the project wizard of the leJOS plugin will start. Set the project name and hit finish. The project will be created by the leJOS plugin and initialized by the KIELER plugin, giving it a model file and a file with wrapper code to initalize and run the model. 62 62 63 - **Note:**Ifyoualreadycreatedandlaunchedaproject, the settingsoftheenvironmentarecopiedtothe launchconfiguration. It thusmay be necessary toalter settingsonthelaunch configurationas well astheenvironment.61 +When you choose //Debug As > KiCo Compilation// on the model, it is compiled by the KIELER Compiler to Java code and further compiled and deployed to the NXT brick using the commands from aforesaid environment. 64 64 63 +For a deeper understanding of the project launch and initialization, take a look at the [[wiki page for Prom>>url:http://rtsys.informatik.uni-kiel.de/confluence/pages/viewpage.action?pageId=13762626||shape="rect"]]. 64 + 65 65 ---- 66 66 67 +== Using the Remote Console (RConsole) == 68 + 69 +The display of the NXT brick is rather small compared to a Monitor. To ease debugging, one can print to a Remote Console (RConsole), if the USB cable is connected. This enables easier collection for example of sensor data. 70 + 71 +To use the RConsole, **uncomment** the **RConsole** lines in the wrapper code template **Main.ftl**. Start the **nxjconsoleviewer** tool in the bin directory of your **leJOS installation**. 72 + 73 +Now, when **starting the application**, the brick tries to connect with the nxjconsoleviewer. **Press the //Connect//** button. If connected succesfully, RConsole.println(...) commands will be written to this window. 74 + 75 +---- 76 + 67 67 == Creating an Example Project == 68 68 69 69 The following shows how to create a project, that will turn on a light if a button is pressed. ... ... @@ -70,7 +70,7 @@ 70 70 71 71 === Create a new project: === 72 72 73 -1. Choose //File > New > Project > KIELERSCCharts> SCChartsProject//83 +1. Choose //File > New > Project > SCCharts Project// 74 74 1. In the project creation wizard that opens, select //Mindstorms NXJ// as environment and hit //finish// 75 75 1. The project wizard from the leJOS plugin opens. Set the project name to //Flashlight// and click //finish//. 76 76 1. The project is created and the model file is opened in an editor (This might take a few seconds). ... ... @@ -106,15 +106,3 @@ 106 106 With the mouse over the SCT file in the project explorer, perform //Right Click > Run As > KiCo Compilation.// 107 107 108 108 A launch config is created, which compiles the model to Java code and creates wrapper code from the annotations in the model file. Afterwards this output is compiled and deployed to the Mindstorms brick, by using the shell commands that are defined in the Mindstorms NXJ environment. 109 - 110 -For a deeper understanding of the project launch and initialization, take a look at the [[wiki page for Prom>>url:http://rtsys.informatik.uni-kiel.de/confluence/pages/viewpage.action?pageId=13762626||shape="rect"]]. 111 - 112 ----- 113 - 114 -== Using the Remote Console (RConsole) == 115 - 116 -The display of the NXT brick is rather small compared to a Monitor. To ease debugging, one can print to a Remote Console (RConsole), if the USB cable is connected. This enables easier collection for example of sensor data. 117 - 118 -To use the RConsole, **uncomment** the **RConsole** lines in the wrapper code template **Main.ftl**. Start the **nxjconsoleviewer** tool in the bin directory of your **leJOS installation**. 119 - 120 -Now, when **starting the application**, the brick tries to connect with the nxjconsoleviewer. **Press the //Connect//** button. If connected succesfully, RConsole.println(...) commands will be written to this window.
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -1 45162601 +13763409 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/1 4516260/LEGO Mindstorms with leJOS and SCCharts1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/13763409/LEGO Mindstorms with leJOS and SCCharts