Skip to content
Alan Yorinks edited this page Oct 24, 2015 · 5 revisions

Open a command window and G\go to the directory where you created and installed the rb4s files in this step.

To start the program type:

./rb4s.py

or

python3 rb4s.py

standardfirmata

To see a complete set of command line options, type:

./rb4s.py -h

or

python3 rb4s.py -h

usage: rb4s.py [-h] [-comport COM] [-wait WAIT] [-ipAddr IP_ADDR]
               [-ipPort IP_PORT] [-handshake HANDSHAKE]

optional arguments:
  -h, --help            show this help message and exit
  -comport COM          Arduino COM port
  -wait WAIT            Arduino wait time
  -ipAddr IP_ADDR       Arduino IP Address (WiFly)
  -ipPort IP_PORT       Arduino IP port (WiFly)
  -handshake HANDSHAKE  IP Device Handshake String (WiFly)

Using rb4s with a WiFly Module

You can wirelessly control the Redbot by installing a WiFly module on the RedBot mainboard (it plugs into the XBee Socket).

You will need to identify the IP address assigned to the WiFly (refer to the WiFly documentation). Here is a typical command line to start rb4s for WiFly:

./rb4s.py -ipAddr="192.168.1.180"

The IP address shown here is the one assigned by a local router. This value will most likely be something different for you.

Note that the default IP port and WiFly handshake strings are being used.

You may modify those values by using their corresponding command line options.

After rb4s Is Invoked

The program will announce the version of pymata_aio that is being used, the com port being used, and the number of pins found. In a short period of time, a web page will open in your default web browser to aScratchX warning dialog.

standardfirmata

Select "I understand" and the ScratchX editor should open.

standardfirmata

The editor is not yet connected to rb4s, and to indicate that, the connection indicator, the circle above the Connect to rb4s block, is yellow.

rb4s works best with either Google Chrome or FireFox.

Please note: If you are using Google Chrome, you may see warnings and error messages from the Browser. There is a bug in Chrome when interfacing to the Python webbrowser package. These messages can safely be ignored.

Now let's try out a quick test program!