Organize your code – big ASCII art font

I have written several post on how to optimize your code, specifically optimizing memory usage, and keep them in separate tabs to organize a longer project. This time it is a trick I do (didn’t see anyone else I know do this yet). In Arduino, you can create block comments as the following:

/*

All is comment

blah….

*/

So besides using these block comments to document how to call a function you wrote or how to configure a library or else you can also do the following:

/*
.___  ___.  _______ .__   __.  __    __
|   \/   | |   ____||  \ |  | |  |  |  |
|  \  /  | |  |__   |   \|  | |  |  |  |
|  |\/|  | |   __|  |  . `  | |  |  |  |
|  |  |  | |  |____ |  |\   | |  `--'  |
|__|  |__| |_______||__| \__|  \______/
*/

Pretty cool, right? It clearly indicates the content after this comment has something to do with menu. If you scroll through your hundreds of lines of code, this will catch your eyes much easier than any comments. Although some programmers use a row of # or – to separate codes, this is better. you can have all of these elements together to improve the overall readability of your code:

/*
########################################
.___  ___.  _______ .__   __.  __    __
|   \/   | |   ____||  \ |  | |  |  |  |
|  \  /  | |  |__   |   \|  | |  |  |  |
|  |\/|  | |   __|  |  . `  | |  |  |  |
|  |  |  | |  |____ |  |\   | |  `--'  |
|__|  |__| |_______||__| \__|  \______/
########################################
Menu functions go here!
*/

Here is where I found this starwars font:

http://www.network-science.de/ascii/

Just scroll down the font list and find your favorite!

To read all my posts on coding, press the “coding” button on my blog.

Oh here, someone made a movie with ascii art:

http://www.asciimation.co.nz/

3 Responses to Organize your code – big ASCII art font

Leave a Reply

Discover more from LiuDr Electronic Solutions LLC Official Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading