Recently, photothermal stimulation has emerged as a technology that can regulate neuronal activity at high space-time resolution without the need for genetic modification. The focus is on finding ways to safely control neuronal activity to specific values using photothermal stimulation mediated with gold nanorods (GNRs). To achieve this, we created a real-time feedback system that reads the spike-rate of neurons in real time and automatically adjusts the power of the laser, on the three steps. First, we defined the limit of the laser power for the system to avoid thermal damage to neurons. Second, to implement a real-time closed loop system with a microcontroller and verify its operation, a system for controlling temperature by irradiating NIR light on a surface coated with gold nanoparticles was created. Third, we built a feedback system that reads the number of neuronal spikes in real time and automatically adjusts the light intensity accordingly. The system was applied to live neurons to control the target spike rate for 5 minutes and showed an RMS error of less than 0.5 Hz in all experiments. This technique could be applied to brain therapy, to neuroscience, or to brain-computer interfaces.