Table of Contents

bs_example

Peripheral example program.

Synopsis

bs_example

Description

This demonstration program lets you move a cel (a cloud) around the screen with a joystick and leave an image of it on the screen when you press the trigger. You can also distort the cel and clear the screen. The program supports control pad, joystick, and mouse interaction.

This example illustrates how to use the broker shell peripheral interaction utilities.

The connection/configuration/disconnection routines can be used as-is in final code.

The data interaction/processing is less efficient than it could be for the sake of modularity, comprehensibility, and flexibility. If you unpack the BS_NiceWaitEvent() and BS_ProcessXxxData() routines and perform that processing in a more direct way performance will improve. You should also eliminate any debouncing checks that you don't use.

Joystick controls

Mouse controls

Pad 1 controls (used with mouse):

Pad 2 controls (only if there are 2 pads and no mouse):

Caveats

Lightgun support is not yet included in this example.

Associated Files

cloud.cel

Location

examples/EventBroker/Control_Port_Peripherals