Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Choose File > New > Project > General > Project (do never convert your project in an Xtext-project)
  2. The project is created.
  3. Create a SCChart inside the project.
  4. Open the SCCharts modeling perspective (Window > Perspective > Open Perspective > Other)
  5. Edit the model
  6. Compile the model using the KIELER compiler (using the Netlist-Based Deployment (NXT) compilation system)

Edit the Model:

Change the contents of the model file to the following code and save it.

Code Block
languagesct
themeEclipse
titleFloodlight.sctsctx
scchart FlashlightFloodlight {
    
    input bool @macro "Button", "ENTER" button
    
    output bool @macro "Floodlight", "S1" light
    
    initial state lightOff
    if button do light = true go to lightOn
    
    state lightOn
    if !button do light = false go to lightOff
}

...

Use the RConsole compilation system to deploy to the NXT (Currently called Netlist-Based Deployment (NXT) via RConsole). Start the nxjconsoleviewer tool. 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.

To stop this nxt is this mode the ENTER and ESC button (orange and dark grey) have to be pressed at the same time. Yu have to disconnect and reconnect via the nxjconsoleviewer tool if you restart the application.

The EV3 brick has a similar feature. However it does not require any code changes. Just run the ev3console program in the bin directory of your leJOS installation from command line. The output of the brick will be printed to this command line.

...