Brick Controller Setup


Figure 1: Main screen





Figure 1 shows the Main screen and the controls that are available. The Main screen allows direct control of the four motors and the four LEDs. The individual menu items are described below.




Figure 2: Script Screen





Figure 2 shows the window where the script is entered. For an explanation on script entry and usage, see Using Scripts below. The individual items are described below.


The Script Action menu provides the following functionality.



How to use the Brick Controller

The Brick Controller will control up to 4 independent motor and four independent LED type devices. The Brick Controller can be controlled by either a PC through the USB connector or across the Blutetooth LE interface. Available controls are

NOTE

When using the Motor On/Off button, the direction used last is the direction the motor will run.


The PC interface can be used to enter a Script. Once a script is constructed, it can either be saved on the PC or stored in the connected brick controller. It is highly recommended to save all scripts on the PC, since no save feature is available on the Android Application.


Brick Controller Status LEDs

These are the two LEDs to the right of the Bluetooth Device labeled L1 and L2. There are 3 possible states and they are indicated by the blue and yellow LEDs on the side next to the button as shown in this table.

State

Blue LED

Yellow LED

Connected to and recognized by the PC (Power)

Flashing

ON

Standalone

OFF

ON

Standalone and script running

ON

Flashing



Bluetooth Status LEDs

These are the three LEDs to the left of the Bluetooth Device. These LEDs have two functions. They indicate the state of the Bluetooth connection or can be controlled by the firmware. Once they are controlled by the firmware, they will no longer indicate the state of the Bluetooth connection until the power is cycled or the connection is broken. The table below shows meaning of the different states.

State

Blue LED

Red LED

Green LED

Power applied to BT module

ON

N/A

N/A

Connected to another BT device

ON

N/A

ON

RED Option selected on Android Application

N/A

On

N/A



Using Scripts

Scripts are a set of time sequenced commands. When entering a script, at each time interval (0.1 sec resolution) you indicate what action should happen. For example


at 1.0 seconds Motor 2 begins running in reverse

at 2.3 seconds LED3 turns on, Motor 1begins running in forward

at 5.2 seconds LED3 turns off

at 7.5 seconds Motor2 begins running in forward, Motor 1 stops

at 11.0 seconds Motor2 stops

at 11.5 seconds the script stops


Once the script is entered into the PC, it must be stored in the Brick Controller by using the Store option on the Script Action menu. Scripts can also be stored on the PC by using the Save option.


Controlling the LEDs beyond Off/On requires some thought. The Burst mode will last 5 seconds and the Cycle mode will last 16 seconds. Changing the mode prior to this could cause unpredictable results for that LED. The Pulse mode will continue until the LED is turned off. It is only available on LED3.


Wait event instruction will cause the script to halt until either the BT LED is turned on by the Android application or the sensor input is at the high voltage input, depending on which one is selected. In this case the event is in the TRUE state. If the BT LED is off or the sensor input is at ground, the event is in the FALSE state. If event is in the TRUE state, the script will just continue run normally. This allows for two functional modes

  1. The event is in the false state and the script halts, waiting for the event to become true.

  2. The event is in the true state and the script continues to run, most likely in a reset loop, until the event becomes false causing the script to halt.


NOTE

When the system powers up some of the BT LEDs will be ON. This is NOT the same as controlled by the Android application. If you plan to use either the BLUE or GREEN LED to control your script, you must cycle the LEDs to the desired state.


One simple way to build a script is to construct a table of the different options and then indicate what is to happen at each time interval. Here is an example


Time

CMD

Motor1

Motor2

Motor3

Motor4

LED1

LED2

LED3

LED4

1.1

Motor/LED

FWD

OFF

OFF

OFF

OFF

OFF

OFF

OFF

1.2

Motor/LED

FWD

RVS

OFF

OFF

ON

OFF

OFF

OFF

3.4

Motor/LED

RVS

FWD

OFF

FWD

ON

OFF

OFF

OFF

5.7

Motor/LED

OFF

FWD

OFF

FWD

OFF

OFF

OFF

OFF

8.9

Motor/LED

OFF

FWD

OFF

FWD

OFF

OFF

OFF

OFF

11.3

Motor/LED

OFF

FWD

OFF

FWD

OFF

OFF

OFF

OFF

15.6

Wait

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

20.1

RESET

OFF

OFF

OFF

OFF

ON

OFF

OFF

OFF



Firmware Update


Figure 3: Firmware Update screen



The Firmware Update screen is used to upgrade the firmware in the Brick Controller. With the Brick Controller connected to the PC, select Firmware Update in the Options menu. The Brick Controller will be placed in update mode and a new window will appear as shown below. The buttons in the tool bar are

Once in Firmware Update mode, press the file open button and select the firmware update file provided. Once the file is loaded, press the program button. Wait for the process to complete as indicated by the message “Verify passed!”. At this point press the Exit button and the Brick Controller will restart in normal mode. Verify new firmware version in lower right of the Main Screen.


CAUTION

Interrupting the update process could result in a frozen or ‘bricked’ unit. Please be patient while the update process is working.


NOTE

The restart process may take several tries, so again please be patient while the system is reconnecting.