Products
Technology
SMS solutions
PBX systems
Databases
Robotics
Building robot hardware
Building electronics
Building robot software
Introduction/Protocols
Architecture
How to develop a devhandler
Line protocol
DeviceHandlers
Oz433Mhz Transceiver
OzAnalogJoystickController
OzBatteryController
OzBuzzerController
OzButtonController
Example
OzDCMotorControllerL298N
OzDHTController
OzDoorphoneController
OzEEPROMManager
OzGyroControllerMPU6050
OzIDManager
OzLCDController
OzNfcController
OzOpticalGateController
OzRegisterController
OzRGBLedController
OzRotaryController
OzServoController
OzStepCounter
OzStepperMotorMultiController
OzSwitchController
OzTemperatureController
OzTimer
OzUltrasonicController
Examples
Bootloader
Company


Oz Button Controller

This protocol is a one way protocol. It shows information of a physical button connected to the microcontroller. If the status of the button changes, the device sends an event to the .Net

How to build a test circuit with a button and an arduino mega?
Arduino codes are included.

I. "Welcome" event

Example

c=welcome&type=OzButtonController&id=A47vvH&pos=2&t=3

Parameters

Parameter Type Range Functionality
c String "welcome" Identifies the welcome message.
type String "OzButtonController" Determines the type of the device.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
pos Byte 0-255 Determines the position of the device on the list of the ID manager of the microcontroller. Please make sure there are no devices on the same position on the same microcontroller!
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



II. Command from .Net

"EnablePullup" command

This command adds a resistor to the pin belonging to the button, basically setting it HIGH. It is used if there is a problem with the button and too many "ButtonStateChange" events are called. Using this command can fix the button. This problem can happen with the button if it is not grounded correctly.

c=enablepullup&state=1&id=A47vvH&t=0

Parameters

Parameter Type Range Functionality
c String "enablepullup" Identifies the command.
state Bool 0,1 With 1 you can pullup the input, 0 sets it back to low state. If the button is in perfect condition it should work in both states.
id String 6 characters (numbers, uppercase and lowercase characters) Identifies the device. The ID is never changed during communication.
t Byte 0-255 Counts the number of commands. Counts from 0 to 255 then from 0 again.

Response

c=enablepullup_resp&state=1&id=A47vvH&t=4

Parameters

Parameter Type Range Functionality
c String "enablepullup_resp" Identifies the event.
state Bool 0,1 If 1 the input is pulled up, if 0 then the input is set to low. If the button is in perfect condition it should work in both states.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the IDManager.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.

"GetState" command

This command returns the actual state of the connected button.

c=getstate&id=A47vvH&t=1

Parameters

Parameter Type Range Functionality
c String "getstate" Identifies the command.
id String 6 characters (numbers, uppercase and lowercase characters) Identifies the device. The ID is never changed during communication.
t Byte 0-255 Counts the number of commands sent. Counts from 0 to 255 then from 0 again.

Response

c=getstate_resp&state=1&id=A47vvH&t=5

Parameters

Parameter Type Range Functionality
c String "getstate_resp" Identifies the response.
state Bool 0,1 It is the actual state of the button. 0 means LOW STATE, 1 means HIGH STATE.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the IDManager.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



III. Event from the device

There are currently no events, but in older version there was a "ButtonStateChange" event.

Copyright © 2000- - Ozeki Informatics Ltd. | info@ozeki.hu | Tel: +36 1 371 0150
Home > Technology > Robotics > Building robot software > Introduction/Protocols > DeviceHandlers > OzButtonController
Page: 1599