trueSpeed was made in sack attack using speed motors. Now we have turbo motors, and it has been a while since then, so why not make a new trueSpeed for turbos?
This thread (made by @LegoMindstormsmaniac) is pretty much exactly how I found these values, just tailored to my robot using turbos.
Brief summary of steps
I first tested every value (0-127) and calculated the RPM for each value. I did this 8 times, 4 times per chassis side. 2 of those were 0-127, and the other 2 were 127-0. I was monitoring the battery voltage the entire time to make sure it didn’t get to low.
After I had my 8 tests completed, I averaged all of the data. It was all very consistent, and thats good because it makes it easier to fix.
That is the end result of the averaged data. We want it to be linear, so we will be remapping the values to get it to be as close to linear as possible.
The RPM I got with 127 power was around 280. I found that I needed 45 RPM (15 power) to go from a full stop to slowly moving. Knowing that, I can calculate what RPM I should be seeing with every motor value.
((280-45)/(127-15))*i
That is the ideal graph I should be seeing
I went through each ideal value, and found a motor value to get me that RPM (or very close to it). In the end, that gave me very good results.
Yes, it could be more accurate, but the way it is works perfectly for my needs
The Code
Turbo: Click Me
(High Speed array was made by @LegoMindstormsmaniac and I modified the function a little)
High Speed: Click Me
Some example code using trueSpeed: Tank Drive (turbo)
If you have any questions, feel free to PM me or ask below!