ftctechnh / ftc_app

FTC Android Studio project to create FTC Robot Controller app.
761 stars 3.17k forks source link

Missing documentation of analog input configuration on RC app? #522

Closed tjhawkey closed 6 years ago

tjhawkey commented 6 years ago

Hmm, there doesn't seem to be any. Why is the MR touch sensor listed as a valid selection for an analog input?

calebsander commented 6 years ago

Not sure what you mean by "documentation of analog input configuration." FIRST only has documentation for the Android Studio/OnBot Java SDK. There are some tutorials but no real documentation for how to use the RC app. The Modern Robotics touch sensor is a digital sensor, so you can read it through an analog port by checking whether its voltage is above or below half the reference voltage. In general, you can either configure the port as a generic analog input, which will just give you voltages, or as an SDK sensor type (like the MR touch sensor) that will interpret those voltages in a specific way.

tjhawkey commented 6 years ago

HI Caleb, it turns out that the issue with the accelerometer is that it has a fair bit of output series resistance (for an RC filter) and the revhub has an input voltage divider that's pretty low resistance, so together the signal is divided by a factor of 7 or so when it's plugged into the revhub. I'm not confident the signals are big enough for good control, but I don't know if it's been tried yet.

Tim

On Sat, Feb 17, 2018 at 9:59 PM, Caleb Sander notifications@github.com wrote:

Not sure what you mean by "documentation of analog input configuration." FIRST only has documentation for the Android Studio/OnBot Java SDK. There are some tutorials but no real documentation for how to use the RC app. The Modern Robotics touch sensor is a digital sensor, so you can read it through an analog port by checking whether its voltage is above or below half the reference voltage. In general, you can either configure the port as a generic analog input, which will just give you voltages, or as an SDK sensor type (like the MR touch sensor) that will interpret those voltages in a specific way.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://mailtrack.io/trace/link/a6097c5085d6e2470649f78317e01d19a3973497?url=https%3A%2F%2Fgithub.com%2Fftctechnh%2Fftc_app%2Fissues%2F522%23issuecomment-366488762&userId=1910608&signature=fb42e79c70bdc685, or mute the thread https://mailtrack.io/trace/link/3026b3945351c8e30a3a5311cf5c4a1c5cac82a8?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARvWQvRjNyj1RDVID6QtEQMvRujIGCyGks5tV5IagaJpZM4SJi5k&userId=1910608&signature=89b20b2de8c39c39 .

tjhawkey commented 6 years ago

Rev confirms use of MR touch sensor with analog input as a workaround.