• Hi all! Happy new year to all of you! My new years resolution is to make the most of the Bangle watch 2, so I can't let my current projects down.

    I've been debugging with arduino, and I turned my lamp on from the arduino with the code I got from your tutorial.

    So I tried this same code in Puck JS an it didn't work . Then I calculated the difference between the code on your page and the signal from puckJS and this was the result:

    Original on code from puck's page (71 elements)
    const original = [9600, 4900, 500, 700, 500, 700, 600, 700, 500, 700, 500, 700, 600, 700, 500, 700, 500, 700, 600, 1900, 500, 1900, 500, 1900, 600, 1900, 500, 1900, 500, 1900, 600, 1900, 500, 1900, 500, 1900, 600, 1900, 500, 1900, 600, 700, 500, 600, 600, 700, 500, 700, 500, 700, 600, 600, 600, 700, 500, 700, 600, 1900, 500, 1900, 500, 1900, 600, 1900, 500, 1900, 500, 43100, 9600, 2500, 500];//71

    code received in my arduino after puck sends the original code (68 elements).
    const fromPuck= [9410, 5026, 354, 842, 378, 786, 458, 838, 326, 810, 378, 810, 434, 858, 378, 1378, 302, 890, 438, 2062, 354, 2058, 298, 2098, 434, 2070, 302, 2070, 354, 2046, 410, 2098, 302, 2058, 326, 2118, 382, 2114, 306, 2090, 410, 882, 330, 810, 406, 910, 306, 886, 330, 782, 510, 794, 410, 870, 330, 866, 434, 2086, 302, 2082, 354, 2046, 438, 2102, 306, 2110, 306, 1000];//68

    const diff= [];

    for (let i = 0; i < 68; i++) {
    diff[i]=original[i]-fromPuck[i];
    }
    console.log(diff);

    Difference of the 2 arrays, puck seems to send always just 68 elements
    [190, -126, 146, -142, 122, -86, 142, -138, 174, -110, 122, -110, 166, -158, 122, -678, 198, -190, 162, -162, 146, -158, 202, -198, 166, -170, 198, -170, 146, -146, 190, -198, 198, -158, 174, -218, 218, -214, 194, -190, 190, -182, 170, -210, 194, -210, 194, -186, 170, -82, 90, -194, 190, -170, 170, -166, 166, -186, 198, -182, 146, -146, 162, -202, 194, -210, 194, 42100]//68

    Do you see anything odd? My puck JS is sending signals, I can read them in arduino but they aren't good enough to turn my lamp on, and I'm able to turn my lamp on from my arduino.

    Thanks

About

Avatar for Alberto @Alberto started