Go to Post What I am expecting is the unexpected (what that is I don't know). - mdiradoorian [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-01-2015, 16:59
Merfoo's Avatar
Merfoo Merfoo is offline
Registered User
FRC #0955 (CV Robotics)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: America
Posts: 48
Merfoo is an unknown quantity at this point
Question Program LIDAR for PWM Java

We are trying to use the LIDAR sensor via PWM. How would we program this using Java? Right now we are trying to time the pulse length of the DigitalInput (would be PulseIn in Arduino), how would we accomplish this?
Reply With Quote
  #2   Spotlight this post!  
Unread 19-01-2015, 17:10
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Program LIDAR for PWM Java

Can you link to a datasheet for the sensor?
__________________
Any post that I make expresses only my opinions. I do not represent the opinions of my team or of any entity affiliated with my team.

As a Mentor:
2016 - Engineering Inspiration at Greater Pittsburgh Regional

As a Driver:
2014 - Winner of Greater Pittsburgh Regional
Reply With Quote
  #3   Spotlight this post!  
Unread 19-01-2015, 17:17
Merfoo's Avatar
Merfoo Merfoo is offline
Registered User
FRC #0955 (CV Robotics)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: America
Posts: 48
Merfoo is an unknown quantity at this point
Re: Program LIDAR for PWM Java

Quote:
Originally Posted by eddie12390 View Post
Can you link to a datasheet for the sensor?
http://pulsedlight3d.net/assets.pl3d...ing-Manual.pdf

less in depth:
http://pulsedlight3d.net/assets.pl3d...Data-Sheet.pdf
Reply With Quote
  #4   Spotlight this post!  
Unread 20-01-2015, 12:34
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Program LIDAR for PWM Java

Just so you know, there's an example code written by a ChiefDelphi user in Java (although it uses I2C).

https://gist.github.com/tech2077/c4ba2d344bdfcddd48d2

I wasn't able to find the equivalent function to pulseIn.
__________________
Any post that I make expresses only my opinions. I do not represent the opinions of my team or of any entity affiliated with my team.

As a Mentor:
2016 - Engineering Inspiration at Greater Pittsburgh Regional

As a Driver:
2014 - Winner of Greater Pittsburgh Regional

Last edited by eddie12390 : 20-01-2015 at 13:00.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2015, 11:53
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,581
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Program LIDAR for PWM Java

Quote:
Originally Posted by Merfoo View Post
We are trying to use the LIDAR sensor via PWM. How would we program this using Java? Right now we are trying to time the pulse length of the DigitalInput (would be PulseIn in Arduino), how would we accomplish this?
The Semi-Period mode of the counter class should do this. http://wpilib.screenstepslive.com/s/...ulses-and-more
Reply With Quote
Reply


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 23:59.

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