View Single Post
  #9   Spotlight this post!  
Unread 14-01-2013, 11:36
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Re: Programming ultrasonic rangefinders

Thanks! How would I call the functions from the main robot cpp file? Is it just
Code:
void GetDistance()
{
AnalogChannel *range;
range = new AnalogChannel(1,1);
float volt;
volt = range->GetVoltage();
float inches;                      //float meters;
inches = volt * 100;               //meters = volt * ???;
return inches;
}
?
Reply With Quote