Codes for Snake robot