• I was trying :

    setWatch(() => {
    E.showMessage("You\npressed\nthe bottom\nbutton!");
    Bluetooth.println(JSON.stringify({t:"inf­o", msg:"You\npressed\nthe bottom\nbutton!"}));
    setTimeout(()=>g.clear(), 5000);
    }, BTN3);

    But don't know how to set a handler on the website to catch the info.

  • Tue 2021.10.05

    reply to post #12

    'But don't know how to set a handler on the website to catch the info.'

    One of my biggest hurdles was to keep separate which side of the fence I was on, along with un-learning the DOM event model within the browser for code on the micro side. One of the reasons I suggested starting a new monolithic page was to be able to track the DOM event model within the browser debugger. Keepng the events such as when setWatch() fires on the micro side mentally separate from the behavior within the browser DOM can at time have one in fits. My only suggestion is to just keep plugg'n away with small one line code change baby steps. Take and modify the first successful button press event that was captured successfully and build on that. It does get easier after each iteration and after a bit of thinking time.

    After some effort has been put in, post some code and I'm sure others will provide suggestions.

About

Avatar for mg @mg started