This tutorial will teach you how to easily add Bluetooth connection to the design you created in Part 1.
Introduction to Effortless AVR Design is part of the effortless design workshop series.
Connect RN4871 Bluetooth 4.2 ClickUsing the same apparatus as part 1, add a second MikroBUS extension module to connect the RN4871 Click to your ATtiny817 Xplained Pro.
Reconfigure STARTThe RN4871 Click communicates with the target MCU over the same RX and TX pins of the USART with the virtual COM port.
This means we do not need to change the pin configuration. We will simply perform a "wire replacement" to stream our altitude and temperature data over Bluetooth.
We only need to reconfigure START to include the standard Bluetooth baud rate of 115200.
To re-open the START file in Studio 7, click Project > Re-Configure Atmel Start Project
Click on the USART_ASYNC block and change the Baud Rate to 115200
Click Generate Project to add the files to your project
Call the Altitude Example Code in MainRepeat the process used in Part 1 to add the Altitude example code altitude_example() to your main file.
Make and Program the board.
Use a Bluetooth Terminal App to View the Data StreamI use Microchip's App Bluetooth Smart Data on my iPhone.
Connect with the module (auto-generated as RN-BLE) and view the data stream. It really is that easy!
Comments