I’m very new to programming, so I’m sorry if some of this doesn’t make sense or sounds silly!
I’m working on a project and I wanted to use a VEX flashlight like the one here and it seems like it was intended to be used with the vex microcontroller instead. I’ve been looking, but I can’t seem to find any instructions online that explain how to use the flashlight with the V5 brain.
Can the flashlight even be used with a V5 brain? If it can, how would I do that? What port would I put the flashlight into? What device would I select for it in VEXCode Pro V5? How would I program it?
Thanks for replying! I saw that thread, which helped me to realize that I should be using a motor controller. But from there, when I’m adding a device under the Robot Configuration tab in VEXCode, what do I choose? How do I go about programming the flashlight using pwm_out? I need an explanation that’s a little more in-depth.
// set pwm output for the Flashlight
Flashlight.state(100, vex::percentUnits::pct);
I replaced B with the correct port that the flashlight is plugged into. I’m not exactly sure where that first line fits into my code. Should some of it go before the initialization?