View Single Post
  #1   Spotlight this post!  
Unread 29-01-2014, 20:11
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Ultrasonic analog input?

We have ultrasonic analog input, wired based on a youtube video.

I however don't understand the parameters of Ultrasonic namehere=new Ultrasonic(a, b);

a is input, what does that mean?
b is output, what does that mean?

I tried 8, 7 and tried with the ultrasound in both analog 8 and analog 7, with the following code:

Code:
if(namehere.getRangeMM<10)
{
drive.tankDrive(1, 1);
}
I know drive.tankDrive(1, 1); works fine, as that works based on joysticks. What am I doing wrong?

Also are their good java tutorials for cameras/encoders/solenoid magnetic sensor thingies anyone know them? (By "good" I mean that it explains the api and the parameters. for example: this parameter means you have to wire the output to <analog/DIO/pwm/other> and it will reference that slot.)
__________________
Spoiler for gif:
Reply With Quote