604672
Nov 14, 2017

IME problems

3 comments

Edited: Nov 14, 2017

Hey guys! It's Abby from 8931B. So my team is trying to code IME on our base for the first time and we're having problems. We one on each side of the base. One side of the base is reading positive and the other side is reading negative. The motor with the negative value is connected to a Y cable so we can't reverse the motor in the the motor sensor setup. Can anybody help?

Aiden
Nov 14, 2017

This is an unavoidable scenario, where you can't reverse the motor, so to make the Integrated Motor Encoder (IME) read a positive value, you will need to place an absolute value bracket in your conditional statement that looks for that specific IME value. This will make the value positive even if the IME reads a negative value. The conditional statement will look something like this:

while(abs(SensorValue[leftIME]) < 1800)
604672
Nov 14, 2017

Thanks Aiden!

Aiden
Nov 14, 2017

You are more than welcome. Did that work?

Visitors since August, 2019

Last Updated: October 22, 2019

© 2019 By 8931Z