A fully functional code library with many implementations of electronic components to ease readability and modifications for future changes. Made with C++ OOP with .h-only files
- REQUIREMENTS
- DESCRIPTION
- DISCLAIMER
- DEFINITIONS AND NAMING
- EMOJIS
- INSTALLING
- UPLOAD
- TESTS
- ENVIRONMENT VARIABLES
- COMMANDLINE
VSCODE - https://code.visualstudio.com/
PlatformIO - https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
This project started as a learning process for a VSCODE extension called PlatformIO IDE
.
The biggest incentive was to migrate from Arduino IDE to a more robust code editor.
The codes found here are just pieces I wrote for my personal projects and felt like it could be useful later.
Most of it may or may not be bad examples. They work for my purposes and are all results of a good amount of time spent re-learning C++ and it's compilers.
The code uses dynamic allocations
since I am applying SOLID
principles to the code base.
I do know that many developers are against use of OOP for embeeded microchips, but the code does not aim to be the final form of anything. And I made a non OOP example with ease just by copying and pasting the OOP ones, so everything here can be used for prototyping.
As this repository grows, many new components will be added and later surely it will need some reorganizing. If you know how those components works, you can build the circuit by yourself.
example classes
are the place to put your own code, it is just for organization purposes.
- Pins are always defined inside the
example classes
for the simplicity of readability. - All examples are instantiated into the
main.cpp
file.
implementations
combines a specific library/logic to work with a component or feature of the board.
devices
translates a real eletronic component and it's behaviour to code.
helpers
contains code that does not belong to a specific scenario yet, most of it should be moved to specific folders within time.
controllers
are places to put together components that are part of the same micro system (logic-wise).
Since this project does not target a specific project/purpose, many examples can be built, so the main.cpp
will be constantly modified to adequate the most recent examples, or the ones I use the most.
After downloading installing all requirements
, the only step left is to build to download the project dependencies defined on the platformio.ini
file.
Follow PlatformIO tutorials (remember to select the correct environment variable for each programming board/microchip).
goto index No tests yet. I know PlatformIO has a test suit, but I had no interest since this project is too generic
name | desc. |
---|---|
uno | For Arduino UNO boards. |
esp12e | For ESP12E boards. |
nodemcu | For NodeMCU boards. |