-
• #2
Sun 2020.03.15
Hi @user110429 and welcome to the world of Espruino and your choice using Puck.js
'Is there any available code for that?'
Tons of examples:
Code for detecting a button press:
Code example specific for Puck:
Follow tutorial for web page access using a BLE enabled browser, such as Chrome:
Have fun!!
-
• #3
Hey, thanks for these links. So I've used the code found on this link for counting button presses.
http://www.espruino.com/Pico+Buttons
It works! but when I tried to run it on another code editor like visual studio code (or via GitHub) it wouldn't work on my web page, any ideas why that's happening? -
• #4
Sun 2020.03.15
'any ideas why that's happening?'
Does the web page example from last link in post #2 work from a BLE compliant browser?
it is really cool when it does!! ;-)Follow instructions there carefully. Must be
https:
so should have run from GitHub. I remember a user many months ago that had to wait a half hour after setting up their personal GitHub Pages account. Could that be it?See post #7
Lacking that, follow the bulleted list at:Writing an effective forum post
http://forum.espruino.com/conversations/335009/to provide our viewers the environment, code snippets, etc.
Is there any available code for that? I looking for a way for my Web Bluetooth webpage to count the number of presses on a puck.