home › Forums › # Technical Support › Convert fuzzylite with Arduino FIST: MATLAB Fuzzy Inference System to Arduino C › Reply To: Convert fuzzylite with Arduino FIST: MATLAB Fuzzy Inference System to Arduino C
Got the Karthik Nadig’s online converter to work by making the following edits. Here is an example of code edits made to the SimpleDimmer.fis file.
[System]
Name=’simple-dimmer’
Type=’mamdani’
NumInputs=1
NumOutputs=1
NumRules=3
AndMethod=’prod’
OrMethod=’add’
ImpMethod=’min’
AggMethod=’max’
DefuzzMethod=’centroid’
[Input1]
Name=’Ambient’
Range=[0.000 1.000]
NumMFs=3
MF1=’DARK’:’trimf’,[0.000 0.250 0.500]
MF2=’MEDIUM’:’trimf’,[0.250 0.500 0.750]
MF3=’BRIGHT’:’trimf’,[0.500 0.750 1.000]
[Output1]
Name=’Power’
Range=[0.000 1.000]
NumMFs=3
MF1=’LOW’:’trimf’,[0.000 0.250 0.500]
MF2=’MEDIUM’:’trimf’,[0.250 0.500 0.750]
MF3=’HIGH’:’trimf’,[0.500 0.750 1.000]
[Rules]
1.000 , 3.000 (1.000) : 1
2.000 , 2.000 (1.000) : 1
3.000 , 1.000 (1.000) : 1
Comparing this to the qtfuzzylite SimpleDimmer.fis code notice all instances of
Enabled=1
Default=nan
LockValid=0
LockRange=0
was removed and these changes made:
AndMethod=’prod’
OrMethod=’add’
This VERIFIED in Arduino’s IDE with no error. Sweet!