My students want to use color sensors on the balls while they’re inside the robot. I am mostly a MechE. Help?
Starting from, “I shouldn’t use onboard or MXP I2C based on these bugs”, and “I only know about Arduino variants”, are any of these architectures a good idea? Or is there a better one?:
Arduino Due for 2x I2C input lines https://docs.arduino.cc/hardware/due
It seems like a lot of board footprint when I could multiplex, since I dont need the information arriving simultaneously, and I could borrow Will’s circuit.
Arduino Uno for 1x I2C input, multiplexed
Good news: Plenty of IO options, I2C availabilitiy guaranteed on arduino.cc, Will’s already designed and tested a multiplex circuit I can “borrow”
Bad news: Still really bulky for two sensor readings?
Arduino Nano claims to have I2C but doesn’t list it on the official pinout drawing, but Random Blogpost says use SDA>A4, SCL>A5? ??? I can’t find this documented at arduino.cc though
If that’s real, this seems like both the cheapest and smallest way, again assuming I multiplex the input with Will’s circuit.
There may be communication to RIO issues here that I’m not thinking about, but there are at least 4 DIO available I could use to transmit boolean information.
NEXT PROBLEM, Information to the roboRIO?
Is there a “good way” to communicate to the RIO with Arduino, and forward entire readings?
Fortunately we have a bunch of DIO available on our RIO, so I’m thinking something dumb like just have the Arduino sketch raise and lower four DIO flags (“Red@Sensor 1”, “Blue@Sensor 1”, “Red@Sensor 2”, “Blue@Sensor 2”), instead of actually connecting and forwarding whole readings?
I’d have to get the tuning right and then be comfortable Never Touching The Black Box Again, rather than being able to see live readings in code.
Has anyone else used the Rev Color Sensor in various lighting conditions before? My nightmare is we get it tuned in the lab and then lighting differences wreck our performance on field, and then I cant see that because I’ve hidden all the real sensor code in an Arduino sketch giving me booleans instead of readings on the RIO…