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
OzUltrasonicController
Example
Examples
Bootloader
Company


Oz Ultrasonic Controller

This protocol controls an ultrasonic sensor connected to the microcontroller.

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

I. "Welcome" event

Example

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

Parameters

Parameter Type Range Functionality
c String "welcome" Identifies the welcome message.
type String "OzUltraSonicController" 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

"Get Distance" command

With this command you can get the current distance of the measured object.

Example

c=getdistance&t=0&id=IqlZc

Parameters

Parameter Type Range Functionality
c String "getdistance" Identifies the command.
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=getdistance_resp&distance=10&id=IqlZci&t=3

Parameters

Parameter Type Range Functionality
c String "getdistance_resp" Identifies the response.
distance Double 0-100000 How far is the measured object.
t Byte 0-255 Counts the number of events and responses sent combined. 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.



III. Event from the device

"Distance" Event

The device sends continuously this event. This is the current distance of a physical object from the sensor.

//Valid distance
5.65
//Invalid distance Out of range
Copyright © 2000- - Ozeki Informatics Ltd. | info@ozeki.hu | Tel: +36 1 371 0150
Home > Technology > Robotics > Building robot software > Introduction/Protocols > DeviceHandlers > OzUltrasonicController
Page: 1563