Hello Everybody
I want to design a Fuzzy logic controller to control two DC motors of Rover robot , actually I made a simulation for the controller in matlab/simulink and it worked successfully , now I want to design that controller in real world by using Arduino Uno board , actually I converted the MATLAB Fuzzy Inference System FIS to Arduino C by Converter in the "www.makeproto.com" website .
Now for example if one of rules base of fuzzy controller is
if (HeadingAngle is Zero) and (Front_Sonser is Near) and (Right_Sonser is Near) and (Left_Sonser is Far) then (Wr is Turn_Small_Negative) and (Wl is Turn_Small_Positive)
Wr=angular velocity of right wheel (Right motor)
Wl=angular velocity of left wheel (left motor)
the membership functions of Wr and Wl in the simulation range from (-100 to 100)
Now if we supposed that the value of "Turn_Small_Negative" in the rule above is -20 and "Turn_Small_Positive" is 30 .
How Could I make the two motors to spin in the given values from fuzzy controller ?
Are the two outputs (Wr,Wl) of fuzzy control connected to driver board 298 and then directly from driver board outputs to DC motors of robot ?
Actually , While I am looking for the concerning websites I found out some terms related with such problem but I didn't completely understand that
terms like :
"Need to PWM the mapped 0-255 value to the 298's EN pin with an analogWrite."
"Need to set the pair of outputs to hi/lo or lo/hi ".