bluetooth - Sending keycode from Bluefruit feather 32u4 LE to connected device -


i new arduino world. problem simple create tutorial can't work.

i've got adafruit bluefruit feather 32u4 , want connect button it. every time button gets pressed feather should send specific keycode (it doesn't matter one) connected device (in case laptop).

i've got button part working i'm stuck bluetooth part. i've used "keyboard.write()", works when feather connected via usb doesn't work via ble. tried serial.println() or ble.println() send data doesn't seem work.

for i'm trying send 1 keycode every 5000ms , that's how code looks like:

#include <arduino.h> #include <spi.h> #if not defined (_variant_arduino_due_x_) && not defined(arduino_arch_samd)   #include <softwareserial.h> #endif  #include "adafruit_ble.h" #include "adafruit_bluefruitle_spi.h" #include "adafruit_bluefruitle_uart.h"  #include "bluefruitconfig.h" #include "keyboard.h" adafruit_bluefruitle_spi ble(bluefruit_spi_cs, bluefruit_spi_irq, bluefruit_spi_rst);  void setup() {   serial.begin(115200); }  void loop() {   keyborad.write(65);   serial.println("serial-test");   ble.write("ble-test");   delay(5000); } 

can point me right direction?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -