if you prefer python for a start
Adafruit has a stm32f405 feather express (rather pricy, but that it is a fast microcontroller has 1 Meg flash and 512 k sram, deemed generous among microcontrollers, and lots of on-chip peripherals)
https://learn.adafruit.com/adafruit-stm ... er-express
that one can run circuit python (see the guide) or micro python\
it works with stm32duino (in the guide) and as follows
(stm32f405 has on chip hardware crypto if you are looking for that, but I've not tried it
https://www.st.com/resource/en/referenc ... ronics.pdf
)
for stm32duino (STM core) the repository is here
https://github.com/stm32duino/Arduino_Core_STM32
and a wiki is here
https://github.com/stm32duino/Arduino_Core_STM32/wiki
For stm32duino, it is recommended to get at least stm32f401ccu or stm32f411cxx as this has more ram and flash like 64k SRAM and 128k flash
https://www.st.com/en/microcontrollers- ... 401cc.html
https://www.st.com/en/microcontrollers- ... 411ce.html
and has a FPU on chip + it has on chip cache (branded as 'ART accelerator'), that can speed up in flash codes like from several wait states to like 0 wait states if the code is in cache. so stm32f4xx are faster than stm32f103xx and other m3 chips for the same MHz.
More flash (for code storage) and SRAM are also important as the stm32duino core has a bit of 'bulk' as in part it supports practically chips across the whole stm32 series. The benefit of accommodating that little bulk is that the same sketch made for one chip e.g. stm32f103 can easily be ported to another chip e.g. stm32f4xx, stm32f7xx, stm32h7xx etc by a simple selecting a different board and re-compile.
Assuming that your board has the USB connection setup.
e.g. like one of those 'pill boards'
https://github.com/WeActStudio/WeActStu ... iSTM32F4x1
for Android, I'm not familiar with that, but that STM core (
https://github.com/stm32duino/Arduino_Core_STM32) has USB (CDC) Serial. you need to select that from the Arduino IDE menu and compile/build with that, so that it creates a 'virtual com port' when it is connected to the host e.g. a Windows/Linux PC / laptop.
that can communicate via the usual
style comms.
In the same way for Android, that 'virtual com port' works the same way as USB (CDC) serial while connecting over usb to say an Android phone / device. I did a google search and stumbled into this 'library' maybe you could take a look at it.
https://github.com/mik3y/usb-serial-for-android
There is yet another way which is for 'advanced' users, e.g. I've not yet tried it nor knows how to work that is to get e.g.
https://github.com/stm32duino/Arduino_C ... -64-boards
that P-NUCLEO-WB55 Bluetooth 5 and 802.15.4
https://www.st.com/en/evaluation-tools/ ... -wb55.html
this one can do Bluetooth LE, it is a big win to go fully wireless. But that I've not tried it, hence can't advise ahead of that.
But that it may be worth getting and learning / trying it out.
I'd suggest get a stm32f4xx as above and start with that as it is 'easier' for beginners, given more flash and ram and a better chip (than stm32f103) for a start. the same stm core (
https://github.com/stm32duino/Arduino_Core_STM32) can build sketches for stm32f103c8 (blue pill) though, just that stm32f103c8 normally has 64k flash and 20k sram. and won't have that FPU and fancy 'ART accelerator' stuff.