Go to Post So let me get this straight. We'll have 6 hours to re-build an entirely new robot that took us 6 weeks originally to make. - [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-01-2014, 11:25
bhylak bhylak is offline
Ben
FRC #0365 (MOE (Miracles Of Engineering))
Team Role: Programmer
 
Join Date: Mar 2013
Rookie Year: 2011
Location: Wilmington, Delaware
Posts: 5
bhylak is an unknown quantity at this point
Analog Maxbotix XL-EZ4

I was wondering if I could get any help programming a Maxbotix XL-EZ4. (in C++) I did read through the API, and the spec sheets for the sensor but I'm still a little confused. So I know that the XL is approximately 4.9mv per inch. On the arduino which I tested the sensor, I could simply get the value of the sensor (1-1024) and that would be the cms.

This is a quote from the spec sheet:

Analog output of distance reading: (Vcc/1024) / cm (4.9 mV/cm when input voltage Vcc = 5 V)

The analog on the CRIO however is scaled to 10v instead of the 5v from the arduino, although the output from the analog sidecar is 5. I also don't understand whether I should use the GetVoltage or GetValue, and I also don't understand how I scale it. (And an explanation of how you came up with the numbers would be appreciated as I attempt to understand)

Sorry if this is a stupid question- it's my first time using an analog sensor with the CRIO.

Ben
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi