Sunday, March 3, 2024

Getting a wierd image when urgent buttons in a USB keyboard related to the Arduino GIGA R1

I’m utilizing the next code:

#embody "USBHostGiga.h"

Keyboard keyb;
HostSerial ser;

void setup() {
  // put your setup code right here, to run as soon as:
  whereas (!Serial);
  pinMode(PA_15, OUTPUT);

void loop() {
  if (keyb.out there()) {
    auto _key = keyb.learn();
  whereas (ser.out there()) {
    auto _char = ser.learn();

from right here:

I’m utilizing Arduino GIGA R1 on which I’ve related a USB keyboard and I press buttons. I see the outcomes on the Serial. Nevertheless, I face the next drawback: After I press a button, aside of the letter I get additionally a sq. subsequent to it. For example, as an example I press the ‘A’ letter. Within the serial I get ‘A’ letter + a sq. image. After I press ‘B’, I get ‘B’ + a sq. image, and so forth. I’m attempting for two days to repair it, I attempted to learn the button as a char array with two positions and delete the [1] the place the sq. ought to be, however nothing labored. The auto kind may be very unusual with the intention to make a sort casting, as a result of the Arduino IDE constantly exhibits me error. I can’t discover a option to take away the unusual ‘sq.’ ASCII character which I take with every letter pressed…The one issues I observed is that the sq. ASCII character is displayed the time I launch the keyboard button, and likewise it delays to seem after I improve the delay ms within the delay(...); command. Has anybody any thought clear up this?

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles