We want to wire up some small LED strips to our Romis as a programming exercise for new students. We’ve used DotStars before with success on larger robots. Traditionally DotStars are run off of Arduinos, and the Romi control board is technically an Arduino, with exposed DIO pins. So far so good. However, while WPIlib gives access to the DIO pins (DigitalOutput), the FRC execution environment is different, with code running in the simulator… on a remote laptop… communicating via WebSockets… with the integral Raspberry Pi.
We’ve located a Java library for the DotStars, but the writing mechanism will need to change. As a final impediment, the Romi docs seem to indicate that using two DIO channels (as DotStars require) may not be possible/supported.
Anyone done this? Would we be better off using something like a NeoPixel strip since those require one DIO connection?
The Romi I use is at school so I can’t verify my statement but I think you can use the configurable GPIO pins.
When you configure their use you see what the port ID is to use. configure external pins
Yes, thanks. We understand how to configure and use the configurable GPIO pins. Our question is, can we use two GPIO pins to control a DotStar array? DotStars need two pins (clock and signal, if memory serves). NeoPixels are similar but only require one pin… yet their precise timing requirements probably disqualifies them from working in a Romi setting.
We’re just looking for some way to hook up external LEDs to the Romi for status signaling.
I have modified the WPILib Romi firmware in the past to add Neopixel library support, and mapped it to one of the extra GPIO pins. It worked alright, but needed more work to hook the LEDs up to a network table entry or something.
I’m sure you can make this work for any similar LED setup if you have a good arduino library for it. Look for spare GPIO pins inboard from the five configurable ones on the corner of the controller board, and make sure you have native PWM support on your chosen pin(s) if needed.