Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

toitware/toit-rn4871

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UART based driver for Microchip RN4871 BLE module

Contains all the functionalities of RN4871 Bluetooth module.

Needs RX, TX and RESET pins to be connected to the ESP32 microcontroller and specified at RN4871 object creation. Uses the UART interface of the ESP32.

Reference

It looks like the code was based on https://github.com/SodaqMoja/Microchip_RN487x/blob/master/src/RN487x_BLE.cpp

Usage

A simple usage example.

import uart
import gpio
import rn4871 show *

RX_PIN ::= 33
TX_PIN ::= 32
RESET_PIN ::= 25

main:
  tx_pin := gpio.Pin TX_PIN
  rx_pin := gpio.Pin RX_PIN
  rst_pin := gpio.Pin RESET_PIN --output --pull_up

  device := RN4871 --tx=tx_pin --rx=rx_pin --reset_pin=rst_pin --baud_rate=115200 --debug_mode=true
  device.pin_reboot
  device.enter_configuration_mode

  print device.get_name

See the examples folder for more examples.

Features and bugs

Please file feature requests and bugs at the issue tracker.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages