i done it step by step from the learn page this is the text i followed
It’s probably easiest to start with a NOOBS install for your Pi Zero W. Make sure you are connected to the internet so you can download the code you need. Open a Terminal window (the black and blue icon on the top toolbar) and type:
curl https://get.pimoroni.com/explorerhat | bash
And answer Y (yes) to any prompts. When it’s finished it will print All done. Enjoy your Explorer HAT/pHAT! on the screen and you are ready for the next step. If it didn’t work, and said 404 not found, it might be that you’ve typed explorerphat, not explorerhat. The pHAT may be the smaller version, but it uses the same code as the big version.
Next, you need to install the Python inputs library so the robot can recognise your inputs. Still in the Terminal window, you need to type:
sudo pip install inputs
This might sit and look blank for a minute or so, but it’s doing something, honest! When it gives you your green and blue prompt again, there is one more thing. You’ve installed the Explorer pHAT, you’ve got the inputs library, so now you need to use both of these things together to drive all of your motors:
wget https://raw.githubusercontent.com/Coretec-Robotics/Tiny_4wd/master/TinyPirate.py
So now we have software to do everything with most controllers.
Running the robot
While the Pi is still connected to your keyboard and screen, you can test if the robot works. You need to plug the dongle that came with your Bluetooth gamepad into the Pi Zero W, and make sure the gamepad is switched on.
In the Terminal type:
python TinyPirate.py
Now, hold the robot off the table and push the joystick forwards. When I did this, two wheels were turning forwards, and two were going backwards. Look at the coloured wires that join to the motors going the wrong way. My yellow and orange motor was going backwards, so I needed to swap the places of those two wires so they were the opposite way round. The easiest way to do this is in the breadboard. I also needed to swap my black and white wires, so the white plugged in where the black wire was, and the black wire plugged in where the white wire was.
Try making it go forwards again, and this time it should work. Once you have forwards nailed, you have backwards sorted too.
Running the program automatically
If you want to drive your robot around, you don’t want it connected to a keyboard, etc! You need to put an instruction into the startup file so the Pi starts running the robot when it’s plugged in.
In the terminal, type:
crontab -e
which will open a little menu. Press 2. Use the arrow keys to scroll down to the bottom of the hashes (it probably says something like m h dom mon dow command). On a new line, type this exactly:
@reboot python /home/Pi/TinyPirate.py &
Then press CTRL and x, then y, then Enter.
You have now saved the instructions. Now you just have to shutdown the Pi, unplug all the peripherals (except the controller dongle, that one’s important) and then you can run your robot from a power-bank if you want to drive it round without any wires.
Also, NOW is the time to stick the breadboard down to the car!
Happy driving!