Ble will not compile

This is progress at least!

Please provide a link to the web page you obtained the non-working examples from.

Please post your full sketch.

I'll provide instructions you can follow to do that:

  1. Select Tools > Auto Format from the Arduino IDE menus.
    This is done to make the code easier for us to read.
  2. Select Edit > Copy for Forum (Markdown) from the Arduino IDE menus.
  3. Open a reply here on this forum topic by clicking the "Reply" button.
  4. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the sketch to the post composer.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Repeat the above process if your sketch has multiple tabs.
  7. Click the "Reply" button to publish the post.