Skip to content
Hauke Buhr edited this page Apr 20, 2017 · 31 revisions

CaDS Practical Exam VS

Every student is invited to provide input for next generation!

Background

IMAGE ALT TEXT HERE

Information

Setup Environment on PI

Call Examples

Javadoc

Get Started

Check out the junit examples for more information.

Robot HAL

For your solution you have to use the "CaDSEV3RobotHAL". It provides a basic interface for your control inputs. You could choose between "REAL" and "SIMULATION" by using the "CaDSEV3RobotType" enum. First you have to create the singleton instance by calling:

CaDSEV3RobotHAL.createInstance(type, statusListener, feedbackListener);
  • type is the CaDSEV3RobotType enum
  • statusListener is your implementation of the interface ICaDSEV3RobotStatusListener.
  • feedbackListener is your implementation of the interface ICaDSEV3RobotFeedBackListener.

Through the listener objects you receive robot status messages and you get feedback for your calls. Notice, you could only create one instance, after that you get the same instance, with the settings that were provided at the first time, at any other time. Get the instance by calling:

CaDSEV3RobotHAL.getInstance();

GUI

To start the GUI create a GUI instance by using the following constructor:

CaDSRobotGUISwing(ICaDSRMIConsumer consumer, IIDLCaDSEV3RMIMoveGripper gripper, IIDLCaDSEV3RMIMoveVertical vertical, IIDLCaDSEV3RMIMoveHorizontal horizontal, IIDLCaDSEV3RMIUltraSonic ultraSonic)

To start the GUI and the refresh Thread use the following command:

gui = new CaDSRobotGUISwing(consumer, gripper, vertical, horizontal, ultraSonic);
gui.startGUIRefresh(refreshRate);

refreshRate has to be provided in ms and has to be higher then 99 ms. If you want to stop the refresh call:

gui.stopGUIRefresh();

IDL Parser

There is now a little IDL parser example. The proposed parser design works with plain texts which are used with String.format(format, args); to replace replacement characters with specific Strings. Follow the 4 examples in your ide.

Display

If you want that the display of the brick shows only the information that the system itself provides, follow the following steps:

  • use the buttons on the mindstorm to navigate(left and right button) to the menu entry "system" and press enter(dark grey button in the middle).
  • now find the menu entry "suspend display" and press enter. Now the display should be clear if no other program is running on the mindstorm. If a program is running, you should see the current status values of the system.
  • to return to menu press enter and down(button under enter) at the same time. Now you should see the mindstorm menu again.
Clone this wiki locally