The code is posted above and connections are clearly seen from there and described

took brand new all parts, will try on breadboard later