This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF51822 and atmega32u4

Hello,

I am planning to use an atmega32u4 as a micro controller for a keyboard, and I'd like to use a NRF51822 as the bluetooth sender.

As i've read, NRF51822 is BLE HID capable but my doubt is how would I feed the info from the atmega32u4? Would I just feed it via UART and then let the NRF51822 send it via BLE?

Parents
  • I'd start with the HID Keyboard example, that has everything you need for the BTLE side of things. That example uses buttons on the dev kit to trigger keyboard events but that's the bit you're going to change.

    Similarly there's a UART example which just shows how to use the UART driver (you can use UART, or SPi or TWI or any other kind of serial interface you want). You just then need to integrate the UART driver into the BLE HID code so incoming data triggers the BLE HID. You should be able to use an interrupt driven UART driver so you don't have to poll for anything, just sleep and wait for data.

Reply
  • I'd start with the HID Keyboard example, that has everything you need for the BTLE side of things. That example uses buttons on the dev kit to trigger keyboard events but that's the bit you're going to change.

    Similarly there's a UART example which just shows how to use the UART driver (you can use UART, or SPi or TWI or any other kind of serial interface you want). You just then need to integrate the UART driver into the BLE HID code so incoming data triggers the BLE HID. You should be able to use an interrupt driven UART driver so you don't have to poll for anything, just sleep and wait for data.

Children
No Data
Related