I have banana pi m2 zero, I need to use it to only get accelerometer data and post it to a remote server.
I'm wondering if there is any version of ubuntu which I can use it.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Ubuntu does not support this device. Ubuntu also does not support Raspberry Pi 0/1, whose specifications are similar to Banana Pi Zero.
According to http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO, it works with Debian Stretch and Raspbian Stretch. You can use them instead, their user experience would be very similar to Ubuntu, as Ubuntu is also based on Debian.
You can also try the armhf (32 bit ARM) version of Ubuntu server for RPi2, but since this is not an officially supported device, I doubt whether it would work.
An unofficial port of a minimal image of Ubuntu 20.04 is available at https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal/releases/tag/v3.10.