PING))) Sensor

The Parallax PING))) sensor is a dual ultrasonic sensor that has the easiest interface of its kind. Utilizing just one I/O pin and drawing only 20mA. This sensor can detect objects from about 3/4 of an inch up to 10 feet away. This sensor is very easy to use with Kondor and requires only three lines of code. The declaration, an assignment, and a call to GetValue().


C# Example:VB.NET Example:

PING ping = new PING();

//Add ping sensor to controller pin 6
ioController.DigitalPin[6] = ping;

//Get value from PING sensor
string strDistance = ping.GetValue();

Dim ping As PING = New PING()

'Add ping sensor to controller pin 6
ioController.DigitalPin(6) = ping

'Get value from PING sensor
Dim strDistance As String = ping.GetValue()

See the full example See the full example

First we declare and initialize the PING sensor object on the first line of code. Then we just need to assign the sensor to a controller pin. And finally we can get the value directly from the sensor for controllers that support this sensor. The value can also be retieved from the controller which is useful for non-native contollers. Refer to the documentation for more info.



Buy PING Sensor
Buy Kondor
Sharp IR Sensor

The Sharp GP2Dxxx series of infrared sensors requires only 3 wire connections and returns a continuous analog signal corresponding to the distance detected. Their low cost and simplistic nature make these a great choice for measuring distance and object detection. This sensor is very easy to use with Kondor and requires about 3-4 lines of code.


C# Example:VB.NET Example:

Sharp2D IR1 = new Sharp2D();

//Add IR Sensor to controller pin 0 and set unit of measure to inches
ioController.AnalogPin[0] = IR1;
IR1.UnitOfMeasure = Sharp2D.UNIT_IN;

//Get value from PING sensor
string strDistance = IR1.GetValue();

Dim IR1 As Sharp2D = New Sharp2D()

'Add IR Sensor to controller pin 0 and set unit of measure to inches
ioController.AnalogPin(0) = IR1
IR1.UnitOfMeasure = Sharp2D.UNIT_IN

'Get value from PING sensor
Dim strDistance As String = IR1.GetValue()

See the full example See the full example

First we must declare and initialize the IR sensor. Then we assign it to a controller pin and optionally set the desired unit of measure for our results. Then all we have to do is make calls to GetValue() to retrieve our data.




Buy GP2D12 Sensor
Buy GP2D120 Sensor
Buy Kondor
MaxSonar-EZ1

The Maxbotix MaxSonar-EZ1 is an ultrasonic range finder that can detect a range of 6 inches to 21 feet. This sensor supports multiple communication protocols including analog, Pulse Width Modulation, and asynchronous serial. This device can be a little tricky to use in code. Luckily the Serializer WL controller has built-in support for this sensor making it easier, thus the examples below are based on this controller. For controllers that support this device, a value can be retrieved using only a few lines of code.


C# Example:VB.NET Example:

MaxSonarEZ1 EZ1 = new MaxSonarEZ1();

//Add MaxSonarEZ1 Sensor to controller pin 4 for trigger and pin 5 for output
serializerWL.DigitalPin[4] = EZ1.TriggerPin;
serializerWL.DigitalPin[5] = EZ1.OutputPin;

//Get value from PING sensor
string strDistance = EZ1.GetValue();

Dim EZ1 As MaxSonarEZ1 = New MaxSonarEZ1()

'Add MaxSonarEZ1 Sensor to controller pin 4 for trigger and pin 5 for output
serializerWL.DigitalPin(4) = EZ1.TriggerPin
serializerWL.DigitalPin(5) = EZ1.OutputPin

'Get value from PING sensor
Dim strDistance As String = EZ1.GetValue()

See the full example See the full example

For this example two I/O pins are utilized. After defining our sensor, we assign both a trigger and an output pin to the controller. We can now begin making calls to GetValue() to retrieve our data.



Buy Kondor
Serializer WL

The Robotics Connection Serializer WL is a powerful robotics I/O controller. It has dual built-in H-bridges, ten digital I/O channels, six 10-bit analog channels, dual quadrature encoder inputs, and removable communication modules. It also has built-in support for popular sensors making it easy to work with. This device uses serial communication through one of its wireless modules or through the RS-232 module shown.

Note: All features of this controller may not be fully supported yet. Just because a feature is not listed here does not mean that it is not supported. Please refer to the release notes for more information. As with any controller if a particular feature is not implemented it can still be used with a little more effort. All controllers have a RawWrite() method that will write commands directly to the controller. You will need to read the documentation for your controller to implement a non-supported feature of that controller.

The controller must be initialized with a few values before it can be used. Below we will setup a controller in VB.NET on communications port 40 with a buad rate of 19.2k and a motor ramp rate of 500.

Dim ctlr As SerializerWL = New SerializerWL("COM40", 19200, 500)

After the controller is initialized, the port must be opened before communication can begin. This is done by making a call to OpenPort().

Note: The properties and methods for this controller are diagramed to the right. For more detailed information on these properties and methods refer to the documentation.

The most used properties would be the pin assignments. This controller has both digital i/o and analog inputs. Adding devices to these pins are as easy as setting the analog or digital pin assignment to the desired device.

ctlr.AnalogPin(2) = IR1
ctlr.DigitalPin(6) = ping

In this example we have assigned an InfraRed range sensor to analog pin 2 and a PING))) sensor to digital pin 6.

Another noteworthy property would be the Voltage property. This value holds the voltage of the controller's power source.

Motors & Servos can be controlled using the appropriate methods that the SerializerWL class provides. They can also be controlled with individual objects, similar to how sensors are used. Motors and Servos can have different properties depending on how the controller communicates with them. Therefore, the GetMotor() and GetServo() methods provide a way of retrieving a pre-initialized Motor or Servo object for use with this controller.

'Get Motor object for motor 1
Dim m1 As Motor = ctlr.GetMotor(1)

'This will cause the motor to move
m1.Value = 10



Buy Serializer WL Controller
Buy Kondor
Code Examples
SSC-32

The SSC-32 controller made by Lynxmotion is a 32-Channel serial servo controller. It has 32 Pulse Width Modulation outputs and four digital inputs. This controller allows for moving multiple servos simultaneously over different ranges of motion making it possible to create complex walking gaits. This controller is an excellent choice for robotic arms and walking robots that require many servos for operation.

Note: All features of this controller may not be fully supported yet. Just because a feature is not listed here does not mean that it is not supported. Please refer to the release notes for more information. As with any controller if a particular feature is not implemented it can still be used with a little more effort. All controllers have a RawWrite() method that will write commands directly to the controller. You will need to read the documentation for your controller to implement a non-supported feature of that controller.

To begin using the SSC-32 with Kondor, we first have to tell it how to communicate with the controller. Below we will setup to use communications port 4 with a buad rate of 115.2k.

Dim ssc32 As SSC32 = New SSC32("COM4", 115200)

Don't forget to make a call to OpenPort() before using the controller. Once a connection is made to the controller, we can start making calls to MoveServo() for single servo moves or MoveServos() for moving multiple servos at a time. As with other native controllers, we can also use GetServo() to get a pre-initialized Servo object and then get/set the values using the servo object.

'Get a Servo object on pin 0
Dim s1 As Servo = ssc32.GetServo(0)

'This will cause the servo to move
s1.Value = 1500

Retrieving the digital input values are as easy as making a call to GetInput(). This method requires two arguments. The first being the input id and the second one a boolean for realtime readings. If realtime is not chosen then false is returned if the input has been low since the last call to GetInput().

If (ssc32.GetInput(Inputs.A, False)) Then
    'Handle input value
End If



Buy SSC-32 Controller
Buy Kondor
Introduction

Kondor is a code base for robotics development that is built on .NET framework 3.5. It can easily be included in your projects and programmed in any of the .NET languages. If you do not have the Visual Studio development environment, a free version can be downloaded here.

Kondor is rich with features and designed for performance, ease of use, expandability, and streamlined development. There is no other code base on the market like Kondor. It is a continually growing project and is designed as such.

Performance:
Benchmark tests are ran to ensure specific components will perform for their intended use. These same benchmarking tools along with other diagnostic tools are included in the library.

Ease of Use:
Kondor has lots of built-in features for developing any robotic project. Many basic functions like sending a PWM signal to a servo or getting feedback from a sensor can be done in one or two lines of code. Devices are represented as objects and are assigned to controller pins. This means you no longer have to remember the pin id's for all your sensors and servos and they can now be given meaningful names.

Kondor ties needed resources for specific tasks into Systems. For example, a robot arm functions considerably different than a differential drive rover or a hexapod. Systems make these tasks much easier to work with. Algorithms are built-in; from sequencing controlled movement of multi-servo systems to image processing for web cams. These algorithms can be complex, however a working knowlege is not required when using Systems.

Tutorials and examples are available for common tasks and if you don’t find what you are looking for there, you can always check our forums at sector5labs.com/forum.

Expandability:
Kondor has growing support for popular robotic devices on the market, but we can’t code for everything. If you think a particular device that is not supported would make a great addition to Kondor, then you may fill out the Request New Device form. Selected devices will be based on popularity. We will not leave it at that however; this library is built around inheritance and the implementation of interfaces making it possible to build classes for non-native devices that blend right into the Kondor environment. Controllers, sensors, and motors are just a few of the things that can be created using Kondor. You are only limited by your imagination with this powerful library.

Streamlined Development:
Many commonly needed features for robotic development are included in this library leaving you to focus your efforts towards the real objectives. Built-in support for popular controllers and sensors along with mathematical algorithms and unified systems can save you valuable time.



Buy Kondor
Features

-Vision – Support for interfacing with web cams along with manipulation and statistical analysis of the camera's images.

-Voice recognition and Speech – Implementing Microsoft’s speech engine to provide easy to use support for text-to-speech (tts) and voice recognition with only a few lines of code.

-Native Devices – A growing support for popular I/O controllers and sensors on the market.

-Ease of Use – Most basic things can be achieved with only a few lines of code. Examples, tutorials and user forums are also available to help.

-Built on .NET – Microsoft .NET framework and development tools streamline production and are one of the most robust and easiest platforms to learn. You choose the language you are comfortable with (VB, C#, C++). Express versions are available free of charge.

-Systems – Systems ease the development process by bringing needed resources together for specific tasks. Also aids in code management and readability.

-Mathematic algorithms – Algorithms such as walking gaits and inverse kinematics for robot arms included. A working knowledge of these algorithms is not required when using Systems to perform the task.

-Information retrieval from the web – Retrieve and use information from the web with only a few lines of code such as RSS feeds, Google, and Wikipedia.

-Power Saving – Allows shutting down supported devices to save battery power for autonomous applications.



Buy Kondor
Servo

The Servo class allows easy management and control over hobby servos. By assigning each physical servo to a Servo object in code, we can give each one a meaningful name and no longer have to remember the pin ids. The way a servo is handled is dependant on the controller which it is connected. Native controllers provide a GetServo() method for creating a pre-initialized Servo object to be used with that controller. A servo can now be moved by setting either the Value or Position properties. The Value property is the standard PWM value ranging from 1000-2000 while the Position property is the value in degrees from -90 to 90. The previous position is also stored each time one of these values is set. We can then call GoBack() to return the servo to the previous position.

'Center servo with pwm
servo.Value = 1500

'Move servo 45 degress
servo.Position = 45

'Go back to center
servo.GoBack()



Buy Kondor
Motor

Motor is a base class for all types of motors. The way a motor is controlled is determined by its controller; therefore native controllers supply a GetMotor() method that returns a pre-initialized Motor object. With this object you can set its Value property to make the motor move or in some cases stop, which the Stop() command is otherwise called. The previous value is always stored so after a Stop() command we can then issue a Go() command to tell the motor to continue on with the last speed value. The RampRate property controls the speed at which the motor ramps up to speed or down to a stop for controllers that support this feature. Motors can also be joined in such a way that two motors with seperate ids can be tied together for simultaneous movement such as for differential-drive systems. Another benefit of this object oriented approach is that we can now give our motors meaningful names instead of hard to remember ids.

Joined Motor Pair Example:

'Join right motor to left motor, works vice versa too
leftMotor.Join(rightMotor)

'This will move both motors
leftMotor.JoinedPair.Value = 100

'This also works
rightMotor.JoinedPair.Value = 100

'we can still move the motors individually as before
leftMotor.Value = -100

'We can even get a reference to the joined pair
Dim differentialDrive As JoinedMotorPair
differentialDrive = leftMotor.JoinedPair

differentialDrive.Value = -100




Buy Kondor
Devices

Devices are anything that can be attached to an I/O pin. Sensors and servos are a couple examples of devices. Aside from Kondor's native devices, the IDevice interface allows us to create our own devices to be used with the Kondor library. In order to add an object to a controller's IOCollection the object must be a device, i.e., it must implement the IDevice interface. For details about native devices, navigate to the Supported Devices section. For more information on creating your own devices refer to the documentation.

Diagnostics

Kondor has several tools built in for diagnostics. There are benchmarks for testing your code's performance. This is useful for tracking down slow code for optimization. There are debugging and error handling tools as well as the Recorder. The Recorder allows you to record certain things in realtime so that you can replay them later at a slower rate. That way you can see what is really going on in there. Kondor's diagnostic tools are still in their early development. More detail on these tools to come.

Request New Device
FORM KP-102

Use this form to request a new device to be added to Kondor. We will determin which devices will be added based on price and number of requests. Please fill out the form if you would like to request a new device. One request per device per person, please.

Name:
eMail:
Have you purchased Kondor?        Yes         No
Device Name:
Device Website:
Comments:
General Suggestions
FORM KP-101

We want to hear what you think about Kondor. Use this form to submit your comments and suggestions to us. Your feedback will help us make Kondor a better product.

Name:
eMail:
Have you purchased Kondor?        Yes         No
Suggestions:
Camera

The Camera class allows you to easily interface with a web cam. Once the camera is running we can access our image data from the Frame property. This property returns a Frame object which makes handling and using images easier. Kondor's ImageProcessor can then run filters and statistical methods against this image for uses such as object detection/avoidance. For more information regarding image filters and ImageProcessor refer to the documentation.

C# Example:

Camera cam = new Camera();

//Start camera 0 (default)
cam.Start(0);

//Grab current frame from camera
Frame camFrame = cam.Frame;

//Stop the camera when we are done.
cam.Stop();

VB.NET Example:

Dim cam As Camera = New Camera()

'Start camera 0 (default)
cam.Start(0)

'Grab current frame from camera
Dim camFrame As Frame = cam.Frame

'Stop the camera when we are done.
cam.Stop()

Buy Kondor
Release Notification

Enter your email below if you wish to be notified of the next release. We will not give out this information or send you promotional emails by submiting this form. The information will be submitted to Sector 5 Labs.

eMail:
Version History