Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature ble neppi #3

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Feature ble neppi #3

wants to merge 16 commits into from

Conversation

VilleHiltunen
Copy link
Contributor

This is the BLE API feature.

It contains the integrated BLE code, with following API functions:

  1. void ble_neppi_init(kernel_pid_t);

    Initialize the softdevice and a BLE thread.

  2. uint8_t ble_neppi_add_char(uint16_t UUID, char_descr_t descriptions, uint16_t initial_value);

    Adds a new characteristic. NOTE: char_desrc_t descriptions is currently unused. All characteristics share the same configuration.

  3. void ble_neppi_start(void);

    Starts the BLE thread execution. NOTE: Call this only after all characteristics have been added.

  4. void ble_neppi_update_char(uint16_t UUID, uint16_t new_value);

    Updates the value of a characteristic.

The PR also includes a test in the form of the main.c file . The program initializes the LEDs, and then starts up BLE with 3 characteristics. At this point, the user can connect to the device with BLE using for example nRF connect. The first characteristic sends button press data to the client, while the last two characteristics receive hue and intensity values from the client. The LEDs automatically loop through the color circle while the device is active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant