We are currently working on a device that would realize a kind of "Remote BarCode" Scanner. So we have a pico that emulates a Keyboard and the devices is connected through Wifi to a Mqtt Server. As we have know-how with Arduino IDE we used this for the small script. For the Hardware we are using the Pico W Version.
Here we use :
#include "Adafruit_TinyUSB.h"
#include "TinyUSB_Mouse_and_Keyboard.h"
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include "WiFi.h"
Anyway the main problem is, that working with either Keyboard OR Wifi will work perfectly, but once working in the same script something goes wrong. E.g. the keyboard is not recognized or the wifi will not connect ?!? So I assume there is a conflicts (e.g. in resources or interupts) which Wifi and Keyboard (actually HID Usb Device) are sharing ? Even more weird I have Win11 Box here which works, we the devices are "started" in a certain order, and other boxes where the setup does not work at all. Anyway separated samples with Keyboard or Mqtt/Wifi are always working ...
Hard to debug, but any though where the conflicts comes from.
Any help is welcome