Could I please download the EV3 program?

Thanks ]]>

It was a bit of trial and error. I even tried formulas with x³ because I thought this would make the movement smoother but in the end for me a simple linear formula had the best results.

One has a positve slope – the other has the same slope but negative.

Calculate formula 1 for a given slope (the value for the steepness and maximum speed you want and that defines how sensitive the robot regarding to light-sensor readings – **this is the trial and error part**):

slope * “sensor reading” + y-intercept = “maximum speed”

I tried a slope of 0,8 and maximum speed of 15 when the sensor reads 50.

**0,8 * 50** + y-intercept = 15

40 + y-intercept = 15 **| -40**

**40-40** + y-intercept = **15-40**

y-intercept = -25

So one formula is **speed = 0,8 * “sensor reading” – 25**

**-0,8 * 50** + y-intercept = 15

-40 + y-intercept = 15 **| +40**

**-40+40** + y-intercept = **15+40**

y-intercept = 55

So the second formula is **speed = -0,8 * “sensor reading” + 55** (the 30-“result of formula 1” I used is just a “short cut” for the same calculation)

If you want to try out alternative formulas (or different formulas for sub-ranges) maybe it´s a good idea to have a table in MS Excel / LibreOffice Calc and visualize the output for all sensor readings.

That way it´s easier to understand how the robot will react once it´s off the line and if you stay within valid values without having to do more calculations. I wanted to have a linear formula where the outer wheel moves faster forward than the inner wheel in order to have a tight turn.

Another observation I made is that you need to adjust your formula to the layout of your track. If you do not have 90° turns or interrupted tracks you can go much faster.

More info on linear functions:

https://www.mathplanet.com/education/pre-algebra/graphing-and-functions/the-slope-of-a-linear-function

https://www.mathplanet.com/education/pre-algebra/graphing-and-functions/linear-equations-in-the-coordinate-plane

Your solution didn’t work.

What worked for me is just to change the com port in the arduino IDE. ]]>

I think GPIO 0, 2, 15 should not be used for anything else than setting the run mode.

GPIO 12, 13, 14 are safe to use. I haven´t tried to use the serial pins for anything else yet..

I thought the ESP09 was a nice toy since it´s so tiny but in most cases I think it is easier to use an ESP03, ESP07, ESP11, ESP12 or ESP13 module in my projects since I do not have to take care of the correct antenna length / layout.

Another downside of the ESP09 is that you can´t use deep sleep since you do not have access to GPIO16!

]]>