Avatar for MattB


Member since Jan 2021 • Last active Feb 2021
  • 2 conversations

Most recent activity

  • Avatar for MattB

    Thanks @Gordon. I've only had it just over a month so I'll return it to Pimoroni when I bought it from. I have another one which will do the job for now.

    Thanks again for your help

  • Avatar for MattB

    The version is Puck 2.0b

    Pretty sure the battery is around the right way. The writing is upwards when looking at the battery connector. I have a second puck now, and that's working with the battery in the same orientation.

    It hasn't had any major knocks etc, as far as I can tell. I'm testing motion logging, so it's been in my pocket or my pillowcase the whole time. Nothing has been connected to it (other than via BT), it's been in the standard case the whole time (other than replacing the battery etc).

    The only thing I can think of is that I am writing to storage on a fairly regular basis (max every 10 seconds), but I hope that should be fine.

  • Avatar for MattB

    I have a Puck which seems to have died.

    • I can't connect to the device via Bluetooth.
    • If I pull the battery and reconnect it doesn't seem to help.
    • No lights flash etc when it's power cycled (ie reconnect the battery).
    • Pressing the button while adding the battery doesn't seem to help either (ie no lights or Bluetooth connection).
    • I've tried 2 new batteries, so I don't think it's that.

    Is there anything else I can try to bring it back to life?

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

    @Gordon Ok I see, thanks again for that. The new firmware is helping a lot with space, but the code seems to be failing after a number of hours. I need to work on the code a bit and add your suggestions.

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

    @Gordon Brilliant. Thanks so much for that. I have a lot more space now.

    I'm struggling with heatshrink though. So what I have so far is.......

    var fileName = "log";
    var f = require("Storage").open(fileName,"a")
    var records = new Uint8Array(32);
    var records = [1,2,3,4,5,6,7,8,9];

    This creates a file, and I can open it. It's not readable though. I assume that it's a binary file. How do I go about getting this off the device and decompressing it (assume it is correct in the first place). I'd like to do the decompress off the device so I don't have to load the file into memory etc.

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

    Thanks all, I'll try those suggestions.

    @Gordon The plan is to use the device for logging temp and motion. It's going in the post at the moment for testing and 2-4 days seems to use about 17k of the 40k, so I am going to need to get more space if it's going to go on longer trips. I will try the compression you suggested. I suspect that will give me enough.

    @allObjects That looks interesting. I'll put that down for version 2 of my tests :)

    @fanoush I don't need most of the other functions so removing the others would work. Is there a guide somewhere on how to build my own firmware (ie once I have changed the file)?

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

    I can't seem to store more than 40k of data in a file.

    If I reset the Puck and do a.....


    .....I get.....


    I'm trying to store movement and temperature data in a file. This works until the file gets to about 40k, then it fails.

    Does this limit sound about right (using the latest firmware)? Am I missing something? Can I clear down the storage to get more space somehow?