generating 8 40KHz pulses

Did you look over the Greynomad pinout diagram ?

Can you see the pins labelled PWMH0/PWMH1/PWMH2/PWMH3/PWML4/PWML5/PWML6/PWML7 ?

Once you can answer YES to these 2 questions, go to this thread, reply #7 and (hopefully) learn how to program any PWM.
https://forum.arduino.cc/index.php?topic=476432.0

The drawback of libraries is that you may learn nothing at all if you don't dive into the library code plus the datasheet....