Coder Social home page Coder Social logo

plugins_bluetooth's Introduction

Bluetooth plugins

This plugin currently adds support for the HC-05 Bluetooth module.

It has an auto-configure mode to set the module device name and baud rate. It also supports automatic switching of the active stream to Bluetooth and back on connect/disconnect if a native USB port or another UART port is the default. The grblHAL welcome message will be sent to the Bluetooth stream when a connection is established so that senders requiring this is kept happy.

To achieve this an UART port and an interrupt capable auxillary input pin is required - the input pin has to be connected to the module STATE pin. The plugin will claim the highest numbered Aux input pin, this can be found by either checking the board map file or listing the available pins with the $pins system command. E.g. for the iMXRT1062/Teensy 4.1 T41U5XBB board this will normally be pin 35:

To enable this plugin uncomment the #define BLUETOOTH_ENABLE 1 line in the driver machine.h file and recompile.

...
[PIN:22,Z limit min]
[PIN:36,Aux input 0]
[PIN:30,Aux input 1]
[PIN:33,Aux input 2]
[PIN:35,Aux input 3]
[PIN:2,X step]
...

NOTE: Pins may be claimed by other plugins so it might not always be the highets numbered pin.
NOTE: The claimed pin is no longer available for M62-M66 commands.

Auto configure

Ensure the $377 setting is set to 0 (it can be found in the Bluetooth group if your sender supports grouping of settings). Power up the controller and the module while pressing down the AT-mode switch on the module. This will change the controller baud rate to 38400 and it will then send the AT commands required for configuration. Reports will be sent to the default com port indicating success or failure. Success is also indicated by $377 beeing set to 1. After auto configuration is completed cycle power to both the module and the controller to start normal operation.

Manual configure

If the module is already configured for correct operation (baud rate set to 115200 baud) then automatic switching can be enabled by setting $377 to 1.

NOTE: This is a preview version.


Available for some board maps for the iMXRT1062 (Teensy 4.1), STM32F4xx, STM32F7xx and SAM3X8E (Arduino Due) drivers.
Support for further drivers may be added on request.


2022-07-19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.