|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#9
|
||||
|
||||
|
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;
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|