|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, April 03, 2008 8:22 PM
Posts: 15,
Visits: 24
|
|
| For whatever it is worth, here are a couple things I'd like to see in a future Serializer.NET (and Robotics Studio) release: 1. A class for the Sharp GP2Y0A02YK infrared sensor (8-60"). 2. A class for the Devontech MD23 (I2C H-Bridge).
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Thursday, September 02, 2010 10:00 PM
Posts: 629,
Visits: 805
|
|
- I see no reason why we couldn't add that! We really should add support for all of the Sharp IR sensors. I'm working on adding support for the new Sharp GP2Y0A700K0F right now.
- I don't know if you've seen it, but we have the generic I2C commands built into the Serializer firmware and an I2CDevice object to use it in the .NET Lib. We did this so that customers could use their I2C device with the Serializer, without having to wait on us to release a new library or firmware to support that sensor. So, you can take advantage of the I2CDevice object in the .NET lib to talk to the Devantech MD23.
If you need some help figuring out the sequence of bytes, we can help out their too.
There's some useful user documentation for the I2CDevice object on the Serializer .NET Lib User Documentation page. It's located under the Senors->I2CDevice namespace (on the "Example Source Code" Topic page). Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Friday, July 16, 2010 10:16 AM
Posts: 2,
Visits: 22
|
|
| Would like to see a stepper motor control.
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Thursday, September 02, 2010 10:00 PM
Posts: 629,
Visits: 805
|
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Saturday, August 21, 2010 5:50 PM
Posts: 5,
Visits: 27
|
|
| I'd really like to get the source for the .Net library like you've provided for the C++ library. I would like to be able to add support for the digo command that is supported in the firmware, for example. Without the source, I end up having to write my own entire library to support this command since I can't share the serial port between two libraries. Any chance you could publish the source?
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Thursday, September 02, 2010 10:00 PM
Posts: 629,
Visits: 805
|
|
I'm going to open source the Serializer .NET API soon. I think that will make the .NET Lib not only better, but will make the Serializer an even better product.  I'm planning to open source it a few weeks after the new boards arrive. Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Saturday, August 21, 2010 5:50 PM
Posts: 5,
Visits: 27
|
|
| Any news on the availability of the .Net Serializer library source? I could really use the source for debugging purposes...
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Monday, April 05, 2010 5:16 PM
Posts: 2,
Visits: 4
|
|
| Jason, I'm having trouble finding the serializer .net api source code. Can you point me at it?
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Tuesday, April 27, 2010 4:31 PM
Posts: 4,
Visits: 18
|
|
Hey Jason,
Any further progress on the for the support on the Sharp GP2Y0A02YK infrared sensor (8-60").
--
Kyle Mckay
Technological Education - Computer Technology.
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Thursday, September 02, 2010 10:00 PM
Posts: 629,
Visits: 805
|
|
| Nope, I haven't added it yet, but there's not reason that you can't implment it yourself. If you look at the GP2D120 and GP2D12 .NET classes, you'll see that they derive from AnalogSenosr, and IDistanceSensor classes. You can write a new GP2Y0A02YK class, which implements those interfaces, and converts the analog value to a distance. Here's the internals of the GP2D12 class so you can see exactly how to modify it to work with the GP2Y0A02YK. You will obviously have to do some different math to obtain the correct distances. This will require you to calibrate the sensor, which means measuring the analog voltage for the entire distance range, recording those, and creating either a lookup table, or equation (preferred) to do the conversion of the voltage to distance. As you can see, implemening the class is easy...the time is taken to create an equation or lookup table to describe the distances the sensor sees.  using RoboticsConnection.Serializer.Components;using RoboticsConnection.Serializer.Ids;using RoboticsConnection.Serializer;using System;using System.ComponentModel;namespace RoboticsConnection.Serializer.Sensors{ /// <summary>/// Represents a Sharp GP2D12 Infrared Sensor./// </summary>/// <include file='Docs\remarks.xml' path='/remarks/remarks[@name="GP2D12"]'/>[ DefaultEvent("DistanceChanged")][ DefaultProperty("DistanceChangedThreshold")]public class GP2D12 : AnalogSensor, IDistanceSensor{ #region Public Constants/// <summary>/// The default value for the <c>DistanceChangedThreshold</c> property./// </summary>public const float DistanceChangedThresholdDefault = 1;#endregion #region Ctors/// <summary>/// Initializes a new instance of the <c>Serializer</c> class./// </summary>public GP2D12(){ } /// <summary>/// Initializes a new instance of the <c>Serializer</c> class, attaching/// it to the specified serializer instance./// </summary>public GP2D12(Serializer serializer){ this.Serializer = serializer;} #endregion #region Public Properties/// <summary>/// The distance, in inches, reported by the Sharp GP2D12 sensor./// </summary>[ Browsable(false)]public double Distance{ get { return distance; }} /// <summary>/// Specifies the amount that <c>Distance</c> must change before <c>DistanceChangedThreshold</c> is signalled./// </summary>[ DefaultValue(DistanceChangedThresholdDefault)][ Description("Specifies the amount that Distance must change before DistanceChanged is signalled.")]public double DistanceChangedThreshold{ get { return distanceThreshold; } set { distanceThreshold = value; }} #endregion #region Public Events/// <summary>/// Occurs when <c>Distance</c> has changed by an amount greater than <c>DistanceChangedThreshold</c>./// </summary>[ Description("Occurs when Distance has changed by an amount greater than DistanceChangedThreshold.")]public event SerializerComponentEventHandler DistanceChanged;#endregion #region Protected Methods/// <summary>/// Overriden to interpret the analog value and set <c>Distance</c>/// accordingly. Signals <c>DistanceChanged</c>, if necessary./// </summary>/// <param name="a2d"></param>protected override void OnSetValue(int a2d){ if (a2d < 4) { a2d = 4; } base.OnSetValue(a2d); // convert the value to a distance: distance = (6787 / (a2d - 3)) - 4; distance = (distance < 80) ? distance : 80; distance = (distance > 10) ? distance : 10; if (Serializer.Units == Ids.Units.English) { distance = distance / 2.54; // convert to inches; } // else no-op - already in cm, and the raw reading can // be obtained from the AnalogSensor base class Value property // if distance change exceeds threshold, then fire event if (Math.Abs(distance - lastDistance) > distanceThreshold) { lastDistance = distance; Serializer.SignalEvent(DistanceChanged, this); } } #endregion #region Privatesprivate double distance = 0;private double lastDistance = 0;private double distanceThreshold = DistanceChangedThresholdDefault;#endregion } }
Best Regards! Jason
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|