Particle Xenon read battery with mbed

Yes, I am using the JST connecotor.
I assume you are using arduino framework? maybe thats a difference… I dont get why it doesnt work with mbed though.