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
-
... ... @@ -40,60 +40,24 @@ 40 40 41 41 [[image:attach:lejos_eclipse_plugin.png]] 42 42 43 -= Program LEGO Mindstorms with leJOS and SCCharts = 44 - 45 - 46 - 47 -{{toc minLevel="2"/}} 48 - 49 49 ---- 50 50 51 -== Overview==45 +== Configure KIELER == 52 52 53 - Mindstormsisaproduct family from Lego, withsensors, motorsanda programmablebrick. The newest iteration ofthe product family isthe EV3programmable brick. Itspredecessorsare NXT andRCX. In the following wewillsee how todevelopapplicationsforthe NXT brick, thus //Mindstorms// will be used exchangeable with //NXT brick//.47 +With the Eclipse plugin installed, you can now use KIELER SCCharts for an model-based approach of programming. 54 54 55 - Several open-source,third-partyreplacementsfortheoffical Lego firmwarehave beendeveloped. Thesesupportmany well known programminglanguages,suchasJava,C/C++,Python, Lua,etc.Inthe followingwewilluse KIELERSCChartsto programMindstormsrunningtheLegoJava Operating System([[leJOS>>url:http://www.lejos.org/||shape="rect"]]). Thereforewewill firstinstall leJOSNXJ and flash itsfirmware. Afterwardswewill createa simpleCChartsprojectinKIELERthat we willcompileand deployto the NXT brick.49 +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. 56 56 57 - ----51 +[[image:attach:lejos_nxj_environment.png]] 58 58 59 - ==Download and install leJOS==53 +Create a first project using the SCChart 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. 60 60 61 - Downloadandextract thenewestarchivesfor your OperatingSystemfrom[[Sourceforce>>url:http://sourceforge.net/projects/nxt.lejos.p/files/||shape="rect"]].55 +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. 62 62 63 - The furtherinstallationisexplained indetail[[http:~~/~~/www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStarted.htm>>url:http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStarted.htm||shape="rect"]].57 +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 64 65 -=== Known issues === 66 - 67 -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. 68 - 69 69 ---- 70 70 71 -== Test leJOS == 72 - 73 -A simple Hello World application for the Mindstorms is developed as part of the leJOS tutorial [[http:~~/~~/www.lejos.org/nxt/nxj/tutorial/Preliminaries/FirstProgram.htm>>url:http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/FirstProgram.htm||shape="rect"]] 74 - 75 -If this works with your device, you are able to start using KIELER to develop applications for the NXT brick.\\ 76 - 77 ----- 78 - 79 -== The Eclipse plugin for leJOS == 80 - 81 -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...//) 82 - 83 -[[image:attach:lejos_eclipse_plugin.png]] 84 - 85 -On the preference page (//Window > Preferences > leJOS NXJ//) you have to set the path of your leJOS installation, the NXJ_HOME directory. 86 - 87 -[[image:attach:lejos_eclipse_plugin_preferences.png]] 88 - 89 ----- 90 - 91 -== Configure KIELER == 92 - 93 -Environment setup. Sample project creation. Project launch. 94 - 95 ----- 96 - 97 97 == Using the Remote Console (RConsole) == 98 98 99 99 nxjconsoleviewer
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -1376273 11 +13762735 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/1376273 1/LEGO Mindstorms with leJOS and SCCharts1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/13762735/LEGO Mindstorms with leJOS and SCCharts