With the physical switch on the board set to the “off” position, you should be able to control the output by applying a simple high or low signal to the “ON” pin.
As for the code, you just need to drive the pin high and low, so you can use the basic Arduino “Blink” example (and either change the pin number to the GPIO pin you chose or use the GPIO pin that’s attached to the built-in LED based on your Arduino board).
If you still can’t get it to work, could you post some pictures of your setup that show all of your connections as well as a copy of the code you are using?