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
OzDCMotorControllerL298N
OzDHTController
OzDoorphoneController
OzEEPROMManager
OzGyroControllerMPU6050
OzIDManager
OzLCDController
OzNfcController
OzOpticalGateController
OzRegisterController
OzRGBLedController
OzRotaryController
OzServoController
OzStepCounter
OzStepperMotorMultiController
OzSwitchController
OzTemperatureController
OzTimer
Example
OzUltraSonicController
Examples
Bootloader
Company


Ozeki Timer

Sets the timer of the microcontroller's processor.

How to test the OzTimer on arduino mega?
Arduino codes are included.

I. "Welcome" event

Example

c=welcome&id=IqlZci&type=OzTimer&pos=2&t=2

Parameters

Parameter Type Range Functionality
c String "welcome" Identifies the welcome message.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
type String "OzTimer" Determines the type of the devicehandler.
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. Commands from .Net

"Set status" command

Starts and stops the timer.

Example

//Timer start
c=setstatus&val=1&t=0&id=IqlZci
//Timer stop c=setstatus&val=0&t=1&id=IqlZci

Parameters

Parameter Type Range Functionality
c String "setstatus" Identifies the command.
val Bool 0,1 0 means stop timers, 1 means start timers.
t Byte 0-255 Counts the number of commands and events sent combined. The 't' of the command is equal to the 't' of its response. Counts from 0 to 255 then from 0 again.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.

Response

//Start timer response
c=status_resp&val=1&id=IqlZci&t=3
//Stop timer response c=status_resp&val=0&id=IqlZci&t=4

Parameters

Parameter Type Range Functionality
c String "setstatus_resp" and "status_resp" Identifies the responses. For status_resp see "Update status" command.
val Bool 0,1 0 means timer not running, 1 means timer running.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



"Status" command

Queries the status.

Example

c=status&t=2&id=IqlZci

Parameters

Parameter Type Range Functionality
c String "status" Identifies the command.
t Byte 0-255 Counts the number of commands and events sent combined. The 't' of the command is equal to the 't' of its response. Counts from 0 to 255 then from 0 again.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.

Response

c=status_resp&val=0&id=IqlZci&t=5

Parameters

Parameter Type Range Functionality
c String "status_resp" Identifies the response.
val Bool 0,1 0 means timer not running, 1 means timer running.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



"Elapsed" command

Queries the time elapsed from the start.

Example

c=elapsed&t=3&id=IqlZci

Parameters

Parameter Type Range Functionality
c String "elapsed" Identifies the command.
t Byte 0-255 Counts the number of commands and events sent combined. The 't' of the command is equal to the 't' of its response. Counts from 0 to 255 then from 0 again.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.

Response

c=elapsed_resp&val=229094&id=IqlZci&t=6

Parameters

Parameter Type Range Functionality
c String "elapsed_resp" Identifies the response.
val Ulong 0-264 Elapsed time in milliseconds.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
t Byte 0-255 Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again.



"Timers" command

Queries the timers.

Example

c=timers&t=4&id=IqlZci

Parameters

Parameter Type Range Functionality
c String "timers" Identifies the command.
t Byte 0-255 Counts the number of commands and events sent combined. The 't' of the command is equal to the 't' of its response. Counts from 0 to 255 then from 0 again.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.

Response

//There are no active timers
c=timers_resp&num=0
//There are active timers c=timers_resp&owner=test3&time=2699&flag=1&id=IqlZci&t=7 [...]

Parameters

Parameter Type Range Functionality
c String "timers_resp" Identifies the response.
num Bool 0 Fix value. Indicates that there are no active timers.
owner String various Actual timer's ID.
time Ulong 0-264 Timer's duration in milliseconds.
flag Bool 0,1 Flag which tells us whether the timer is expired or not.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
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

None



Copyright © 2000- - Ozeki Informatics Ltd. | info@ozeki.hu | Tel: +36 52 532 731
Home > Technology > Robotics > Building robot software > Introduction/Protocols > DeviceHandlers > OzTimer
Page: 1565