**2. Description of the methodology**

The methodology proposes a programming algorithm, which allows implementing a fuzzy controller on different hardware and software platforms, which have different technical characteristics. In this case, MATLAB™ and the Arduino UNO, Arduino DUE, and Nexys 4™ boards are used to show the correct operation of the proposed methodology. The Arduino UNO board uses the ATmega328P microcontroller, which has a 32 KB Flash memory, a 2 KB SRAM memory, and a 1 KB EEPROM memory. In addition, this board has a 16 MHz clock speed, 14 digital input or output pins, 6 analog inputs with a 10-bit resolution, and 8 PWM outputs, and its programming language is based on the C/C++ language. The Arduino DUE board uses the SAM3X8E microcontroller, which has a 512 KB Flash memory and a 96 KB SRAM memory. In addition, this board has a clock speed of 84 MHz, 54 digital input or output pins, 12 analog inputs with a 12-bit resolution, 2 digital-analog converters, and 12 PWM outputs, and its language of programming is based on the C/C++ language [14, 15]. The Nexys 4™ board model XC7A100T-1CSG324C contains two external memories, a 128Mbit cellular RAM and a 128Mbit non-volatile serial Flash device. In addition, this board has a clock speed of 100 MHz, USB ports, an Ethernet port, a micro-SD port, a micro-USB port, a VGA port, accelerometer, temperature sensor, digital microphone, speaker

*Methodology for the Implementation of a Fuzzy Controller on Arduino, MATLAB™… DOI: http://dx.doi.org/10.5772/intechopen.109760*

**Figure 1.** *Board of (a) Arduino UNO, (b) Arduino DUE, and (c) Nexys 4™.*

amplifier, 16 user switches, 16 user LEDs, two 4-digit 7-segment displays, two threecolor LEDs and its programming language is VHDL [16, 17]. Additionally, the ISE Project Navigator 14.7 software was used to program the Nexys 4™ board, and the Arduino IDE (Integrated Development Environment) was used to program the Arduino boards. **Figure 1** shows the Arduino UNO, Arduino DUE, and Nexys 4™ boards. On the other hand, the fuzzy controller implementation is done in the MATLAB™ Script, which is a program file that allows building a programming algorithm and provides tools for displaying graphics in two and three dimensions. Additionally, the MATLAB™ Script is used for the analysis, design, and simulation of the different stages of the controller. Also, the fuzzy controller is implemented in Fuzzy Logic Toolbox™, which is a MATLAB™ tool used to design, analyze, and simulate a fuzzy controller. Therefore, the Fuzzy Logic Toolbox™ is used to analyze the results obtained from the implementation of the controller on the different platforms [18, 19]. Finally, this boards can be used to control a process, and the selection of the board will depend on the characteristics of the process, for example, the number of variables, sensors or actuators, the cost of the board, the cost of the system, among other things.
