The Craft Micro SDK uses the Arduino framework, so any tool set that uses this framework should work. However, Craft Micro highly recommends PlatformIO for cross-platform microprocessor development.
- Run the examples using PlatformIO
- Run the examples using Arduino IDE
- Details about supported TFT displays
- Install VSCode (Visual Studio Code) and the PlatformIO IDE (plugin for VSCode)
- Clone Craft Micro SDK from github. In these examples we clone it to
C:/libraries/craftmicro-sdk
- Create a new PlatformIO project
- Choose a location and your dev board, and select
arduinoas the framework (*) - Once the project has been created, edit
platformio.ini(see example below)- Add
lib_extra_dirswith the path to where you cloned the Craft Micro SDK (**) - Add
lib_depsand specify theSPIlibrary (required for the ILI9341 TFT display) - Add
build_flagsto add the include path to the Craft Micro SDK folder (for the resources)
- Add
- Copy and paste one of the example
main.cppfiles into your project'ssrcdirectory - Build and deploy!
(*) You can only target boards that support the Arduino framework at this stage.
(**) The path should be to the library folder (the parent of the Craft Micro folder), not to the Craft Micro folder itself.
See example platformio.ini
In our example we are targeting the Teensy 3.6 dev board. Ourplatformio.ini looks like this:
[env:teensy36]
platform = teensy
board = teensy36
framework = arduino
lib_deps = SPI
lib_extra_dirs = C:/libraries/
build_flags = -I"C:/libraries/craftmicro-sdk/"- Install Arduino IDE
- You may need to install additional tools for your dev board. In our example we are using a Teensy 3.6 board, so we need to install TeensyDuino.
- Clone Craft Micro SDK from github into your
Arduino/librariesfolder (help)
- Run Arduino IDE and create a new sketch if you need to
- Copy and paste the code from
main.cppin one of the examples into your sketch - Save the sketch, then open the folder where the sketch is saved and create the subfolder
resources- Copy the resources your example needs from
craftmicro-sdk/examples/resourcestomy-sketch/resources(*)
- Copy the resources your example needs from
- Build and deploy!
(*) You need to copy the resources into each sketch that requires them. If you change the folder names, also update the #include path to match