Atmel ATSAM3S-EK2 データシート

ページ / 71
 
 
 
 
 
32 
Atmel AVR2055 
 
 
8348D-AVR-06/12 
7.3 Dimmable light 
When the light is first turned on, it will attempt to bind occupancy sensor and dimmer 
switch. The occupancy sensor application reports its state once every four seconds. 
In turn, the dimmable light application stores the occupancy sensor state locally. If a 
report from the occupancy sensor contains a state different from the currently stored 
state, the state of the light device is switched. 
During its operation, the light can receive and act on commands from a dimmable 
switch device. All commands and responses are output to the UART. The commands 
and the actions taken on their receipt are described in Section 
. 
The light receives a report from an occupancy sensor device every four  seconds. 
Likewise, it reports its own state (current level and on/off state) to the  dimmable 
switch device. All reports are output to the UART. 
7.4 Dimmer switch 
Once a dimmer switch is turned on, it binds to a dimmable light device. All and all, 
four clusters are bound: on/off, level control, scenes, and groups. Once the binding 
procedure completes, the switch starts a demo loop, which sends a command to a 
dimmable light every five seconds. 
 specifies the sequence of commands 
sent. As part of its functionality, the dimmer switch application also outputs all issued 
commands, received responses, and reports to the UART. 
7.5 Thermostat 
Once a thermostat binds to a remote control, it proceeds to report its local 
temperature 
attribute once every four 
seconds. Whenever a 
SetpointRaiseLowerCommand command is received by the thermostat, it will adjust 
the value of the local temperature attribute. 
7.6 Remote control 
Remote control binds to occupancy sensor and thermostat devices. Once bound, 
remote control will query the sensor device’s  Voltage. In addition, the sensor will 
report the value of Humidity  and  Temperature  attributes  to the remote control 
application  once every 10 seconds. Occupancy state is reported once every four 
seconds. When occupancy state is received, the remote control sends a 
SetpointRaiseLowerCommand  command to the thermostat, which  either lowers or 
raises the temperature on the thermostat, depending on the state of the occupancy 
sensor. 
The application also outputs all reports and sent commands to the UART. 
8 Runner application 
8.1 Application overview 
The Runner application runs on top of the BitCloud PS API and triggers underlying 
PS framework functionality when serial commands are received from the  external 
host microcontroller. Likewise, when confirmations/responses or indication callbacks 
are invoked by the underlying framework, the application translates these to serial 
responses,  which are then forwarded to the host microcontroller  through the serial