How To Add A Component
This content relates to a deprecated version of Mbed
Mbed 2 is now deprecated. For the latest version please see the Mbed OS documentation.
What is a component¶
A component is something that can be used as a building block to build something else. This can take the form of a hardware sensor, software stack, online services and other things that can be used to build up a complete system. A component is the smallest unit of use that can be used to build a bigger system. In a hardware context that means it is a sensor, not a bunch of sensors. In the software context that means it is a single perpheral not a bunch of peripherals lumped together.
Components and the associated libraries, examples and documentation are created and added to the database by mbed developers, component manufacturers and service providers. The goal is to create a canonical database of rock-solid code and resources for every useful component that can be used with ARM microcontrollers.
Component Requirements¶
A component requires both a Library and a Hello World example program demonstrating how to use the library. Typically components are associated with hardware such as sensors or shields, but this is not a requirement. For some simple hardware components a Library may be overkill. Such examples include simple GPIO toggles, Analog Reads or other trivially simple interfaces. For these components it is sufficient to just have a Hello World program which is double listed as both Hello World and Library.
Component Suggestions¶
You are highly encouraged to add details in the notes section of the component. The more information the better. It is also highly encouraged to have sufficient documentation on the code pages for the component, that is not the component page but on the original source repository where the code is published. Please see the Wiki Markup page for more information on how to add formatting to pages. Things like Headings, Notes, inline code, links and images are highly encouraged.
How to Add a Component¶
- Make sure the component Hello World and Library code exist in a publicly visible published repository. It is recommended to publish the component Libraries and component Hello World code in a team account as opposed to a personal account. For example all Seeed components are in the developer.mbed.org/teams/Seeed/code team.
- Go to the Components page and click on the Add a component button.
- Fill out the page, make sure to add a picture, and fill out all fields. The Pinout field should be a link to a wiki document either containing the pinout or to a more in depth wiki about the component if it does not have a pinout. Make sure to put robust notes in the Notes section. Extra code examples, pictures, general documentation is encouraged. If your component does not fit into any existing category please contact the support team at support@mbed.org and we will try to add new categories appropriately.
- Use the Show Preview button to see a preview of the page layout and debug the markup.
- Save the component.