How to use non vex sensors (Humidity and air quality)

Ya you just wire 5v ground and a data pin between V5 and gpio on arduino. And every 10ms, set the pin to the data you want to read.

@vexvoltage has an excellent point though. We can just make the “logic” that decides what humidity is okay on the arduino and instead of sending over all the data just send over a single bit “good” or “bad”.

Ok, I will try that and let you guys know how it goes soon.

I just want to make sure you know that V5 vision sensor does not let you process raw image data on V5 brain at the moment. It works by taking signatures of the desired (color) codes for the objects you are looking for and then returns an array of coordinates for several easily recognized (large) objects matching those codes:

1 Like

This will certainly work, but using dedicated DAC board or hard to tune R-C filter on Arduino PWM outputs just underscores awkward limitations of the V5 design. We might just as well connect a servo to the Arduino PWM output and have it drive potentiometer plugged into V5 legacy port. :slight_smile:

For the sensor setup, the ideal solution would be if V5 legacy port co-processor had a mode when two of the pins could be assigned to Serial or I2C interface, just like pair of them could currently support quad encoders.

Or better yet, if VEX opened up the firmware of that co-processor to PROS team or any other 3rd party developer which could enable custom communication modes for various devices.

This will not only make the life of the VEXU teams easier, but will increase the interconnectivity and value of V5 as the prototyping platform by a lot.

1 Like

Yup, I know. Thanks for telling me.

1 Like

While not completely trivial, it is pretty easy to communicate with the V5 over a smart port. All the major programming solutions (VCS / VEXcode, RMS, PROS) support (or will support) generic serial communication over the smart ports. You just need a RS-485 to UART chip like this one (comes in a DIP package so you can just put it in a breadboard) and then whatever microcontroller (be it arduino or otherwise) you want.

The PROS API for this hasn’t been released yet (it’s already been finished and tested and will be included in the next release, you can find the header / documentation for the C API here and the implementation here), but both VCS / VEXcode and RMS should work without issue (though, I haven’t personally tested RMS, so I’m not sure that it’s working). If you really want, you can get it to work in PROS right now by declaring some of the vexOS functions as extern and calling them directly.

4 Likes