Go to Post *POP!* I suppose I'll have to change my hair style to the John V-Neun now. - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 28-01-2017, 20:41
Auxiliatrix Auxiliatrix is offline
Registered User
FRC #0604
 
Join Date: Jan 2017
Location: San Jose, California
Posts: 2
Auxiliatrix is an unknown quantity at this point
More Analog Inputs

Hi, so our team has decided to use your typical MaxBotics analog rangefinders (ultrasonic sensors), plugged into the code as general analog inputs. Now, this part works just fine, but there is one major issue: whenever the robot is supplying power to the motors, the sensor malfunctions.

The robot drive is constructed on ports 0-3, but those are outputs to the motor. On the rio itself, none of the analog input ports are in use (except for the ultrasonic sensor on port 0). For whatever reason, when power is outputted to the motor on ouput 0, our sensor on input 0 starts acting up (it reads a consistent value no matter what power the motor is on).

There are two parts to my inquiry.

Firstly, when we plug in encoders (essentially analog sensors) into the analog inputs, they don't have any issues with reading incorrectly when the motors are running. This only happens with the ultrasonic sensor. Frankly, we have no idea why. If anyone can offer any insight/fixes, please let us know; I've been working on this for days.

Secondly, if it is impossible to prevent the ports getting some weird form of interference from the drive, how can I get the rio to read from a different port? I understand that there are references; I don't understand what they're saying, and a lot of them have conflicting instructions.

In terms of that latter one, I'd like to know if you use a breakout board, how do ports work? Do I just put in port 5 in the code? Or do I have to specify in the constructor that it's reading from port 5 on the breakout board? I've seen that you can read analog sensors from a Talon SRX, then get that signal to a CAN bus, then get the CAN bus to go to the rio. In this case, do i instantiate an analog input, or a CAN object? If it is the former, what do I put for the port, since port 0 on a CAN bus would be different from port 0 on the analog ports? If it is the latter, then how do I get the analog value from it? Please send any help that you can.

Thank you.
Reply With Quote
 


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 04:05.

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