T-Deck screen capture extension


#1

This is a uLisp extension to capture the T-deck screen and save it in BMP format to an SD card. I wrote it to help in writing documentation for a forthcoming project.

To use it you enter:

(save-screen filename)

where filename is a string such as "pic.bmp".

It saves the text on the screen, together with highlighting, but note that it doesn’t (currently) save any graphics drawn on the screen. Here’s an example:

TDeckScreen

Installing the Screen Capture extension

  • Uncomment #define extensions at the start of the main uLisp T-Deck source file.
  • Compile and upload uLisp with the file ScreenCapture.ino included in the same folder as the uLisp source file.

The save-screen function will then be added to the built-in functions in uLisp.

Here is the Screen Capture Extension: ScreenCapture.ino .


#2

I have run into an issue with this extension.

My exact code is available here

https://git.ablecorp.us/able/tdeck-ulisp

extensions:16:3: error: 'sd_begin' was not declared in this scope
   sd_begin();
   ^~~~~~~~
/home/able/Arduino/tdeck-ulisp/extensions.ino:16:3: note: suggested alternative: 'sp_defun'
   sd_begin();
   ^~~~~~~~
   sp_defun

#3

I think:

sd_begin();

should be changed to:

SDBegin();

I think I changed it for consistency across all versions of uLisp.


#4

That solved the issue

!img


#5