Avatar for afrid

afrid

Member since Sep 2020 • Last active Oct 2020
  • 3 conversations
  • 10 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    @Gordon .

    i will explain in this way.

    we have BTN or any pin, how to debounce that pin using code?

    puck 1 code:-
    setWatch(senderase,D1, { edge:"rising",debounce:50, repeat: true });

    senderase function called when the D1 is debounces right.

    puck2 code:-

    function send(cmd){
    NRF.requestDevice({ filters: [{ namePrefix: 'Puck.js' }] }).then(function(device) {
    require("ble_simple_uart").write(device,­ cmd, function() {
    print('Done!');
    });
    });
    }

    send("analogWrite(D1,1)\n");

    when i run this code, is this puck can debounce the D1 pin on puck1 ?
    if not any other api is there to that?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    Hi @Gordon,
    i need help on software debouncing a pin for setwatch.

    for ex, i have 2 pucks, in one puck i will have this code :-
    setWatch(senderase,D1, { edge:"rising",debounce:50, repeat: true });

    i want to debounce this pin in code in another puck, i will use NRF uart to send command.
    here is another puck code:-

    function send(cmd){
    NRF.requestDevice({ filters: [{ namePrefix: 'Puck.js' }] }).then(function(device) {
      require("ble_simple_uart").write(device,­ cmd, function() {
    print('Done!');
      });
    });
    }
    

    i tried with digitalpulse,but no use
    how to debounce that pin in first puck , any api is there?

    please help me to solve this issue

    • 13 comments
    • 188 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    Thanks @Gordon for reply.

    Yes i have latest firmware
    I m actually loading the code into puck. I have NFC enabled iphone using tag writer by NXP and also NFC tools by wakdev.

    What actually i need to write to get that LED blink on puck.?
    Can you please explain the code what actually trying for?

    What is the use of case 0xa2 in NFCrx event.?

    From html i understood that,need to send 'red' or equivalent button that turn on LED on puck,is my understanding is correct?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    i have burned the above code in puck,t i m not able to read /write(getting nfc error) the tag using Iphone ( NFC TagWriter by NXP app).

    i m trying very simple thing, make this puck as tag, receive the contents from the app and print the data to log. can you please help me in achieving that?

    can you little bit explain about the "NFCrx". what exactly ?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    Can you please provide me the sample code snippet or guide to work with NFC usecase. I mean to read and write operation of this puckjs as tag?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    i m trying very simple case. i want to make the puck as tag and receive contents from reader and print to the log ?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    can you please help me how to use this api's.
    NFCTag.prototype._write = function (rx) { ... }

    i want to receive the bytes and store in array, print to console or modify those as next step?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for afrid

    Hi,

    I'm trying to write the NFC tag in puck. so i m using NFCrx method.
    i want to receive data and print to console?
    also how can i erase this content on puck side, any api is there ?
    please help me fixing this.

Actions