Did you notice the number "038-1" written in the sand?
Do you see anywhere you can use that number?
Have you walked onto the castle yet?
The controls there seem to be looking for a similar number.
Use the arrows to enter "038" and "1" on the two displays.
Then press the button.