• Im trying to connect with my puckjs on my iphone7+ but it seems that it is not as easy as what i've seen on the unpacking video. Can anyone help me to quickly get started with it? 😊👍🏻

  • To get something going quickly, you should be able to install an app called nRF UART.

    You can then use that to connect to the Puck, and can send commands. For instance LED1.set() followed by a newline will turn the red LED on, and LED2.reset() will turn it off.

    In the KickStarter video I used the Adafruit Bluefruit app, but you do need to have put a little bit of software onto the Puck first for that. It is possible to do it using the nRF UART App, but if you could connect to it on a desktop first with the Web IDE that'd be easiest.

    If you upload the code below using the Web IDE, then disconnect and reconnect with the Adafruit app then you can use the buttons to control the LEDs:

    Bluetooth.on('data', function(d) { 
      if (d[0]=="!" && d[1]=="B") {
        var b = d.substr(2,2);
        if (b[0]=="1") LED1.write(0|b[1]);
        if (b[0]=="2") LED2.write(0|b[1]);
        if (b[0]=="3") LED3.write(0|b[1]);
      }
    });
    LoopbackA.setConsole(1);
    

    Note that when you do that, you'll have to remove the battery and put it back in again if you want to reprogram it to something else.

  • Just to add: Sadly Apple don't seem to have much interest in implementing Web Bluetooth for iOS web browsers - but I've contributed some of the KickStarter money to help make an app that will allow you to use Web Bluetooth webpages on your iPhone.

    First demo video here: https://www.youtube.com/watch?v=HdItzm20uzk

    But I hope we'll have something on the App Store (or at least submitted and waiting for Apple's approval) by the new year.

  • Note that when you do that, you'll have to remove the battery and put it back in again if you want to reprogram it to something else.

    What about setting up the button press on the puck to reinstate the console?

  • Good point:

    setWatch(function() {
      Bluetooth.setConsole();
    }, BTN, {repeat:true, edge:"rising"});
    
  • i was able to test and make my 2 pucks using windows 10 and the downloaded Web IDE but still i cannot make this work on my iphone7+ with your instruction above. i have downloaded nrf toolbox app which contains the nrf uart. i sent a command using LED1.set();\n but i wasn't able to turn the led on.

    from the youtube video you shared here, do you have a complete instruction/steps on how to get this done?

  • The YouTube video is showing something that we're working on - it's not available right yet.

    How did you send the newline via the nRF toolbox app? If you just sent \n it's unlikely it'll be enough. I don't have an iPhone to test with at the moment, but on Android you can just hit enter on the onscreen keyboard, then send, and that's enough.

  • noted on the youtube video.

    As mentioned on my previous post i used "LED1.set();\n" for both iphone and android.

  • Can you try sending with a proper newline, and no quotes?

  • oops sorry for the qoute but the code that i set was no qoute. i just use the qoute to emphasize my code.

  • And the newline? Did you use \n or did you actually press enter and then send?

  • i keyed in myself. as there is no press enter in ios. it only have ok and done button. i also tried to put a semicolon after the \n but still no light.

  • You mentioned you had an Android phone earlier - any chance you could try it with that and pressing enter, just to make sure?

    You might have to do it twice, as if you've sent a load of commands previously without a newline there might be junk in the input buffer

  • I have the same problem here with my Iphone 5s. Did you solve the problem? what would be the right syntax to put in the nrf toolbox commandline?
    thx

  • whatever i type my puck disconnects and i cant find it anymore if i scan so i have to take the battery out to reset it

  • Hopefully the Web Bluetooth iOS app will arrive in the next 2 weeks and life will be a lot more interesting.

    Please can anyone else with an iPhone confirm exactly what you need to do to get this to work? Does the Adafruit Bluefruit app work any better? My iOS devices here don't have BLE so I can't test at the moment.

  • I have cut and paste code from examples and then saved on the phone in notepad.

    Then you can cut and paste lines, into the Nordic app, and execute them on the puck.

    If you leave a carriage return between the statements, they are easier to cut and paste.

  • @Wilberforce thanks!

    Actually I just heard back that the Adafruit app is much easier than copy/pasting.

    Install the Adafruit Bluefruit app - connect in UART mode, and then there's an option in there to send a carriage return after each line which you can click, and it works perfectly.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How can i quickly get started with my puckjs on my iphone 7+?

Posted by Avatar for iAmNimrod @iAmNimrod

Actions