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
Example
OzRegisterController
OzRGBLedController
OzRotaryController
OzServoController
OzStepCounter
OzStepperMotorMultiController
OzSwitchController
OzTemperatureController
OzTimer
OzUltraSonicController
Examples
Bootloader
Company


Oz Optical Gate Controller

This protocol controls an infrared optical gate connected to the microcontroller.

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

I. "Welcome" event

Example

c=welcome&id=4dgbhf&type=OzOpticalGateController&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 "OzOpticalGateController" 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. Command from .Net

"Set Infra" command

With this command you can turn on/off the optical gate.

Example

c=setinfra&state=1&t=0&id=4dgbhf

Parameters

Parameter Type Range Functionality
c String "setinfra" Identifies the command.
state Bool 0,1 0 means "Turn Off" the infra, 1 means "Turn On" the infra
t Byte 0-255 Counts the number of commands sent. 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=setinfra_resp&state=1&photo=1&id=4dgbhf&t=3

Parameters

Parameter Type Range Functionality
c String "setinfra_resp" Identifies the response.
id String 6 characters (numbers, uppercase and lowercase characters) The ID of the device which is chosen by the microcontroller.
state Bool 0,1 State of the infra: 0 means "Turned Off", 1 means "Turned On"
photo Bool 0,1 1 if an object covers the infra and 0 if not. (see:OzekiButtonController)
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

"Infra Changed" Event

This event is called if the optical gate's photo parameter has changed.

c=infrachanged&id=4dgbhf&t=4&state=1&photo=1

Parameters

Parameter Type Range Functionality
c String "infrachanged" Identifies the event.
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.
state Bool 0,1 State of the infra: 0 means "Turned Off", 1 means "Turned On"
photo Bool 0,1 1 if an object covers the infra and 0 if not. (see:OzekiButtonController)



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