Avatar for undecided


Member since Mar 2015 • Last active Oct 2021
  • 1 conversations

Most recent activity

  • in Porting to new Devices
    Avatar for undecided

    Dammit! It's arrived, and I've got to do work today, and all I want to do is play with my new toy... :D

    Anyway, charges well, works well (though it has yet to find GPS, might need to expose it to some sunshine), found one of the niggles in the "beep" settings menu already, all good though.

    Did you want us to report niggles, and if so, where? Happy to put them in github issues with a specific label if you like?

  • in ESP32
    Avatar for undecided

    Picked up a couple of the TinyPICO V2 (USB-C variant) boards and, of course, the first thing I did was flashed the ESP32 version of Espruino onto it. I did try the micropython, but I found the wifi to be a bit flaky, whereas I had no problem in Espruino.

    It does show one error on boot though:

    E (542) psram: ESP32PICOD4  do not support psram yet
    E (542) spiram: SPI RAM enabled but initialization failed. Bailing out.
    WARNING: check error not implemented yet:0

    ... but that hasn't bothered me so far. And I'm aware that the bluetooth support isn't there yet, but again, that's not something I plan to use it for yet.

    What did bother me was the onboard "LED" (the DotStar, or APA102). Couldn't get that working at all, and since I've never done anything with SPI, I presumed it was me.

    Anyway, I fixed it, then I lost the settings to fix it - so I thought I'd document it here in case anyone else has the same problem.

    Turns out, the thing I was missing from the documentation is that the following is required to activate the LED:

    digitalWrite(D9, 0); // set this to 1 to cut power to the LED completely
    digitalWrite(D13, 0); // Not sure what this is for, but doesn't like it high
    SPI1.setup({mosi:D2, sck:D12});

    The D13 confused me. The micropython codebase has a comment that I relied on for far too long - if you look at that code for anything, ignore the suggested pins - they are completely false, and I suspect correspond to a pre-production version of the tinypico.

    Also note that in the micropython version, MISO is set to a non-dotstar-specific SPI pin. I believe this is for chaining, so that you can talk to 2 or more of these efficiently, but not something I needed to do.

    Once that's set up, you can just write to it - for example:

      0,0,0,0, // header, probably not necessary, useful for chaining
      0xE0 | 5, // brightness, replace 5 with anything from 1 - 31
      10, 127, 255, // blue, green, red
      0,0,0,0 // footer - some of this is needed I think

    (Of course, you SHOULD use a Uint8Array... and be a bit more consistent with whether you're using hex or decimals... but for testing it out, this works beautifully)

    Hope that helps someone (and if not, it will probably help me when I forget where I saved my current code again!)

  • in Porting to new Devices
    Avatar for undecided

    I keep delaying it because I want to keep sorting out more little niggles in the software

    Ha, I totally understand that one. Yep, I know I'm certainly happy to buy one from the batch of "These are somewhere between not-quite-right and totally-not-right" devices!

  • in Porting to new Devices
    Avatar for undecided

    Ahh, hadn't seen that! Fantastic news.

  • in Porting to new Devices
    Avatar for undecided

    Are you still planning to sell the Q3s, or did I miss them?

    Not worried about espruino being fully tuned for it so long as it works as a basic watch and updates can be easily applied...