m0065 connecting a sensor
-
Hi Modal AI Team.
I was wondering how I can connect inputs like sensors to voxl2 to read and process data. My current attempt is through m0065, the voxl2 io expander board but i dont quite get how i can flash the board to control and read the pwm channels (which i believe to be the only gpio available)..
Please let me know if this is even feasible at all.Thanks in advance!!
-
@andrevs01 , what sensors are you trying to connect to VOXL2? M0065 board is only used for PWM output and RC input (Sbus).
https://docs.modalai.com/voxl2-io-datasheet/
Alex
-
@Alex-Kushleyev Hi. Sorry for the delay in my response.
Currently i would just like to know how do i flash the board with my code to control a simple servo motor, or the luminosity of an led... What's the best approach to do that? I can't find any information on the SDK regarding the I/O expansion board.Later on, I would like to connect solenoid valves (On/Off) (i don't require a pwm output but that is the only I/O I have access).
-
The documentation is available here:
https://docs.modalai.com/voxl2-io-datasheet/
https://docs.modalai.com/voxl2-io-user-guide/
https://docs.modalai.com/voxl2-io-firmware/We do not provide a way to flash the board with your own code (although you could do it if you REALLY wanted to, since the board uses a standard STM32 processor).
For your use case, are you using PX4 or not? We normally control M0065 PWM outputs from PX4, but it is possible to do it without PX4.
Alex
-
@Alex-Kushleyev Thank you for the quick response Alex.
I don't necessarily need to develop my own code and flash the board, it's just the method I am familiar with working with previous uC...
But if I were to implement my sensors/pwm outputs through PX4 what would be the recommended steps to do so? Is there git libraries already available for it? If so, can I still change code snippets to operate under my conditions? or parameters in Qgroundcontrol?
Sorry if I am not clear with my questions but I'm pretty new to these types of complex architectures...Thank you again Alex and the Modal AI team
-
The documentation links I provided describe how to get M0065 board running in PX4 as a standard actuator that supports 8 PWM outputs.
If you are familiar with PX4, GCS, Actuators, then look through those documentation pages and follow the setup.
However, i don't have the full information about your hardware, so i don't know if you need some customizations:
- are you using voxl2 on a flying drone? if so, are you using a modalai ESC or another ESC?
- Are you planning to use M0065 board to generate pwm output for your ESC (if you are using a standard ESC that accepts PWM as control input)
- do you need to use PX4 for your application? the reason why I ask is that you can use M0065 pwm outputs without PX4 if you don't need PX4 at all.
Alex