Announcement

Collapse
No announcement yet.

Black box implementation of two Adafruit RGB Sensors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Black box implementation of two Adafruit RGB Sensors

    Hi,

    I will very soon be working with two Adafruit RGB sensors for color detection. I have gotten one to work fine, but I don't know how to do it for two, since there is some fancy I2C stuff going on and though I would love to, I don't have any time to learn about all of this complicated and convoluted stuff. I was wondering if someone could provide a "black box" implementation for how I could use two RGB sensors, just like Alan provided one for the IMU here: http://ftcforum.usfirst.org/showthre...ll=1#post19101

    This way all I have to do is copy a couple of files into my opmodes folder and have a simple example to follow to implement it in a standard opmode. I know there are many talented programmers out there who understand these different fancy protocols and terms and what not, and I would greatly appreciate it if some of that knowledge could be shared, especially since I believe there are plenty of other teams out there who probably know less than I do and are just trying to get through it. I am aware that I believe I have to do some sort of I2C address change, though I have exactly -10 understanding of how to do that.

    Thank you for your help!
    Programmer for Team 4997 Masquerade -- 2012 World Champions, 2014 - 2016 Division Finalists
    Founding Member of Team 6433 Neutrinos -- 2015 World Champions

    Check out my intro video to the new tech platform
    Check out my team's Robot Reveal for Res-Q

  • #2
    After reading some more on this, I believe that it is not possible for the Adafruit RGB Sensor to have its I2C address changed. This would mean that I would need a separate DIM for each RGB sensor, which is just not feasible. Is there any way to make multiple of these sensors work on a single DIM? I am wary of using the MR Color Sensor due to the issues others are bringing up about it on the forum and its high price, though it is my understanding that any number of these can be put on a single DIM, just by doing some magic I2C address changing, which I know nothing about. Does anyone know of any cheaper but good quality color sensors that can be run simultaneously on the same DIM? Thanks!
    Programmer for Team 4997 Masquerade -- 2012 World Champions, 2014 - 2016 Division Finalists
    Founding Member of Team 6433 Neutrinos -- 2015 World Champions

    Check out my intro video to the new tech platform
    Check out my team's Robot Reveal for Res-Q

    Comment


    • #3
      Varun,
      Looking at the TCS34725 spec sheet, it does appear that the I2C address cannot be changed.
      Good luck!
      Martin Haeberli
      Mentor, FTC 7593, TigerBots

      Comment


      • #4
        If this is the case, the following from AdaFruit would really be helpful, if you require multiple of these devices: https://www.adafruit.com/products/2717.

        Comment


        • #5
          I have done a lot of experimentation with that I2C multiplexer and it works fine. I have Teensy as the master for the multiplexer. The other I2C port in Teensy is connected as a slave for the FTC DIM.

          It is sad that FTC is not allowing Arduino in RES-Q season. Perhaps next year

          Comment


          • #6
            Thanks for the link dmssargent! I think I will get one of those. However, I have no idea how to program it. I don't understand any of the I2C writing or reading or this thing about addresses or stuff like that. Could someone perhaps sketch out a class I could use for this? Thanks!
            Programmer for Team 4997 Masquerade -- 2012 World Champions, 2014 - 2016 Division Finalists
            Founding Member of Team 6433 Neutrinos -- 2015 World Champions

            Check out my intro video to the new tech platform
            Check out my team's Robot Reveal for Res-Q

            Comment


            • #7
              Originally posted by dmssargent View Post
              If this is the case, the following from AdaFruit would really be helpful, if you require multiple of these devices: https://www.adafruit.com/products/2717.
              Is this going to be legal?

              <RE06>

              b. Sensors
              i. Sensors from any manufacturer may be connected to the Core Device Interface Module.

              d. Other electronics are not allowed

              question 2 in the electrical answer thread:
              http://ftcforum.usfirst.org/showthre...-Answer-Thread

              Comment


              • #8
                I will ask on the Official Forum and get back with the answer. Thanks FTC3805!
                Programmer for Team 4997 Masquerade -- 2012 World Champions, 2014 - 2016 Division Finalists
                Founding Member of Team 6433 Neutrinos -- 2015 World Champions

                Check out my intro video to the new tech platform
                Check out my team's Robot Reveal for Res-Q

                Comment


                • #9
                  Originally posted by FTC3805 View Post
                  Is this going to be legal?

                  <RE06>

                  b. Sensors
                  i. Sensors from any manufacturer may be connected to the Core Device Interface Module.

                  d. Other electronics are not allowed

                  question 2 in the electrical answer thread:
                  http://ftcforum.usfirst.org/showthre...-Answer-Thread
                  I would agree that such a device appears illegal this season, judging by the linked forum ruling that "manufactured sensors must connect directly to the Core Device Interface Module."

                  Comment


                  • #10
                    I have a feeling that FIRST will consider this sensor to illegal for this year, being fearful of alienating teams that have limited budgets that already have to buy this control system. They also seem to be fearful of additional processing power on top of the robot controller. However, if this has a microprocessor they capabilities of the processor as exposed is severely limited. If I remember correctly, the reason for disallowing the HiTechnic sensor multiplexer was because the programming would be too difficult given the time remaining to release the new control system.

                    As this electronic component is off-the-shelve, limited in the freedom of its capabilities, and inexpensive it will probably be allowed sooner rather than later, however as I am more time-constrained, I have no use for such a device until my team potentially gets past a regional, therefore I really have no reason to ask the game designers about this, except to be gracious, and it has been stated previously in this thread that someone else will ask.

                    Comment


                    • #11
                      Originally posted by dmssargent View Post
                      ...being fearful of alienating teams that have limited budgets that already have to buy this control system...
                      I would have opted for a different method of ensuring budget fairness, that I've seen in other places. Teams should be able to buy and place whatever they want on the robot (as long as it passes safety inspections, such as not having extremely sharp edges or being electrically unsafe, and it doesn't generate opponent-affecting interference, as could be tested quantitatively, and uses the Android devices as a central point of communication), but they would be required to present a bill of materials with a max cost less than or equal to some value. Teams can buy however much they want in terms of tools, etc, but any non-TETRIX/MATRIX/MR parts that make it onto the robot must be counted in such a BOM and total under the presented budget guideline (with limits on numbers of MR/Tetrix/Matrix parts as before).

                      This would a) not alienate teams with a reasonable budget, as compared to well-funded teams, and b) not alienate teams that might have trouble adjusting to the Java system (especially for things such as sensors and realtime processing, which are both great points of difficulty as evidenced by this forum), and that might have parts of that nature on hand. It would also allow far more creativity in designing and engineering these robots.
                      FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
                      Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

                      Comment


                      • #12
                        Originally posted by Ollie View Post
                        I have done a lot of experimentation with that I2C multiplexer and it works fine. I have Teensy as the master for the multiplexer. The other I2C port in Teensy is connected as a slave for the FTC DIM.

                        It is sad that FTC is not allowing Arduino in RES-Q season. Perhaps next year
                        Where did you see that Arduino isn't allowed?

                        Comment


                        • #13
                          Originally posted by zwork View Post
                          Where did you see that Arduino isn't allowed?
                          The FTC Forum: "manufactured sensors must connect directly to the Core Device Interface Module" and "this rule also precludes the use of...microcontroller boards."

                          Comment


                          • #14
                            Originally posted by zwork View Post
                            Where did you see that Arduino isn't allowed?
                            Item #1 on the disallowed parts list (top of pg 25) :

                            http://www.firstinspires.org/sites/d...parts-list.pdf

                            Comment


                            • #15
                              Hi,

                              The GDC officially ruled that I2C multiplexers (in particular the one in question) are allowed: http://ftcforum.usfirst.org/showthre...ll=1#post22302

                              This brings up the question if anyone knows how to use it with the FTC system. I have not worked with Arduinos, and have absolutely no idea how the I2C stuff works (though I would love to, I simply haven't got the time to spend on it). I have, however, been able to get our Bosch BNO055 IMU (Adafruit) to work thanks to AlanG's generous donation of his code. I am hoping that someone would be able to show me how to do this in a simple way, or if someone else uses it, if they could please upload a "black box implementation" like Alan did for the IMU. Thank you very much!
                              Programmer for Team 4997 Masquerade -- 2012 World Champions, 2014 - 2016 Division Finalists
                              Founding Member of Team 6433 Neutrinos -- 2015 World Champions

                              Check out my intro video to the new tech platform
                              Check out my team's Robot Reveal for Res-Q

                              Comment

                              Working...
                              X