Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
check this
https://ww1.microchip.com/downloads/en/devicedoc/spi.pdf
it has sample code at the end....