PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Readme.txt 1.5KB

3 år sedan
123456789101112131415
  1. glcdbitmap.pde is a Processing sketch that creates a bitmap definition file that can be included in an Arduino sketch and displayed by the ks0108 GLCD library (requires version 2 or later)
  2. The source bitmap must have a height and width no greater than the height and width of the LCD display and should be a black and white image (single bit per pixel)
  3. Change the string variable sourceImage to the name of the bitmap file you want to convert. Bitmap images should be stored in a subdirectory called data.
  4. The output will be a header file with the same base name as the source image with an extension of .h - this header file should be included in your sketch (see the example). The header file must either be copied to the directory that contains your Arduino sketch or to the ks0108 library directory.
  5. The header will contain an array variable with the same basename as your source bmp file. This variable is passed to the method DrawBitmap
  6. DrawBitmap takes four parameters, in addition to the array variable, it expects the x and y coordinates of the upper left hand position of the bitmap. The last parameter is the color to draw the pixes, this can be BLACK or WHITE.
  7. The following line draws an image from a header file that has an array called ArduinoIcon. The left hand side (x axis) is offset 32 pixels, the y axis starts from the top (first line) of the display. The pixels that were black in the bmp file are painted to the LCD, pixels that were white are cleared.
  8. GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK);