When it comes to the use of microcontrollers in FRC, my main recollection is the @Thad_HousePico, which was used for the I2C color sensor. Apart from that specific case, it is important to note that according to rule R712, microcontrollers are not allowed for controlling any PWM controllers. Instead, PWM controllers must be directly controlled through the RoboRIO as specified by the rules.
In my personal experience, the primary application I can think of for a microcontroller in FRC is for sensors. However, I believe that the RoboRIO typically provides an adequate number of pins for connecting PWM/DIO sensors, reducing the need for additional microcontrollers.
With that said, I am curious to know if you and your team have found any specific uses for microcontrollers, if any.
We looked into using Thad’s Pico implementation for the Rev color sensor on our 2022 robot, but IIRC we ended up using a Raspberry Pi 3B+ instead of a Pico. We used an Arduino Leonardo to make our operator control panel this year. We’ve used Arduinos to teach programming and electrical interfacing. And we considered using the Arduino Nano (or similar) as an LED controller before Thad added addressable LED support to WPILib. One of our mentors has been known to augment his famous costumes and hats with LEDs.
Beyond those few examples, we haven’t used them much. Shame, because it’s such a useful life skill to know how to hack an Arduino together.
Using microcontrollers for gamepads makes sense. My team, 5431, is currently designing a custom button board with a Pico.
My main question is about microcontrollers used on robots.
LEDS makes sense but you could also use a CTRECross The Road Electronics CANdle or REV Blinkin. What custom things have you used a microcontroller for on an FRCFIRST Robotics Competition robot?
That’s about the only solid example I’ve got from stuff we actually did. Stuff we’ve considered includes custom sensor boards (imu, distance, etc.), Off board testing motor controllers (a la thrifty throttle), passive can bus data loggers (not a great idea)…
2357 does some of their sensor processing from microcontrollers. @coderkevin could probably go into more specifics. I think anyone who wants to use an I2C device of any kind should look at ThadHouse’s work as has already been mentioned in this thread.
I’m not software person, but personally, I would rather get a device where I could understand the API like for the blinkin or CANdle, instead of writing a program then connecting to my robot code
But, don’t get me wrong, learning how to code a microcontroller is a great skill, and if you are able to code a microcontroller and connect it with your robot code, go for it, especially since a microcontroller is much, much cheaper than the FRC options that we have
If you just want simple programming then you could eschew the CANdle/Blinkin/Arduino altogether and just wire the LEDs directly to the Rio. It literally could not be simpler than the WPILib implementation.
One other thing we tried to use was this PiMoroni Keybow programmable keypad. It was super easy to program (in micro python) but kept losing its programming unexpectedly, so wasn’t reliable enough for us to use in competition. I’d love to know how to keep it from erasing its script.
Most of my experience using them other than LEDs is sensor-related. While the RIO tends to have sufficient IO, sometimes it can be easier to interface with a sensor using a pre-written Arduino library and pass that data onto the roboRIO. I’ve also had experience with one being used for debouncing a photoelectric sensor used as a tachometer.
I would consider learning Arduino’s FastLED library about as good of a use of time as learning the CANdle library. Blinkin is a lot simpler and much more limited than either out of the box, but you can modify the firmware to write in custom patterns, and at that point…