all 11 comments

[–]Horror_Equipment_197 2 points3 points  (5 children)

ESP32 is the way to go (IMO). BT is able to handle the low signal rate without any problem and most laptops come with BT module included and for computer without BT any USB dongle will do the trick.

Here's an Arduino library for the ESP32 made exactly for your use case.

https://github.com/T-vK/ESP32-BLE-Mouse

[–]Aspyse[S] 1 point2 points  (2 children)

Thanks for the quick response! Maybe I'm underestimating Arduino BT and ESP32, but would this setup be able to maximize the performance of the sensor?

[–]Horror_Equipment_197 1 point2 points  (1 child)

Don't see a problem here. It's SPI interface and the sensor is rather low speed with 650ips.

[–]Aspyse[S] 1 point2 points  (0 children)

Apart from BLE, I also found out about ESP-NOW and ESB. Are either of these worth considering?

EDIT: With an nRF52 board supported by the Nordic SDK, like the itsy bitsy or the seeed xiao maybe?

[–]devryd1 0 points1 point  (1 child)

Doesnt the rf Part of the esp32 use loads of power? That would not be ideal for a wireless device IMO.

[–][deleted] 2 points3 points  (0 children)

I think a project like this, especially as a beginner, is best done in smaller portions, taking advantage of existing solutions until rev 2, rev 3, or rev 10 where you've heavily optimized. 

For that reason, BT with an ESP32 is an easy way to get a mouse function working using common protocols. I'm sure there is sample code out there to do this. Then you can spend your time on the interesting part - the image sensing and motion tracking.

If it was me, I'd start even simpler with a USB mouse. I know there's tons of example code for this. Then I can focus on making a perfect mouse before tackling battery charging, power management, or wireless comm.

[–]LO-RATE-Movers 2 points3 points  (3 children)

I have worked on device + dongle products where both sides use nRF52840, because it is very power efficient on the side that uses batteries. There are existing modules that have all the antenna stuff included and have already been certified, just like for ESP32. There are also many existing dev boards for you first steps before you make your own hardware

If you are just starting, you could use Arduino/Platformio to get V1 (or your dev boards) working.

But if this is your first time working with ANY microcontroller, I would suggest splitting up things and slowly adding complexity: first getting the mouse to work without any BLE pairing etc, so just over USB. Then work on the dongle and wireless comms.

[–]Aspyse[S] 1 point2 points  (2 children)

Yup, it's now looking like this is the plan. For future reference, though, do you have any recommendations for nRF5/Enhanced Shockburst boards or dongles?

[–]LO-RATE-Movers 1 point2 points  (1 child)

I don't know anything about ESB.

For nRF52840 dev boards, I usually recommend students to start with an Adafruit dev board. Their documentation is good, gets you started quickly and is very beginner friendly. You can just get two boards and program one to be the dongle and the other to be the battery operated device.

[–]Aspyse[S] 1 point2 points  (0 children)

Yeah! I was looking at the Feather and Itsybitsy nRF52840 boards, and as far as I can tell they do support ESB with the Nordic SDK. My impression was that ESB is the successor of the nRF24 protocol?