# voxl-gpio not working as expected

Source: https://forum.modalai.com/topic/612/voxl-gpio-not-working-as-expected
Category: Development Drones (https://forum.modalai.com/category/44/development-drones)
Tags: m500
Posted: 2021-12-15 21:51:51 UTC by Matthew Howlett
Replies: 2 · Views: 875

## Matthew Howlett · 2021-12-15 21:51:51 UTC

I have tried all the listed GPIO pins exposed on connectors J7, J10, J11 and J12.
Why can't I write to a GPIO pin?

![36a9209e-18d1-4d13-a291-0dd271767ae1-image.png](https://forum.modalai.com/assets/uploads/files/1639604969140-36a9209e-18d1-4d13-a291-0dd271767ae1-image.png)

## Reply by Alex Kushleyev (ModalAI staff) · 2021-12-16 19:05:15 UTC

Hello Matthew,

When you execute `voxl-gpio write`, it configures the desired pin to OUTPUT mode and sets the desired state (0=low or 1=high). When you execute `voxl-gpio read`, the pin is configured as INPUT with a pull-up, so any previous pin state is no longer applicable. If nothing is connected to the pin while it is configured as INPUT, it will read 1 due to the pull-up.

If you would like to test the pin `read` and `write` functionality, you could set up a loop back connection, where you connect two pins together and you write one pin and read another. 

I hope this helps

Alex

## Reply by Matthew Howlett · 2021-12-16 21:41:22 UTC

Great, thanks for the info. I suspected something along those lines.
