A low-cost Digital Signal Processor (DSP) unit for advanced Scanning Probe Microscopy measurements is presented. It is based on Red Pitaya board and custom built electronic boards with additional high bit depth AD and DA converters. By providing all the necessary information (position and time) with each data point collected it can be used for any scan path, using either existing libraries for scan path generation or creating adaptive scan paths using Lua scripting interface. The DSP is also capable of performing statistical calculations, that can be used for decision making during scan or for the scan path optimisation on the DSP level.