Tutorial: Spark Variable and Function on One Web Page

Omgg it worked!!! Thank you so so much

1 Like

It will be amazing to see an update version of this, since the photos doensā€™t show anymore.

Me too very much appreciate if anyone can update this.

This is one of my favorite go-to threads. I wonder why the pictures disappear.
Hi @rickkas7, any chance this thread can be turned into a tutorial in the docs?

Some of the content is part of this application note

https://docs.particle.io/datasheets/app-notes/an032-calling-api-from-web-page/

2 Likes

Thanks to this excellent tutorial, I am using Web Pages to interact with several of my Photons. I am very gratefull to you all for making this possible!

Now a new issue comes up: on one of these pages I am using a function that creates a beep sound as soon as a certain variable turns from ā€˜0ā€™ into ā€˜1ā€™.
This works fine on Chrome for my Windows PC, but it does however not on my iPhoneā€¦
As anyone aware of any relevant differences between Chrome for Windows and for iOS???
If so: what would be a solution for this?

1 Like

Not my area, but I believe 3rd party browsers like Chrome on iOS are forced to use Appleā€™s WebKit browser engine for platform efficiency (and business advantage).

Browsers have varied restrictions on whether you can play a sound when running in the background, or if not in response to a user action, like clicking on a button. If you remember the days when some browser tab would start making sound and you couldnā€™t figure out which one, it makes sense, though not for your specific use-case.

1 Like