You are reading a single comment by @navas and its replies. Click here to read the full conversation.
  • Also, I finally figured out the code using espruino. It works with Puck.JS, but ot doesn't work on my Pico, Any ideas?

    var on = [4.41455841064,4.36687469482,0.570297241­21,1.61373615264,0.56827068328,0.5521774­2919,0.54073333740,1.62029266357,0.56457­519531,1.61266326904,0.56934356689,0.553­13110351,0.54073333740,0.55301189422,0.5­4085254669,1.61361694335,0.56552886962,0­.55694580078,0.53882598876,0.55599212646­,0.53977966308,1.61743164062,0.567436218­26,0.55408477783,0.54073333740,0.5531311­0351,0.53977966308,1.61361694335,0.56743­621826,1.61075592041,0.56934356689,0.554­08477783,0.54061412811,1.61945819854,0.5­6743621826,1.62029266357,0.56743621826,0­.55313110351,0.54073333740,1.61647796630­,0.56743621826,1.61552429199,0.566482543­94,1.61170959472,0.57029724121,1.6404390­3350,0.54156780242,1.64020061492,0.54180­622100,1.61361694335,0.56934356689,0.556­11133575,0.54061412811,1.61266326904,0.5­6838989257,0.55408477783,0.53977966308,0­.55313110351,0.54073333740,0.55325031280­,0.53966045379,0.55408477783,0.539779663­08,0.55408477783,0.53977966308,0.5550384­5214,0.53977966308,0.55599212646,0.53977­966308,1.61457061767,0.56648254394,1.613­49773406,0.56755542755,0.55408477783,0.5­3977966308,0.55408477783,0.53882598876,0­.55408477783,0.53977966308,0.55313110351­,0.53977966308,0.55599212646,0.539779663­08,1.61647796630,0.56648254394,0.5542039­8712,0.53966045379,0.55313110351,0.53966­045379,1.61373615264,0.56743621826,1.614­57061767,0.56648254394,1.61647796630,0.5­6552886962,1.64127349853,0.53977966308,1­.61647796630,0.57792663574,5.18798828125­,4.41646575927,4.36210632324,0.571250915­52,1.64031982421,0.54168701171,0.5521774­2919,0.54168701171,1.61743164062,0.56648­254394,1.61445140838,0.56755542755,0.554­08477783,0.53977966308,0.55313110351,0.5­4073333740,1.61457061767,0.56648254394,0­.55599212646,0.53977966308,0.55503845214­,0.54073333740,1.64413452148,0.540733337­40,0.55313110351,0.54061412811,0.5532503­1280,0.53977966308,1.61457061767,0.56648­254394,1.61552429199,0.56648254394,0.553­13110351,0.54073333740,1.61838531494,0.5­6838989257,1.62124633789,0.56648254394,0­.55408477783,0.53882598876,1.64508819580­,0.54073333740,1.61266326904,0.568389892­57,1.61552429199,0.56648254394,1.6126632­6904,0.56838989257,1.61361694335,0.56838­989257,1.61743164062,0.56552886962,0.556­94580078,0.54073333740,1.61552429199,0.5­6457519531,0.55408477783,0.53977966308,0­.55313110351,0.54073333740,0.55408477783­,0.53882598876,0.55408477783,0.539779663­08,0.55313110351,0.53977966308,0.5559921­2646,0.53977966308,0.55503845214,0.54073­333740,1.61552429199,0.56552886962,1.613­61694335,0.56648254394,0.55503845214,0.5­4073333740,0.55313110351,0.53977966308,0­.55408477783,0.53977966308,0.55313110351­,0.53977966308,0.55599212646,0.540733337­40,1.61457061767,0.56827068328,0.5532503­1280,0.54073333740,0.52928924560,0.56457­519531,1.61361694335,0.56743621826,1.613­61694335,0.56838989257,1.61278247833,0.5­6922435760,1.61361694335,0.56743621826,1­.61743164062,0.57792663574];
    
    var off = [4.44984436035,4.37164306640,0.573158264­16,1.61933898925,0.56934356689,0.5559921­2646,0.54168701171,1.62410736083,0.56743­621826,1.61933898925,0.56934356689,0.555­03845214,0.54168701171,0.55503845214,0.5­4168701171,1.61743164062,0.57029724121,0­.55789947509,0.54073333740,0.55789947509­,0.54073333740,1.62220001220,0.567436218­26,0.55599212646,0.54073333740,0.5550384­5214,0.54168701171,1.61743164062,0.56743­621826,1.62029266357,0.56648254394,0.555­03845214,0.54073333740,1.62410736083,0.5­6838989257,0.55694580078,0.54073333740,1­.61564350128,0.57017803192,1.62029266357­,0.56552886962,1.61838531494,0.568389892­57,1.61933898925,0.56648254394,0.5550384­5214,0.54061412811,1.62231922149,0.56743­621826,1.64699554443,0.54073333740,1.624­10736083,0.56934356689,0.55408477783,0.5­4073333740,0.55503845214,0.54073333740,0­.55503845214,0.54061412811,0.55515766143­,0.54073333740,1.61743164062,0.568389892­57,0.55503845214,0.54073333740,0.5569458­0078,0.54073333740,1.62315368652,0.56934­356689,1.61647796630,0.56838989257,1.644­13452148,0.54275989532,0.55491924285,0.5­4073333740,0.55408477783,0.54073333740,0­.55408477783,0.54073333740,0.55503845214­,0.54073333740,0.55694580078,0.540733337­40,0.55694580078,0.54061412811,0.5542039­8712,0.54168701171,0.55503845214,0.54073­333740,1.62029266357,0.56838989257,1.617­43164062,0.56838989257,1.61933898925,0.5­6648254394,1.61743164062,0.56838989257,1­.61838531494,0.58078765869,5.22613525390­,4.41932678222,4.37355041503,0.571250915­52,1.61647796630,0.56838989257,0.5559921­2646,0.54073333740,1.64794921875,0.54168­701171,1.61838531494,0.56648254394,0.555­03845214,0.54168701171,0.55503845214,0.5­3977966308,1.61933898925,0.56743621826,0­.55599212646,0.54168701171,0.55694580078­,0.54073333740,1.62208080291,0.568509101­86,0.55408477783,0.54168701171,0.5540847­7783,0.54073333740,1.61838531494,0.56743­621826,1.61743164062,0.56838989257,0.555­03845214,0.54073333740,1.64890289306,0.5­4264068603,0.55694580078,0.54073333740,1­.61743164062,0.56743621826,1.61743164062­,0.56838989257,1.61743164062,0.568389892­57,1.61933898925,0.56743621826,0.5550384­5214,0.54073333740,1.62220001220,0.56838­989257,1.61838531494,0.56934356689,1.623­15368652,0.56934356689,0.55503845214,0.5­4156780242,0.55420398712,0.54073333740,0­.55503845214,0.54168701171,0.55408477783­,0.54073333740,1.62029266357,0.566482543­94,0.55420398712,0.54156780242,0.5570650­1007,0.54061412811,1.62506103515,0.56743­621826,1.61838531494,0.56648254394,1.617­43164062,0.56934356689,0.55515766143,0.5­4061412811,0.55503845214,0.54073333740,0­.53119659423,0.56457519531,0.53024291992­,0.56457519531,0.53310394287,0.564575195­31,0.53215026855,0.56552886962,0.5550384­5214,0.53977966308,0.55503845214,0.53977­966308,1.62315368652,0.56743621826,1.619­33898925,0.56636333465,1.61743164062,0.5­6850910186,1.61743164062,0.56934356689,1­.62029266357,0.57983398437];
    
    
    function ac(cmd){
      digitalWrite(LED1,1);
      analogWrite(A5,0.9,{freq:38000});
      digitalPulse(A6, 1, cmd);
      digitalPulse(A6, 1, 0);
      digitalRead(A5);
      digitalWrite(LED1,0);
    }
    
About

Avatar for navas @navas started