Im from Jakarta, Indonesia. I have a safety-goggles that included in the laser's package when I bought it. The laser is CXLaser-B008 (claser diode). It's a class III laser. Thank you for the response and explanation.What laser pointer do you have? It may not be possible to control this very fast depending on how it's set up. If you're trying to modulate it any faster than you can turn it on and off with the laser-pointer's own power switch you may have problems.
For modulating the laser with the Pi at high speeds (into the kHz range), you'll need a laser with it's driver set up to do this natively. Modulating it based on switching the battery power on and off is not going to work.
I hope you have some decent safety-goggles with that laser - as 5W is a hell of a lot of power to be playing around with. You only have one set of eyeballs - and damaged retinas don't heal.
Now I'm suggesting you go and spend some time reading the Sticky threads carefully and after you're done, add your location to your profile & post an Introduction thread in the "Welcome" section of the forum. This will go a long way to making other forum members want to help out. Include your rough location (e.g. Hello from Bristol, UK as mine was) in the title and say a bit about yourself & interests etc. The location is important as it helps us recommend local things and tailor advice to match the laws in your country.
Here's the link to the product https://www.tokopedia.com/baranganekaunik/laser-biru-bisa-bakar-type-b008-biruOne of those statements are false.
Have a link to the product by any chance?