My group is working on our marble sorting project where our machine needs to be able to sort 15 marbles of three different compositions wood, glass, and metal. They are all the same size and we need to have two sensors currently we only have a light sensor. We want to also have a way to see if the marble conducts electricity however we need help on how to build and code this so it can tell whether it is or is not a metal marble. We are using vexcode v5 for this project. Any thing will help like advice or suggestions. Thank you so much.
Go back to the first thread you started on this.
First off, try not to make multiple topics on the same issue. You already made one here.
As for your question, electricity might not be a very good idea with VEX V5. The metal parts will conduct electricity and might damage your electronics, as well as potentially being dangerous to you too. The light sensor, on the other hand, can actually be all you need to determine what type the marble is. The metal marble would be very shiny (bright to the sensor), the wood marble would be less shiny (darker to the sensor), and the glass one is clear, so a piece of tape behind the marble would determine how bright it is to the sensor. Based on this, you can determine which marble you have with only the light sensor’s light level output. Depending on the conditions, you may also need a light source.
This might be (probably is) an incredibly stupid idea, but you could cut & strip a 3-wire cable and separate the power and ground (red and white according to the vex library) to test for conductivity and set it as a digital in.
Disclaimer
This idea includes connecting bare wires to your vex brain. It naturally includes the risk of shorting something out. I am not responsible for any damage to your vex brain.