I made an Erlang interface for the BrickPi using the erlang-mini package. The actual interface to the BrickPi is still done through the C, and then I use Erlang’s port mechanism to communicate with the C program. The build process may be a bit manual, but it seems to work well. I have tried killing the port process while it is running and Erlang restarts it like it should, the robot barely stops moving.
The source code to the port, the Erlang brickpi process, and a sample robot application (with an OTP supervisor, and the logic implemented as an OTM gen_fsm) is at