Incorrect pin mapping on website and pwm problems

Incorrect, GPIO8 is D5 and D8 is GPIO17

Complete pin map is here https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet/