Programming with NEPO® follows a simple principle. The blocks are interconnected and executed by the robot according to their order. This principle is called »sequential operation«. Only blocks that are connected with each other are executed while running the program. The blocks that are connected together and to the start block are also called a sequence or  »task«.

To connect blocks with each other, they have sequence connections and/or connectors. Depending on the mode of a block, the number of the connectors may vary.

Programming with NEPO is really easy. Every program begins with the »start« block.

This block is always added by default in the Open Roberta Lab workspace. The first block that you will execute is connected with the  »sequence connector« of the »start« block. The sequence connector is a triangle at the bottom of the block and this triangle will become yellow as soon as a suitable block is in close proximity.


Your first program - Hello Roberta

Let's write our first program for the EV3. We will use the block " Say ..." from the action category. In the associated text block you can now write a text that your EV3 should say.

This is a very simple program and should only show you the basic possibilities of the Open Roberta Lab and your robot.


Configuration

Before you can then program your robot, you must first configure the sensors and actuators. You can find the different sensors and actuators available for the mBot here.

For each sensor and actuator, you will find a description of its function and how to connect it.


Transfer a program to the mBot

So that you can try out your first program, it must of course first transfer it to your mBot. Just press the »Start on mBot« button as long as there is a connection between the Open Roberta Lab and your mBot. You can read how to connect your mBot to the lab here.


NEPO

NEPO is the name of our graphical programming language. It is easy and fun to learn programming. NEPO can also be used to program and interact with other robot systems.

Perhaps NEPO seems familiar to you. When designing NEPO we were inspired by existing concepts from scratch and blockly.

The graphical NEPO blocks have different components and thus different attributes. A block always represents a certain functionality. Its function can easily be determined by its block category, for example »sensors« . Features of the graphical blocks are:


Selection Menu

In the selection menu you can choose between different functions for the block, such as in block »play ... note« between whole, half, quarter, eighth and sixteenth.



Sequence connection

The blocks are connected to each other using the sequence connection. A program consists of all the linked blocks. The blocks are executed according to their order, from top to bottom. A NEPO block can have at least one sequence connector and a maximum of two, usually two.



Parameter

Input - Parameter Input

Depending on the block different values can be passed to a block. The type of the value can be identified by the colored compounds (called »connectors« ) of a block. In the chapter »block catagory« you can see the different values a block can have. Blocks can only be connected when the colors of the input and the output connector match,.

Output - Return parameters

A block may optionally also pass a value (only one) to another block. These blocks have colored output connectors. Blocks can only be connected when the colors of the input and the output connector match.



Contextmenu

By rightclicking a block its contextmenu can be opened.

Several actions can be performed, using the menu:

  • Duplicate (copys the block and connected input parameters)
  • Add comment (adds a comment to this block)
  • Inline Inputs (changes the appearance of the block)
  • Collapse Block (minimizes the block)
  • Disable Block (deactivates the block so that it won't be executed)
  • Delete x Blocks (deletes the selected and all connected blocks)


Datatypes

There are seven different input and output types within NEPO. These types are as follows:

Remember, not all data types are supported by all robots/systems!

  • Logical value (light blue)
  • Number (dark blue)
  • String/Text (green)
  • Color (yellow)
  • List (purple)
  • Connection (pink)
  • Image (magenta
The type »List« can contain a Logical, Number, String or Color type





Block Categories (Beginner, Expert)

A block-category groups blocks which have similar functionality. For example, the block-category »sensors« contains all blocks which control the sensors of your robot.

The Open Roberta Lab offers two choices when selecting existing blocks:

  • Beginner
  • Expert

The selection »Beginners« is the default selection. This category includes the main program blocks  which are most important for programming a robot.

Choosing »Expert« includes the three additional block-categories »Lists«, »Functions«, and »Messages« and additional NEPO blocks in other block categories.


NEPO offers eleven block categories:

Actionxx

Sensor

xx
Controlxx
Logicxx
Mathxx
Textxx
Lists
x
Coloursxx
Variablesxx
Functions
x
Messages

x






Programming Languages for Code Generation

WeDoStackmachine JSON Code (It runs in the browser, editing is not recommended)

EV3lejos 0.9.0, 0.9.1

Open Roberta xNN

Java

EV3Dev

NAO

mBot 2

Python

EV3 c4ev3

Calliope mini ...

C/C++

NXTC (NXC, not exactly C)
micro:bitMicroPython
Spike Prime/Robot InventorMicroPython
EdisonMicroPython (very limited)

ROB3RTA

BOB3

SenseBox

mBot

NEPO4Arduino

Bionics Kit

Bionic Flower

Bot'n Roll



Arduino C/C++

Arduino C/C++ is actually C/C++, but a somewhat reduced selection from C/C++.

MicroPython is Python for microcontrollers.



Blockdescriptions

The individual blocks and their descriptions can be found here, sorted by categories.

For each block its function, setting possibilities, as well as input and output values are described in detail.


Sample programs

In the section »Example programs mBot« we show you different example programs. For each program there is a short description and a "sample solution". Each example program is divided as follows:

  • Description
  • Table
    • sensors
    • actuators
    • block category
    • difficulty
    • tips
  • Result


So far we have put the following sample programs online:

  • The LEDs switch on
  • Flashing lights
  • Measuring the distance
  • parking sensor
  • Line follower


  • No labels