Folks, have read the post from earlier this year (BrickPi documentation), especially JohnC’s response. Is there any update, or is it still the case that there is not an official API description for the Python programming interface for BrickPi? If not, I highly recommend that someone take a crack at writing such a document.
I know sample code is available. It’s helpful, but not exhaustive in describing how the various device controls can be used. And, yes, the source code for the Python library is available, but understanding it requires reverse engineering that code and the “firmware” on the two Arduino processors on the BrickPi board, even all the way back to reverse engineering the Lego hardware, certainly not a worthwhile endeavor.
For example, In the case of moving the large motor, it appears that all rotation arguments are treated as integer degrees. Is this consistent with the physical resolution of the optical sensor in the Lego motor? If not, roundoff errors can accumulate over multiple moves. Is it possible to read the current motor position? (Didn’t see a function for that.) If it is, is it absolute or relative (to the power-on position). {Note: the Lego EV3 programming environment provides a motor position reader function and a reset function, which is not definitive on the relative vs. absolute question). Also, the motor driver code uses a reverse-direction current pulse of specified time duration to bring a moving motor to a stop. The duration is hard-coded in the driver. Why isn’t it exposed via the Python API? I suspect it needs to be modified under different load and power conditions.
For the sensors, questions abound, both about the raw performance of the Lego devices and how their output is handled by the BrickPi device and library.
In summary, kudos on a great device with great promise, but apparently limited by a lack of documentation. Am I missing something here?
TIA,
Mike