Thanks
The team members of FRC Team 2220 would like to give a big thanks to all of the Sponsors, Mentors and Parents that make having this team possible.
Thank you!
Team Login
| Sensors.cpp |
|
|
|
| Written by TarinB |
| Saturday, February 13 2010 16:48 |
|
#include "Sensors.h"
Sensors::Sensors(void) { leftSonic = new Ultrasonic(2,3); rightSonic = new Ultrasonic(4,5); leftInches = 1000; rightInches = 1000; };
void Sensors::StartSensors(void) { leftSonic->SetAutomaticMode(true); rightSonic->SetAutomaticMode(true); // printf("Starting Sensors\n"); };
void Sensors::GetSensors(void) { leftInches = leftSonic->GetRangeInches(); rightInches = rightSonic->GetRangeInches();
printf("left inches = %f, right inches = %f\n", leftInches, rightInches); }; |










