Jump to content

Beta version of the C/C++ bindings for microcontrollers


Recommended Posts

ATTENTION: Arduinos with an AVR microcontroller (for example the Arduino Uno or Mega) use a logic level of 5V. Bricklets use a logic level of 3.3V. A level shifter is required between the Arduino and any bricklet.

Edit: Here's the official documentation.


After multiple customer requests to be able to control Bricklets directly with a microcontroller, I've spent the last months creating bindings to be able to do so. The first beta version of the C/C++ bindings for microcontrollers are attached to this post. With them you can control Co-processor bricklets using for example an Arduino over SPI.

The bindings are separated in a common implementation and Hardware Abstraction Layers (HALs) for the specific platforms. At this time a HAL for Arduino AVR and ESP32 boards and a HAL for the Raspberry Pi (Zero) with a Hat (Zero) Brick are available.

Further information about the interface of the bindings, and on how to implement custom HALs for other boards can be found in the documentation.

In the future there will be additional hardware for the bindings: An ESP32 based board on that programs using the bindings can be executed, as well as a new Breakout board that allows connecting multiple Bricklets to a micro controller.


Edit: Beta 8 with the following change:

  • Fixed a bug where callbacks stopped working after 35 minutes

This will probably be the last beta version. However the beta phase will continue until the hardware for the bindings is released.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...