Solenoid code help

New to all of this arduino/raspberry pi stuff, so be gentle. I have a Pi and like to use it to lock/unlock a solenoid based lock (https://www.circuito.io/app?components=9443,200000,842876). but i don’t think that the code that is provided in code will get me there. any help will be appreciated.

:thinking::thinking::thinking:also if i want to plug an ESP8266-01 to the BreadBoard so that the communication can be done wireless, is this even possible? :thinking::thinking::thinking: