VOXL2 unused/repurposed GPIO
-
@Vinny actually, I am trying to use Pin 9 to drive a MOSFET switch as a simple on/off.. I won't need it to "switch" quickly.
Now that you mention that pin 9 is actually a power rail, I would like to explore if it is possible to use this pin directly to drive my load of around 200mA.
Would that bust the 1A (is this refering to the entire 3V3 load on the board?) limit specified in the docs?
-
@hmlow yes 200mA is fine. That amount won't barely stress anything. Keep in mind, that power rail is for RC, so if there are any bind or reset functions executed related to RC, that rail might toggle so be sure you investigate all options before you commit to using that long term.
If you wanted to explore other GPIO controls as your original plan, our software engineer pointed me to this page about rebuilding the kernel for any permanent changes you need....
https://docs.modalai.com/voxl2-kernel-build-guide/
Hope that helps. -
Hey, trying to do something very similar myself.
Can't seem to toggle pin 46 on the VOXL2 J10. Following docs.modalai.com/voxl-gpio-io I run into the following:
voxl2:~$ echo 46 > /sys/class/gpio/export -bash: echo write error: Invalid argument
Eventually, I'd like this to match the state of a radio remote control switch to kill another board's power supply. Maybe through ROS
but preferably not. Can you guide me through it please? -
@Filip-Slezak That doc is for VOXL1, see here for info on VOXL2: https://docs.modalai.com/voxl2-linux-user-guide/#gpios
-
@tom said in VOXL2 unused/repurposed GPIO:
Indeed, thanks for the fast reply. I also just ran into the
bind.c
here https://forum.modalai.com/topic/1466/voxl2-gpio-and-serial-interfaces/3 and turns out I didn't account for the chip offset. How do I figure out which one to use? In this case it was 1100. This should now be a permanent setting right?To modify those from code I could copy the
_gpio_control
function above and use it in a ros package, right? I am looking for a clean way to do this. Please tell me if there's a better way to directly toggle based on radio signal.Also, I can't find any python code examples, are there any?
-
def gpio_init(pin): with open("/sys/class/gpio/export", "w") as config: config.write(str(pin).encode()) return def gpio_exit(pin): with open("/sys/class/gpio/unexport", "w") as config: config.write(str(pin).encode()) return def gpio_set_mode(pin, direction): with open("/sys/class/gpio/gpio{}/direction".format(pin), "w") as mode: mode.write(str(direction).encode()) return def gpio_set_value(pin, value): with open("/sys/class/gpio/gpio{}/value".format(pin), "w") as gpio: gpio.write(str(value).encode()) return
-
Hi @Vinny
An expansion board to access the GPIO pins in J3 and J5 connectors would be extreamly helpful.
Are there any updates on the designing front? Really looking forwards to this option.Yours sincerely,
Jyothish. -
Hi @Jyotish-Kumar
Yes! We just sent the board for fabrication yesterday!
I'm hoping to get a page up soon to explain it and post the schematics and usage.
Please give us a month or so enabling us to validate it before making it available.
Thanks -
Hi @Jyotish-Kumar
Our design is being assembled and we expect to have it in our hands next week for initial bring-up. Keep an eye out for website purchase links.
Hope this helps you out!!!
https://docs.modalai.com/voxl2-dev-test-board/ -
@Vinny Great!
So happy to hear about that. Looking forwards to its availability on store soon.Warm regards,
Jyothish.