I was still having issues trying to used the examples on github so I reached out and contacted CTRE. As Marshall stated, they very were quick to respond and help. I am very impressed with their customer service.
So if anyone runs through this same issue I figured I would post the responses here. They updated the example code library for where the Pigeon will now work from a HERO Gadgeteer Port, but they recommend using using CAN either directly or though a Talon SRX for the time being.
The example you’re using was written for the old 4.X Toolsuite, which is why you’re getting errors.
I just updated the example and added it to our current repository - you can find the new example here:
Phoenix5-Examples/HERO C#/HERO PigeonUartGadgeteer Example at master · CrossTheRoadElec/Phoenix5-Examples · GitHub
Keep in mind that the GitHub example above will allow Pigeon <===ribbon===> HERO but it uses a slow 115.2kbps bitrate, and only gets Yaw/Pitch/Roll values. I’m not certain what the effective update rate is but it’s not the 10ms you would see in the better-supported Talon and CANbus use case.
I would say if you just want to grab the YPR values and don’t particularly care at what speed, the UART example is great since the ribbon cable connection is very convenient (no soldering).
But for a robot I highly recommend either CAN connection, or ribbon-cable to a Talon already on the bus.
Let me know if you have any other questions.
Regards,
Jacob Caporuscio
Software/Hardware Engineer
CTR Electronics
Adding to Jacob’s response…
The full serial comm stack is more complex than what’s implemented in SerialClient
That’s why the C# HERO-ribbon-cable example is just an example and not something that we support/integrate in Phoenix-netmf.
That’s also why it falls to 115.2 Kbps instead what the Talon uses for Pigeon (2Mbps if I remember, roboRIO self-test tells you the exact bitrate)
It was meant as more of a test to prove out what would eventually become the serial-uart protocol between Talon and Pigeon.
Long-term we might bring the full stack into hero firmware, and provide an class type that works identical to the Phoenix PigeonIMU class. But it’s not currently our focus.
The example only provides YPR, and doesn’t even have a way to tell if the pigeon has finished boot-cal (4 second boot while still) or if the YPR is stale.
So if you use this, you must ensure the Pigeon settles on boot manually (LEDs) since there is no API-method to determine when the IMU is ready (a requirement of all inertial sensors).
Omar Zrien
Chief Engineer - Software/Co-owner
Cross the Road Electronics, LLC