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

HID KEYBOARD CODE

Hello,

I have posted a question regarding the HID template code for the nrf8001. I would like to say that the progress from your help has helped immensely.

Currently, the roadblock that I am having is assigning different 'keys' to different switches. Heres the snippet of the code:

  Method for sending HID Reports
  */
  if (lib_aci_is_pipe_available(&aci_state, PIPE_HID_SERVICE_HID_REPORT_TX) 
      && (aci_state.data_credit_available == 2))
  {    
    if (digitalRead(0)==LOW)
    {   
    keypressA[2] = 0x04; 
    lib_aci_send_data(PIPE_HID_SERVICE_HID_REPORT_TX, &keypressA[0], 8);
    aci_state.data_credit_available--;
    }
    else if (digitalRead(1)==LOW)
    {
    keypressA[2] = 0x05; 
    lib_aci_send_data(PIPE_HID_SERVICE_HID_REPORT_TX, &keypressA[0], 8);
    aci_state.data_credit_available--;
  }

for some reason I cant seem to assign the letter 'a' or 'b' to these two switches. Also, may i ask for some clarification on the release key '0x00'? I would like to know how I would use it so that it would stop spamming the letter that I am interested.

I am sorry if my question is dumb. I am lost and need some guidance.

Don.

Related