We could have a mistake in DualMode_Starter


#1

I think the line “randomSeed(analogRead(A4));” inside function “void ultrCarProcess()” may not be there, because it initializes again the seed of ramdom numbers everytime the functions is called and the robot turns always right (in my case).
I’m using the last version of examples:

  • File Name : DualMode_Starter.ino
  • Author : Jasen
  • Updated : Xiaoyu
  • Version : V1.0.0
  • Date : 3/3/2014

Thank you, makeblock is awesome.


#2

You’re right. The initialization of seed shouldn’t be called in loop. When the pin A4 is connected to some stable voltage, it may cause the error in your description. Try to call the “ramdomSeed” function in “setup” instead of “ultrCarProcess”, and see how it would work.
Thank you for the correction. We’ll fix it soon.


#3