Avatar for ChristianW

ChristianW

Member since Nov 2016 • Last active May 2017
  • 8 conversations
  • 62 comments

German IT developer who found his long lost love for electronics and connected devices...

Most recent activity

    • 13 comments
    • 512 views
  • in Puck.js
    Avatar for ChristianW

    Actually - like @oesterle said it's quite perfect as it is.

    I was not aware of the many restrictions in design. I just had a closer look - much is covered with the white paint, so it seems even simpler than it is.

    Regarding pads:
    maybe I'm biased from my gamecontroller/joystick project, but also doable with the current version. Actually it's better to keep it simple - you are right.

  • in Puck.js
    Avatar for ChristianW

    The longer I think about it: sound would be really interesting.
    The more senses it affects, the better... :)

    And a tiny thing: If the PCB had a notch or two and a nose as counterpart in the case - that would make it easier / safer for newbies to put everything together in the right order...
    Probably this will also have issues with the antenna...

    Regarding solder pads: I was not aware of the antenna.
    Could the pads without hole maybe have a wider spacing and get holes?
    There is one side with a double row with two different pitches - why? Could save some space if sacrificed...

    By the way: How many layers does the PCB have?

  • in Puck.js
    Avatar for ChristianW

    Solder pads would be something.
    Maybe move them to the edge (like on a stamp) with a wider pitch so you can solder on things more easily?

  • in Puck.js
    Avatar for ChristianW

    Sounds great.
    Maybe a "barebone" version without the case for guys who'd integrate it into something anyway?
    Don't know how much of the production costs get into the case.

    On the other hand side: More case colours (even if that would have impact on the RGB LED colours).

  • in Puck.js
    Avatar for ChristianW

    I just tried the new build and it works for me, too.

  • in Puck.js
    Avatar for ChristianW

    OK thanks. Ordered the board.
    Seems to be needed for serious development...
    I'm just chewing myself through the nordic docs to understand what happens on the lower levels...
    This is the right link infocenter.nordicsemi.com/topic/c­om.nordic.infocenter.s310.api.v3.0.0/mod­ules.html - could you just confirm?

  • in Puck.js
    Avatar for ChristianW

    OK - given I have managed to create a working ZIP for OTA flashing.

    A test cycle is quite complex and time consuming:

    • create the ZIP
    • send it to iPhone
    • set Puck to Bootmode and flash (this takes several minutes)

    Any hints or howtos to do it via serial connection from the commandline?

  • in Puck.js
    Avatar for ChristianW

    Interesting.
    I just tried the same (espurino --list), also Mac OS X (MacBook Air) and have drops too.

    But when lowering the advertising interval like

    NRF.setAdvertising({},{interval: 50})
    

    it seems to be found in all cases.
    Tried 300, 200, 100 too and still drops there.

    Suppose this interval will not improve battery life, but may be a hint why it does not always work?

  • in Puck.js
    Avatar for ChristianW

    OK - does not work for me either.

    I have not hardcoded the MAC but search for devices with the corresponding service:

    function setLight( r, g, b ) {
      var gatt;
      var c;
    
      console.log( "rgb=", r, g, b );
      NRF.requestDevice(
        {filters:[{services:["FF02"]}]}
      ).then( dev=>{
        console.log( "found", dev.name );
        return dev.gatt.connect();
      }).then( g => {
        console.log( "connected" );
        gatt = g;
        return gatt.getPrimaryService("FF02");
      }).then(function(service) {
        console.log( "service found" );
        return service.getCharacteristic("FFFC");
      }).then(function(characteristic) {
        console.log( "characteristic found" );
        c = characteristic;
        return c.readValue();
      }).then( v => {
        console.log( "value", v );
        return c.writeValue(String.fromCharCode(0,r,g,b­));
      }).then( r => {
        console.log( "result", r );
        gatt.disconnect();
        console.log("Done!");
      });
    }
    
    
    var col = 1;
    
    setWatch(
      evt => {
        var long = ( evt.time - evt.lastTime ) > 0.2;
        if( long ) {
          setLight( 0, 0, 0 );
        }
        else {
          col++;
          if( col > 7 ) col = 1;
    
          console.log( "col", col );
          setLight( 
            col & 1 ? 0xFF : 0, 
            col & 2 ? 0xFF : 0,
            col & 4 ? 0xFF : 0
          );
        }
      },
      BTN,
      { edge: "falling", debounce: 50, repeat: true } 
    );
    

    readValue()correctly returns the 4 bytes (white-red-green-blue) I have written with LightBlue to Service FF02 / Characteristic FFFC before.

    But writeValue()does not do or return anything.

    @Gordon: You are right. LightBlue shows WriteWithoutResponse for the Characteristic in question by the way.

    Is that something the puck BLE code does not handle yet?

Actions