Shop OBEX P1 Docs P2 Docs Learn Events
SPIN code for Adafruit BTLE UART Friend ref JonnyMac — Parallax Forums

SPIN code for Adafruit BTLE UART Friend ref JonnyMac

JonnyMac,
I had a look at the Adafruit BTLE UART Friend page and it certainly seems to be a useful and powerful device.
I can visualize many applications, especially for short range data transfer.
I wonder if you would mind sharing your SPIN code with us.
Many thanks for the heads-up on this device.

Comments

  • Do you know whether there is actually spin code, Macrobeak? Many of those are those modules provide a transparent serial link to pass characters through. The Ezlink from adafruit does that. There appears to be a switch on this one to do that.

    Might need to add a transistor on RTS (DTR?) like the prop plug, so it doesn't hold in reset


  • JonnyMacJonnyMac Posts: 8,927
    edited 2017-10-24 12:57
    I'm still in the early experimental stages of working with this device. Attached is a program that I'm using to explore AT commands (when module is in CMD mode), and data from the Bluefruit LE app when in UART mode.

    Just a note: My program buffers the command to the BTLE module so that you can edit with backspace (in PST) before sending. Again, this is a tool to play with, so being able to fix a typo in a command keeps things moving along.
  • JonnyMacJonnyMac Posts: 8,927
    edited 2017-10-22 22:15
    Here's what you can expect from the program -- I'm using PST as a terminal. The first two transactions are in CMD mode. You can see the command sent ("-->") and what comes back ("<--"). Note that the module echoes the command.

    The third transaction displayed is with the module in UART mode; this is a packet from the color picker panel in the app. In my little program the response from the BTLE device will also be displayed in hex bytes if there is nothing in the command buffer; this allows from the clean display of values from the color picker and other panels.

    btle_uart_transactions.jpg
    662 x 655 - 181K
  • JonnyMacJonnyMac Posts: 8,927
    edited 2017-10-24 02:18
    Here's a simple app that works with the Color Picker interface -- this is the Spin equivalent (with checksum verification) of the Blockly app I posted.

    Note: the pin #s may seem odd -- I am running this on an EFX-TEK HC-8+ controller.
  • JonnyMac,
    Thank you once again for your generous sharing of your development and code.
    Your "ble connect" archive covering both modes will enable many of us to get a good start with this module.
Sign In or Register to comment.