The
ChipChop Code Builder for ESP32/ESP8266 is a new major upgrade to the Dev Console. It has been tested by a number of users and it's now available for everyone to use.
The Code Builder is almost an entire system on its own and has taken some serious time to develop so I hope you will enjoy it and find it useful. The system architecture is designed around a "plugins" or almost "apps" concept and it's no longer heavily "library" oriented.
In essence, what the Code Builder produces as a final result can be considered as one giant library that has no specific version. Depending on the choice of plugins/apps that you include it will be unique to your project.
The base engine is still the core ChipChop Library with the working version 1.4x and you no longer need to keep track of what is new and keep re-downloading the library as the latest version will always be automatically included. With the introduction of the plugins architecture most of new features, improvements and expansion of the capabilities will come through the plugins removing the need to constantly modify and expand the core engine.
The ChipChop library will stay available for download as a standalone engine for those that need it or want to develop their own system architecture from scratch.
Brief historyAs ChipChop is becoming a more and more complex system I keep getting bombarded by emails with similar questions. The story is almost always the same:
1. You are new to this IoT stuff
2. You are still learning programming
3. You want to stop buying off-the-shelf "smart home" crap
4. You want to make smart things that work the same way or better than the off-the-shelf "smart home" crap
5. You don't understand why is it so complicated when ChatGPT says it's easy!?
6. You want it now
7. You want it for free
To my annoyance I have been left with no choice, either I tell you to go to the place where unicorns can do what you are asking for 🦄🌈 or to easy you gently with plenty of lube into the IoT world. Sadly, I picked the second option and to get you off my back I've started developing the Code Builder.
What is it?- The Code Builder is an additional sub-system of the Dev Console. It's aware of your devices and components that you use on each device.
- It's designed to automatically generate c++ template code for you that can be loaded and compiled on your device with PlatformIO or Arduino IDE
- The code generated leaves plenty of space for you to add additional logic and functionality in the same way as you would using Arduino framework
What it's not- The Code Builder is not a compiler although it may evolve into one in the future. You still need to use PlatformIO or Arduino IDE to compile and push the code onto the device but it's a very simple process and requires only couple of clicks
- It's not an IDE. Although you can build some devices without writing a single line of code and the goal is to grow the plugins library to cover many peripherals and sensors you may still need to do some hands-on coding.
How to useUsing the Code Builder should be simple and self explanatory but here are just a few pointers to get you going.
1. In the Dev Console > Devices section you will find for every device a big "Code Builder" button (you really can't miss it). This will get you into the Code Builder section (also available from the main menu) with the device pre-selected from the list.
2. Pick the correct microcontroller type from the menu or alternatively if you have built a project before you can upload the Code Builder file and continue to the plugins selection screen.
3. Add/remove the plugins you want to use. Each plugins comes with a brief explanation on what it can do and any usage notes you have to be aware of.
4. On the next screen go through each plugin, tweak any settings if you need and make sure to press "Save" every time.
Some plugins don't have just default setting but also require entering some setup information so reviewing each one and saving its settings is necessary.
note: You can not proceed to the final step if you haven't confirmed and saved the settings for each plugin.
5. Select the IDE you want to generate the code for and the Code Builder will generate a zip file with the entire ready to use project that can be opened in PlatformIO or Arduino IDE
You can of course go back at any time and tweak any of the settings or you can even generate the code for each IDE separately.
IMPORTANT Make sure to read the
instructions.txt that comes with each project. There are major differences between PlatformIO and Arduino IDE builds and due to the Arduino IDE limitations you may have to do few additional steps in order to use the generated code (it's nothing major, mostly things like installing any additional libraries that may be needed)
PlatformIO projects should contain everything and may just require having a quick check of the platformio.ini that it correctly matches your board details.
That's it, have a play, experiment and post questions in the forum if you get stuck or are not sure how to use the Code Builder.
I will be creating more plugins and if you need something specific just ask.
Enjoy