This paper presents the implementation of a Compensatory Adaptive Neuro-Fuzzy Inference System (CANFIS) controller to control an inverted pendulum. This controller is developed in order to readjust the parameters relating to the membership functions and the fuzzy rules used as well as to optimize the dynamics of the latter, using a learning algorithm based on the extended Kalman filter. The CANFIS controller is developed on the Simulink environment of the MATLAB software and is implemented on a Raspberry Pi 3 board, with a view to analyzing its real behavior, and testing its speed as well as its robustness through the use of the “Processor-In-the-Loop” (PIL) technique. The results obtained through PIL tests showed the effectiveness of the neuro-fuzzy controller equipped with a compensator.