I'm currently working on a project in which I have a USB sensor/device that I want to convert to transferring data wirelessly using BT to my computer. I don't want do to any processing of the data received on the board; just read it and send it.
At first this seemed like a simple enough problem but I've been struggling to find a straight forward solution to this, any advice would be appreciated. Thanks.
Which Arduino do you have? What sensor are you using?
Does your computer have Bluetooth already built in? Will you need a usb bluetooth adaptor on the computer
An HC05 is very commonly uses as a BT module. It can be paired with the Bluetooth on the computer.
If you have a android phone which can connect to Bluetooth, you can develop the code with the phone and the arduino/sensor/HC05 without having to deal with any issues of bluetooth on the computer.
Since you don't say much about it, item 1 needs to be addressed. Can your Arduino host a USB device? Not many do so you are likely to need a USB host shield.
For informed help, please read and follow the instructions in the "How to get the best out of this forum" post, linked at the head of every forum category.
can you give further details of the sensor/device, e.g. a link to a web page?
things to consider
to be able to plug the device into a microcontroller USB port and access data for transmission over bluetooth the microcontroller will require a device driver - question does one exist or will you implement one?
the microcontroller must be capable of acting as a USB host, e.g. a ESP32-S3-DevKitC-1
the simplest approach may be to use a Raspberry Pi which has multiple USB ports and supports Bluetooth - this assumes there is a device driver for the PRi
Sorry I should've included more information from the start but was initially looking for general information/leads.
To be more specific; for this project I'm using an esp32 devkit which I've already connected to my computer via BT and successfully sent commands to (using the BLE Keyboard library). The sensor that I'm looking to get data off of is an optical sensor from a mouse. I've torn down a couple of them to see what ICs they use and find the data sheets. I know what the pinout is and am looking for a way to get data over the D+/- pins but have struggled to find many cases in which others have done this.
I don't want to do anything with the data on the esp32 other than pass along this data over the BT connection. I've seen a couple things about setting up a software USB host on the controller but not sure how to implement that let alone a driver. Thanks.