Skip to content

Latest commit

 

History

History
115 lines (101 loc) · 8.44 KB

README.md

File metadata and controls

115 lines (101 loc) · 8.44 KB

Code Generator for Converting PowerPoint Slides to .ino

Speed creating graphical screens for your MCU projects by first creating screens in PowerPoint the automaticall generate the .ino . This utility will convert PowerPoint slide graphics to code that can be compiled and uploaded to common MCU's such as Teensy and ESP-32's and for 320 x 240 and 480 x 320 displays. This code generator is written in VBA and embedded in PowerPoint as a macro. The most common PowerPoint objects are supported making this utility great for creating screens for monitoring systems, control systems, reporting systems, and more. See the examples below.

Tested with

  • Tested with Teensy 3.2 and ILI9341_t3 (320 x 240)
  • Tested with ESP32 and Adafruit_ILI9341 (320 x 240)
  • Tested with Teensy 3.2 and ILI9488_t3 (480 x 320)
  • Revision

  • v1.0 Kasprzak 06/06/2020 Initial code
  • v2.0 Kasprzak 04/04/2024 Support for fonts, colors, variables, buttons, local and global definitions, more
  • Known issues

  • Horizontal gradients where w > h not working--bug in display lib?
  • Teensy Arial fonts match the PowerPoint very well, Adafruit FreeSans--not as good.
  • Usage


    Enable macros: File | Options, Trust Center the navigate to Trust Center Settings, Enable “Enable all macros"
    Enable Developer toolbar: RMB on toolbar Select customize the ribbon, enable Developer Toolbar from right selection group
    Put PowerPoint into presentation mode and click the Generate .INO button or select Developer Tab, Macros, select BuildINO and click Run.

    The resulting code is for a display with pixel size of 320 x 240. Do not adjust PowerPoint slide size, the odd size is intended to make PowerPoint font sizes realistic in the INO (a 12 point font in the .ino code will look similar to a 12 point font in PowerPoint). A different PowerPoint utility (coming soon) is available for 480 x 320 size displays.

    Highlights

  • Support for display library ILI9341_t3
  • Support for display library Adafruit_ILI9341
  • Font support for Teensy Arial fonts in many sizes
  • Font mapping for Arial to basic Adafruit fonts in 4 sizes
  • Option to create Adafruit or custom library buttons from Rectangles with text
  • Option to create button processing code for Touchscreens
  • Option to include XPT2046 touchscreen driver
  • Default orientation is Landscape, but Presentation can be change to portrait mode--a user setting will allow switching screen orientation
  • Option to create variables from numbers in text boxes
  • Option to create button and variables global or in screen functions
  • Font list created and listed in #defines
  • Color list created and listed in #defines
  • Optional variables created for int and float
  • ILI9341_t1 (Teensy) will specify fonts based on PowerPoint fonts
  • Adafruit_ILI9341 (ESP32) can specify either fonts based on PowerPoint fonts or map to closes size delivered with the Adafruit GFX library
  • In either driver case, if PowerPoint fonts do not match delivered display fonts, simply #include the font and change the #defines
  • Option to draw place-holder graphics (square with x) for unsupported PowerPoint Objects
  • char button text created if buttons are created
  • Code generated to create Button objects and initialization

  • User Interface


    header image header image

    Supported objects

    To give examples of what objects and parameters are supported, here are examples of generated code (images on the left), and the origianl slide created in PowerPoint (images on the right). These images will help indicated what is supported and tips on usage. You may delete all slides and create your own, but DO NOT delete slide number 1. Keep this first slide for instructions and the "create" button also the code is hard coded to start at slide number 2. The code generator will do the best job possible in creating .ino graphics to mimic PowerPoint objects, however some parameters for PowerPoint objects are simply not exposed through the API, margins and radius values for rectangles for example. Below are some tips in how to get the most accurate rendition. All screens were first created in PowerPoint the converted to .ino code using this utility. Zero code edits were made to the results.

    header image header image
    header image header image
    header image header image
    header image header image
    header image header image
    header image header image
    header image header image
    header image header image
    header image header image

    Example screen shots

    Here are examples of generated code (images on the left), and the origianl slide created in PowerPoint (images on the right) of some use cases. Create monitoring screens, warning screens, graphical view of an irrigation system, reporting systems, and more...All screens were first created in PowerPoint the converted to .ino code using this utility. Zero code edits were made to the results.

    header image header image

    header image header image
    header image header image
    header image header image
    header image header image
    header image header image
    header image header image