You are reading a single comment by @AkosLukacs and its replies. Click here to read the full conversation.
  • I have a new build, fixes:

    • Button and the 4 LEDs are negated
    • Only accessible pins are available from Espruino (for example there is no D3, because P0.03 is not routed on the dongle)

    Board file two hex files are attached: 2v04.105 is built from the same commit as the previous one, 2v04.121 is from the latest master. Bluetooth and USB serial works, haven't done much testing...

    @tcpipchip Don't exactly remember what made it working, IIRC make everything "right"...
    Right now P0.00 is D0, P0.01 is D1 ... P0.31 is D31. P1.00 is D32, P1.01 is D33 and so on.

    You can do that from JS (or wrap it in an object, if you'd like to):

    GPIO_1 = D13
    GPIO_2 = D14

    Or - since the dongle build file defines the LEDs, button, and two pins for serial, you might want to create your own board file, and the pin naming could be done like the NodeMCU pin aliases: Add an extra file that defines aliases: Something like Nina.GPIO_1 is an alias for D13.

    @Gordon I have one last (hahaha) question: The nRF52840 has pins on P0 and P1. right now P1.00 maps to D32, that's kind of annoying (thoughts in my brain: do I add 31 or 32 or wat?). Tried to mess with the board file and, and I could make a mess and create for example an E9 pin, but didn't work.
    Can we map P1.00 to (for example) E0, P1.01 to E1, and so on?
    The button and an LED is on P1 right now, and those do work, just don't like the pin names this way :)

    3 Attachments


Avatar for AkosLukacs @AkosLukacs started