MPG with Arduino Bluetooth

The right approach:
you rotate the potentiometer on the transmitter, the data is transmitted to the receiver connected to the CNC, the receiver, based on this data, generates the required frequency and sends it to the CNC.