├── .gitattributes ├── .gitignore ├── Datasheets └── OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf ├── Enclosure ├── Enclosure-Dimensions_GKM-004_R02_ASSY_MICROVIEW_PCB_05MAR2014.PDF ├── GKM-001_R05_ASSY_CHIP - GKM-002_R05_CHIP_UPPER_HOUSING-1.STL ├── GKM-001_R05_ASSY_CHIP - GKM-003_R05_CHIP_LOWER_HOUSING-1.STL ├── GKM-001_R05_ASSY_CHIP - GKM-004_R02_ASSY_MICROVIEW_PCB-3.STL ├── GKM-002_R05_CHIP_UPPER_HOUSING.STL ├── GKM-002_R05_CHIP_WINDOWED_UPPER_HOUSING.stl ├── GKM-003_R05_CHIP_LOWER_HOUSING.STL ├── LICENSE └── README.md ├── Hardware └── MicroView │ ├── Models │ ├── MicroView-PCB-Assembly.stp │ ├── MicroView-PCB-Assembly.vc3 │ └── MicroView-PCB-Assembly_SCALED.skp │ ├── SparkFun_MicroView.brd │ ├── SparkFun_MicroView.sch │ └── microView-temp.lbr ├── Libraries ├── Arduino │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── examples │ │ ├── LearningKit │ │ │ ├── Blink │ │ │ │ └── Blink.ino │ │ │ ├── Circuit1 │ │ │ │ └── Circuit1.ino │ │ │ ├── Circuit10 │ │ │ │ └── Circuit10.ino │ │ │ ├── Circuit11 │ │ │ │ └── Circuit11.ino │ │ │ ├── Circuit2 │ │ │ │ └── Circuit2.ino │ │ │ ├── Circuit3 │ │ │ │ └── Circuit3.ino │ │ │ ├── Circuit4 │ │ │ │ └── Circuit4.ino │ │ │ ├── Circuit5 │ │ │ │ └── Circuit5.ino │ │ │ ├── Circuit6 │ │ │ │ └── Circuit6.ino │ │ │ ├── Circuit7 │ │ │ │ └── Circuit7.ino │ │ │ ├── Circuit8 │ │ │ │ └── Circuit8.ino │ │ │ ├── Circuit9 │ │ │ │ └── Circuit9.ino │ │ │ └── HelloWorld │ │ │ │ └── HelloWorld.ino │ │ ├── MicroViewAnalogClock │ │ │ └── MicroViewAnalogClock.ino │ │ ├── MicroViewCube │ │ │ └── MicroViewCube.ino │ │ ├── MicroViewDemo │ │ │ └── MicroViewDemo.ino │ │ ├── MicroViewFlashingHeart │ │ │ └── MicroViewFlashingHeart.ino │ │ ├── MicroViewPong │ │ │ ├── LICENSE │ │ │ └── MicroViewPong.ino │ │ ├── MicroViewSineWave │ │ │ └── MicroViewSineWave.ino │ │ ├── MicroViewSlider │ │ │ └── MicroViewSlider.ino │ │ ├── MicroViewVSlider │ │ │ └── MicroViewVSlider.ino │ │ ├── MicroViewWidgetDemo │ │ │ └── MicroViewWidgetDemo.ino │ │ └── MicroViewWidgetRedraw │ │ │ └── MicroViewWidgetRedraw.ino │ ├── extras │ │ ├── OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf │ │ └── README.md │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── MicroView.cpp │ │ ├── MicroView.h │ │ └── util │ │ ├── 7segment.h │ │ ├── font5x7.h │ │ ├── font8x16.h │ │ ├── fontlargenumber.h │ │ ├── space01.h │ │ ├── space02.h │ │ └── space03.h └── README.md ├── Production ├── MicroView-GiantPanel-v10.brd └── MicroView-Panel-v10.brd └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## SparkFun Useful stuff 3 | ################# 4 | 5 | ## AVR Development 6 | *.eep 7 | *.elf 8 | *.lst 9 | *.lss 10 | *.sym 11 | *.d 12 | *.o 13 | *.srec 14 | *.map 15 | 16 | ## Notepad++ backup files 17 | *.bak 18 | 19 | ## BOM files 20 | *bom* 21 | 22 | ################# 23 | ## Eclipse 24 | ################# 25 | 26 | *.pydevproject 27 | .project 28 | .metadata 29 | bin/ 30 | tmp/ 31 | *.tmp 32 | *.bak 33 | *.swp 34 | *~.nib 35 | local.properties 36 | .classpath 37 | .settings/ 38 | .loadpath 39 | 40 | # External tool builders 41 | .externalToolBuilders/ 42 | 43 | # Locally stored "Eclipse launch configurations" 44 | *.launch 45 | 46 | # CDT-specific 47 | .cproject 48 | 49 | # PDT-specific 50 | .buildpath 51 | 52 | 53 | ############# 54 | ## Eagle 55 | ############# 56 | 57 | # Ignore the board and schematic backup files 58 | *.b#? 59 | *.s#? 60 | 61 | 62 | ################# 63 | ## Visual Studio 64 | ################# 65 | 66 | ## Ignore Visual Studio temporary files, build results, and 67 | ## files generated by popular Visual Studio add-ons. 68 | 69 | # User-specific files 70 | *.suo 71 | *.user 72 | *.sln.docstates 73 | 74 | # Build results 75 | [Dd]ebug/ 76 | [Rr]elease/ 77 | *_i.c 78 | *_p.c 79 | *.ilk 80 | *.meta 81 | *.obj 82 | *.pch 83 | *.pdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.vspscc 93 | .builds 94 | *.dotCover 95 | 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 97 | #packages/ 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opensdf 104 | *.sdf 105 | 106 | # Visual Studio profiler 107 | *.psess 108 | *.vsp 109 | 110 | # ReSharper is a .NET coding add-in 111 | _ReSharper* 112 | 113 | # Installshield output folder 114 | [Ee]xpress 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish 128 | 129 | # Others 130 | [Bb]in 131 | [Oo]bj 132 | sql 133 | TestResults 134 | *.Cache 135 | ClientBin 136 | stylecop.* 137 | ~$* 138 | *.dbmdl 139 | Generated_Code #added for RIA/Silverlight projects 140 | 141 | # Backup & report files from converting an old project file to a newer 142 | # Visual Studio version. Backup files are not needed, because we have git ;-) 143 | _UpgradeReport_Files/ 144 | Backup*/ 145 | UpgradeLog*.XML 146 | 147 | 148 | ############ 149 | ## Windows 150 | ############ 151 | 152 | # Windows image file caches 153 | Thumbs.db 154 | 155 | # Folder config file 156 | Desktop.ini 157 | 158 | 159 | ############# 160 | ## Python 161 | ############# 162 | 163 | *.py[co] 164 | 165 | # Packages 166 | *.egg 167 | *.egg-info 168 | dist 169 | build 170 | eggs 171 | parts 172 | bin 173 | var 174 | sdist 175 | develop-eggs 176 | .installed.cfg 177 | 178 | # Installer logs 179 | pip-log.txt 180 | 181 | # Unit test / coverage reports 182 | .coverage 183 | .tox 184 | 185 | #Translations 186 | *.mo 187 | 188 | #Mr Developer 189 | .mr.developer.cfg 190 | 191 | # Mac crap 192 | .DS_Store 193 | -------------------------------------------------------------------------------- /Datasheets/OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Datasheets/OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf -------------------------------------------------------------------------------- /Enclosure/Enclosure-Dimensions_GKM-004_R02_ASSY_MICROVIEW_PCB_05MAR2014.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Enclosure/Enclosure-Dimensions_GKM-004_R02_ASSY_MICROVIEW_PCB_05MAR2014.PDF -------------------------------------------------------------------------------- /Enclosure/GKM-001_R05_ASSY_CHIP - GKM-002_R05_CHIP_UPPER_HOUSING-1.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Enclosure/GKM-001_R05_ASSY_CHIP - GKM-002_R05_CHIP_UPPER_HOUSING-1.STL -------------------------------------------------------------------------------- /Enclosure/GKM-001_R05_ASSY_CHIP - GKM-003_R05_CHIP_LOWER_HOUSING-1.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Enclosure/GKM-001_R05_ASSY_CHIP - GKM-003_R05_CHIP_LOWER_HOUSING-1.STL -------------------------------------------------------------------------------- /Enclosure/GKM-001_R05_ASSY_CHIP - GKM-004_R02_ASSY_MICROVIEW_PCB-3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Enclosure/GKM-001_R05_ASSY_CHIP - GKM-004_R02_ASSY_MICROVIEW_PCB-3.STL -------------------------------------------------------------------------------- /Enclosure/GKM-002_R05_CHIP_UPPER_HOUSING.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Enclosure/GKM-002_R05_CHIP_UPPER_HOUSING.STL -------------------------------------------------------------------------------- /Enclosure/GKM-003_R05_CHIP_LOWER_HOUSING.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Enclosure/GKM-003_R05_CHIP_LOWER_HOUSING.STL -------------------------------------------------------------------------------- /Enclosure/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 geekammo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Enclosure/README.md: -------------------------------------------------------------------------------- 1 | MicroView-Enclosure 2 | =================== 3 | 4 | MicroView Enclosure as 3D printable STL Files 5 | -------------------------------------------------------------------------------- /Hardware/MicroView/Models/MicroView-PCB-Assembly.vc3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Hardware/MicroView/Models/MicroView-PCB-Assembly.vc3 -------------------------------------------------------------------------------- /Hardware/MicroView/Models/MicroView-PCB-Assembly_SCALED.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Hardware/MicroView/Models/MicroView-PCB-Assembly_SCALED.skp -------------------------------------------------------------------------------- /Libraries/Arduino/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /Libraries/Arduino/.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## SparkFun Useful stuff 3 | ################# 4 | 5 | ## AVR Development 6 | *.eep 7 | *.elf 8 | *.lst 9 | *.lss 10 | *.sym 11 | *.d 12 | *.o 13 | *.srec 14 | *.map 15 | 16 | ## Notepad++ backup files 17 | *.bak 18 | 19 | ## BOM files 20 | *bom* 21 | 22 | ################# 23 | ## Eclipse 24 | ################# 25 | 26 | *.pydevproject 27 | .project 28 | .metadata 29 | bin/ 30 | tmp/ 31 | *.tmp 32 | *.bak 33 | *.swp 34 | *~.nib 35 | local.properties 36 | .classpath 37 | .settings/ 38 | .loadpath 39 | 40 | # External tool builders 41 | .externalToolBuilders/ 42 | 43 | # Locally stored "Eclipse launch configurations" 44 | *.launch 45 | 46 | # CDT-specific 47 | .cproject 48 | 49 | # PDT-specific 50 | .buildpath 51 | 52 | 53 | ############# 54 | ## Eagle 55 | ############# 56 | 57 | # Ignore the board and schematic backup files 58 | *.b#? 59 | *.s#? 60 | 61 | 62 | ################# 63 | ## Visual Studio 64 | ################# 65 | 66 | ## Ignore Visual Studio temporary files, build results, and 67 | ## files generated by popular Visual Studio add-ons. 68 | 69 | # User-specific files 70 | *.suo 71 | *.user 72 | *.sln.docstates 73 | 74 | # Build results 75 | [Dd]ebug/ 76 | [Rr]elease/ 77 | *_i.c 78 | *_p.c 79 | *.ilk 80 | *.meta 81 | *.obj 82 | *.pch 83 | *.pdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.vspscc 93 | .builds 94 | *.dotCover 95 | 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 97 | #packages/ 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opensdf 104 | *.sdf 105 | 106 | # Visual Studio profiler 107 | *.psess 108 | *.vsp 109 | 110 | # ReSharper is a .NET coding add-in 111 | _ReSharper* 112 | 113 | # Installshield output folder 114 | [Ee]xpress 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish 128 | 129 | # Others 130 | [Bb]in 131 | [Oo]bj 132 | sql 133 | TestResults 134 | *.Cache 135 | ClientBin 136 | stylecop.* 137 | ~$* 138 | *.dbmdl 139 | Generated_Code #added for RIA/Silverlight projects 140 | 141 | # Backup & report files from converting an old project file to a newer 142 | # Visual Studio version. Backup files are not needed, because we have git ;-) 143 | _UpgradeReport_Files/ 144 | Backup*/ 145 | UpgradeLog*.XML 146 | 147 | 148 | ############ 149 | ## Windows 150 | ############ 151 | 152 | # Windows image file caches 153 | Thumbs.db 154 | 155 | # Folder config file 156 | Desktop.ini 157 | 158 | 159 | ############# 160 | ## Python 161 | ############# 162 | 163 | *.py[co] 164 | 165 | # Packages 166 | *.egg 167 | *.egg-info 168 | dist 169 | build 170 | eggs 171 | parts 172 | bin 173 | var 174 | sdist 175 | develop-eggs 176 | .installed.cfg 177 | 178 | # Installer logs 179 | pip-log.txt 180 | 181 | # Unit test / coverage reports 182 | .coverage 183 | .tox 184 | 185 | #Translations 186 | *.mo 187 | 188 | #Mr Developer 189 | .mr.developer.cfg 190 | 191 | # Mac crap 192 | .DS_Store 193 | -------------------------------------------------------------------------------- /Libraries/Arduino/LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Libraries/Arduino/README.md: -------------------------------------------------------------------------------- 1 | SparkFun MicroView Arduino Library 2 | ======================================== 3 | 4 | ![MicroView](https://cdn.sparkfun.com//assets/parts/9/8/4/5/Microview_Action.jpg) 5 | 6 | [*SparkFun MicroView (DEV-12923)*](https://www.sparkfun.com/products/12923) 7 | 8 | An Arduino library for the MicroView - a chip-sized Arduino with a built-in OLED, available from SparkFun Electronics 9 | 10 | Repository Contents 11 | ------------------- 12 | 13 | * **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. 14 | * **/extras** - Additional documentation for the user. These files are ignored by the IDE. 15 | * **/src** - Source files for the library (.cpp, .h). 16 | * **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE. 17 | * **library.properties** - General library properties for the Arduino package manager. 18 | 19 | Documentation 20 | -------------- 21 | 22 | * **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library. 23 | * **[Product Repository](https://github.com/sparkfun/MicroView/tree/v10)** - Main repository (including hardware files) for the MicroView. 24 | * **[Learn Microview](http://learn.microview.io/)** - Beginners tutorial for the MicroView. 25 | 26 | Products that use this Library 27 | --------------------------------- 28 | 29 | * [MicroView](https://www.sparkfun.com/products/12923)- The MicroView is a chip-sized Arduino with a built-in OLED, available from SparkFun Electronics 30 | 31 | Version History 32 | --------------- 33 | 34 | * [TODO](TODO) - Description 35 | 36 | License Information 37 | ------------------- 38 | 39 | This product is _**open source**_! 40 | 41 | The code is released under the GPL v3 license. For more information see the included LICENSE.md file. 42 | 43 | Distributed as-is; no warranty is given. 44 | 45 | - Your friends at SparkFun. 46 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Blink/Blink.ino: -------------------------------------------------------------------------------- 1 | #include 2 | /* 3 | MicroView Blink 4 | Draw a circle for one second, then off for one second, repeatedly. 5 | 6 | This example code is in the public domain. 7 | */ 8 | 9 | // the setup routine runs once when you press reset: 10 | void setup() { 11 | uView.begin(); 12 | uView.clear(PAGE); 13 | } 14 | 15 | // the loop routine runs over and over again forever: 16 | void loop() { 17 | uView.circleFill(32,24,10,WHITE,NORM); 18 | uView.display(); 19 | delay(1000); // wait for a second 20 | 21 | uView.circleFill(32,24,10,BLACK,NORM); 22 | uView.display(); 23 | delay(1000); // wait for a second 24 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit1/Circuit1.ino: -------------------------------------------------------------------------------- 1 | int LED = A3; // declare LED as pin A3 of MicroView 2 | 3 | void setup() 4 | { 5 | pinMode(LED, OUTPUT); // set LED pin as OUTPUT 6 | } 7 | 8 | void loop() 9 | { 10 | digitalWrite(LED, HIGH); // set LED pin HIGH voltage, LED will be on 11 | delay(1000); // delay 1000 ms 12 | digitalWrite(LED, LOW); // set LED pin LOW voltage, LED will be off 13 | delay(1000); // delay 1000 ms 14 | } 15 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit10/Circuit10.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | int relayPin = 2; // set relayPin as pin 2 of Arduino 4 | 5 | void setup() { 6 | uView.begin(); // start MicroView 7 | uView.clear(PAGE); // clear page 8 | pinMode(relayPin, OUTPUT); // initialize the digital pin as an output. 9 | } 10 | 11 | void loop() { 12 | uView.setCursor(0,0); // set cursor at 0,0 13 | uView.print("YELLOW"); // print YELLOW text 14 | uView.display(); // display 15 | digitalWrite(relayPin, HIGH); // turn the RELAY ON (HIGH is the voltage level) 16 | delay(1000); // wait for a second 17 | 18 | uView.setCursor(0,0); 19 | uView.print("RED "); 20 | uView.display(); 21 | digitalWrite(relayPin, LOW); // turn the RELAY off by making the voltage LOW 22 | delay(1000); // wait for a second 23 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit11/Circuit11.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | MicroViewWidget *widget; // declare widget pointer 4 | 5 | int sensorValue; // declare variable to store sensor value 6 | int sensorPin=A0; // declare sensor pin as A0 of Arduino 7 | 8 | void setup() { 9 | uView.begin(); // start MicroView 10 | uView.clear(PAGE); // clear page 11 | widget = new MicroViewSlider(0,0,0,1024, WIDGETSTYLE1); // declare widget as slider 12 | pinMode(sensorPin, INPUT); // set sensor pin as INPUT 13 | } 14 | 15 | void loop () { 16 | sensorValue=analogRead(sensorPin); // read and store sensor value 17 | widget->setValue(sensorValue); // set sensor value to widget 18 | uView.display(); // display widget 19 | delay(20); // delay 20 ms 20 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit2/Circuit2.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | MicroViewWidget *widget; // create widget pointer 4 | MicroViewWidget *widget2; // create widget pointer 5 | 6 | int sensorPin = A1; // select the input pin for the potentiometer 7 | int sensorValue = 0; // variable to store the value coming from the sensor 8 | 9 | void setup() 10 | { 11 | digitalWrite(sensorPin, HIGH); // Internal Pull-up 12 | pinMode(sensorPin, INPUT); // make pin as INPUT 13 | uView.begin(); // start MicroView 14 | uView.clear(PAGE); // clear page 15 | widget = new MicroViewSlider(0, 0, 0, 1024); // make widget as Slider 16 | widget2 = new MicroViewSlider(0, 20, 0, 1024, WIDGETSTYLE1); // make widget as Silder STYLE1 17 | uView.display(); // display the content in the screen buffer 18 | } 19 | 20 | void loop() 21 | { 22 | sensorValue = analogRead(sensorPin); // read sensorPin 23 | widget->setValue(sensorValue); // set value of sensorPin to widget 24 | widget2->setValue(sensorValue); // set value of sensorPin to widget 25 | uView.display(); // display the content in the screen buffer 26 | } 27 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit3/Circuit3.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | MicroViewWidget *redWidget, *greenWidget, *blueWidget; // declare 3 widget pointers 4 | 5 | int RED = 6; // declare RED LED pin 6 6 | int GREEN = 5; // declare GREEN LED pin 5 7 | int BLUE = 3; // declare BLUE LED pin 3 8 | int fadeStep = 10; // declare fading steps 9 | int dly=20; // declare delay 10 | 11 | void setup() 12 | { 13 | uView.begin(); // start MicroView 14 | uView.clear(PAGE); // clear page 15 | redWidget = new MicroViewSlider(0,0,0,255); // declare RED widget as slider 16 | greenWidget = new MicroViewSlider(0,10,0,255); // declare GREEN widget as slider 17 | blueWidget = new MicroViewSlider(0,20,0,255); // declare BLUE widget as slider 18 | 19 | pinMode(RED, OUTPUT); // set RED LED pin as OUTPUT 20 | pinMode(GREEN, OUTPUT); // set GREEN LED pin as OUTPUT 21 | pinMode(BLUE, OUTPUT); // set BLUE LED pin as OUTPUT 22 | } 23 | 24 | void loop() 25 | { 26 | int i; // init i variable for general use 27 | // brightening 28 | for (i=0;i<=255;i+=fadeStep) { // step i from 0 to 255 by fadeSteps 29 | redWidget->setValue(i); // set brightness value for RED LED to widget 30 | uView.display(); // display the content of the screen buffer 31 | analogWrite(RED,i); // set brightness value for RED LED to the pin 32 | delay(dly); 33 | } 34 | // dimming 35 | for (i=255;i>=0;i-=fadeStep) { // step i from 255 to 0 by fadeSteps 36 | redWidget->setValue(i); 37 | uView.display(); 38 | analogWrite(RED,i); 39 | delay(dly); 40 | } 41 | 42 | // brightening 43 | for (i=0;i<=255;i+=fadeStep) { 44 | greenWidget->setValue(i); 45 | uView.display(); 46 | analogWrite(GREEN,i); 47 | delay(dly); 48 | } 49 | // dimming 50 | for (i=255;i>=0;i-=fadeStep) { 51 | greenWidget->setValue(i); 52 | uView.display(); 53 | analogWrite(GREEN,i); 54 | delay(dly); 55 | } 56 | 57 | // brightening 58 | for (i=0;i<256;i+=fadeStep) { 59 | blueWidget->setValue(i); 60 | uView.display(); 61 | analogWrite(BLUE,i); 62 | delay(dly); 63 | } 64 | // dimming 65 | for (i=255;i>=0;i-=fadeStep) { 66 | blueWidget->setValue(i); 67 | uView.display(); 68 | analogWrite(BLUE,i); 69 | delay(dly); 70 | } 71 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit4/Circuit4.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | int buttonPin = A0; // push button pin 4 | int buttonState = 0; // variable to store the pushbutton status 5 | 6 | void setup() { 7 | uView.begin(); // start MicroView 8 | uView.clear(PAGE); // clear page 9 | 10 | pinMode(buttonPin, INPUT); // initialize the pushbutton pin as an input 11 | digitalWrite(buttonPin,HIGH); // set Internal pull-up 12 | } 13 | 14 | void loop() { 15 | buttonState = digitalRead(buttonPin); // read the state of the pushbutton value 16 | 17 | // check if the pushbutton is pressed. 18 | // if it is not pressed, the buttonState is HIGH: 19 | if (buttonState == HIGH) { 20 | uView.setCursor(0,0); // set cursor at 0,0 21 | uView.print("OFF"); // print OFF 22 | uView.display(); 23 | } 24 | else { 25 | uView.setCursor(0,0); 26 | uView.print("ON "); 27 | uView.display(); 28 | } 29 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit5/Circuit5.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | MicroViewWidget *widget; // declare widget pointer 4 | 5 | int sensorPin = A2; // select the input pin for the photo resistor 6 | int sensorValue = 0; // variable to store the value coming from the sensor 7 | 8 | void setup() { 9 | pinMode(sensorPin,INPUT); // set sensor pin as INPUT 10 | digitalWrite(sensorPin,HIGH); // set Internal pull-up 11 | uView.begin(); // start MicrView 12 | uView.clear(PAGE); // clear page 13 | widget = new MicroViewGauge(32,24,0,1023,WIDGETSTYLE1); // set widget as gauge STYLE1 14 | } 15 | 16 | void loop() { 17 | sensorValue= analogRead(sensorPin); // read value from sensorPin 18 | widget->setValue(sensorValue); // set the sensorValue to the gauge widget 19 | uView.display(); // display the widget 20 | } 21 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit6/Circuit6.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | MicroViewWidget *widget; // declare widget pointer 4 | 5 | int sensorPin = A0; // select the input pin for the temperature sensor 6 | int sensorValue = 0; // variable to store the value coming from the sensor 7 | 8 | void setup() { 9 | pinMode(sensorPin,INPUT); // set sensor pin as INPUT 10 | uView.begin(); // start MicroView 11 | uView.clear(PAGE); // clear page 12 | widget = new MicroViewGauge(32,24,0,255,WIDGETSTYLE1); // declare as gauge widget 13 | uView.drawChar(47,33,67); // Character C is ASCII code 67 14 | } 15 | 16 | void loop() { 17 | sensorValue= analogRead(sensorPin); // read sensor pin value 18 | float voltage = sensorValue * 5.0; // voltage at pin in volt 19 | voltage /= 1024.0; // voltage = sensorValue x (5/1024) 20 | float temperatureC = (voltage - 0.5) * 100 ; // C = (voltage - 0.5) x 100 21 | widget->setValue(temperatureC); // set temperature value to the gauge 22 | uView.display(); // display gauge tick 23 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit7/Circuit7.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | #include // include Servo library 3 | 4 | Servo servo; // declare servo object 5 | 6 | void setup() 7 | { 8 | uView.begin(); // start MicroView 9 | uView.clear(PAGE); // clear page 10 | servo.attach(6); // servo control pin at D6 11 | } 12 | 13 | void loop() 14 | { 15 | uView.setCursor(0,0); // set cursor to 0,0 16 | uView.print("Mid "); // display Mid 17 | uView.display(); 18 | servo.write(90); // about 90 degree 19 | delay(2000); // delay 2 seconds 20 | 21 | uView.setCursor(0,0); 22 | uView.print("Left "); 23 | uView.display(); 24 | servo.write(20); // about 20 degree 25 | delay(2000); 26 | 27 | uView.setCursor(0,0); 28 | uView.print("Mid "); 29 | uView.display(); 30 | servo.write(90); // about 90 degree 31 | delay(2000); 32 | 33 | uView.setCursor(0,0); 34 | uView.print("Right"); 35 | uView.display(); 36 | servo.write(160); // about 160 degree 37 | delay(2000); 38 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit8/Circuit8.ino: -------------------------------------------------------------------------------- 1 | #include 2 | // adapted from SparkFun Inventor Kit https://www.sparkfun.com/products/12001 3 | // Please download the original source code for detail comment of the source code 4 | // http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Kits/SIK%20Guide%20Code.zip 5 | 6 | const int buzzerPin = A0; 7 | const int songLength = 18; 8 | char notes[] = "cdfda ag cdfdg gf "; // a space represents a rest 9 | int beats[] = {1,1,1,1,1,1,4,4,2,1,1,1,1,1,1,4,4,2}; 10 | 11 | int tempo = 150; 12 | 13 | void setup() 14 | { 15 | uView.begin(); 16 | uView.clear(PAGE); 17 | pinMode(buzzerPin, OUTPUT); 18 | } 19 | 20 | void loop() 21 | { 22 | int i, duration; 23 | 24 | for (i = 0; i < songLength; i++) // step through the song arrays 25 | { 26 | duration = beats[i] * tempo; // length of note/rest in ms 27 | 28 | if (notes[i] == ' ') // is this a rest? 29 | { 30 | uView.print(" "); 31 | uView.display(); 32 | delay(duration); // then pause for a moment 33 | } 34 | else // otherwise, play the note 35 | { 36 | uView.print(notes[i]); 37 | uView.display(); 38 | tone(buzzerPin, frequency(notes[i]), duration); 39 | delay(duration); // wait for tone to finish 40 | } 41 | delay(tempo/10); // brief pause between notes 42 | } 43 | 44 | // We only want to play the song once, so we'll pause forever: 45 | while(true){} 46 | // If you'd like your song to play over and over, 47 | // remove the above statement 48 | } 49 | 50 | 51 | int frequency(char note) 52 | { 53 | // This function takes a note character (a-g), and returns the 54 | // corresponding frequency in Hz for the tone() function. 55 | 56 | int i; 57 | const int numNotes = 8; // number of notes we're storing 58 | 59 | // The following arrays hold the note characters and their 60 | // corresponding frequencies. The last "C" note is uppercase 61 | // to separate it from the first lowercase "c". If you want to 62 | // add more notes, you'll need to use unique characters. 63 | 64 | // For the "char" (character) type, we put single characters 65 | // in single quotes. 66 | 67 | char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' }; 68 | int frequencies[] = {262, 294, 330, 349, 392, 440, 494, 523}; 69 | 70 | // Now we'll search through the letters in the array, and if 71 | // we find it, we'll return the frequency for that note. 72 | 73 | for (i = 0; i < numNotes; i++) // Step through the notes 74 | { 75 | if (names[i] == note) // Is this the one? 76 | { 77 | return(frequencies[i]); // Yes! Return the frequency 78 | } 79 | } 80 | return(0); // We looked through everything and didn't find it, 81 | // but we still need to return a value, so return 0. 82 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/Circuit9/Circuit9.ino: -------------------------------------------------------------------------------- 1 | #include // include MicroView library 2 | 3 | int motorPIN = 3; // set motor control pin 4 | MicroViewWidget *widget; // declare widget pointer 5 | 6 | void setup() { 7 | uView.begin(); // start MicroView 8 | uView.clear(PAGE); // clear page 9 | pinMode(motorPIN, OUTPUT); // initialize the digital pin as an output. 10 | widget = new MicroViewGauge(32,24,90,255,WIDGETSTYLE1); // set widget as gauge STYLE1 11 | setPwmFrequency(motorPIN,1); // set PWM frequency to about 31K 12 | } 13 | 14 | void loop() { 15 | for (int i=90;i<255;i+=10) { // step i from 90 to 255 by step of 10 16 | widget->setValue(i); // set i value to gauge 17 | uView.display(); // display gauge 18 | analogWrite(motorPIN, i); // set the DUTY cycle of the motorPIN 19 | delay(500); // delay 500 ms 20 | } 21 | } 22 | 23 | // function to set the frequency of the PWM pin 24 | // adapted from http://playground.arduino.cc/Code/PwmFrequency 25 | void setPwmFrequency(int pin, int divisor) { 26 | byte mode; 27 | if(pin == 5 || pin == 6 || pin == 9 || pin == 10) { 28 | switch(divisor) { 29 | case 1: mode = 0x01; break; 30 | case 8: mode = 0x02; break; 31 | case 64: mode = 0x03; break; 32 | case 256: mode = 0x04; break; 33 | case 1024: mode = 0x05; break; 34 | default: return; 35 | } 36 | if(pin == 5 || pin == 6) { 37 | TCCR0B = TCCR0B & 0b11111000 | mode; 38 | } else { 39 | TCCR1B = TCCR1B & 0b11111000 | mode; 40 | } 41 | } else if(pin == 3 || pin == 11) { 42 | switch(divisor) { 43 | case 1: mode = 0x01; break; 44 | case 8: mode = 0x02; break; 45 | case 32: mode = 0x03; break; 46 | case 64: mode = 0x04; break; 47 | case 128: mode = 0x05; break; 48 | case 256: mode = 0x06; break; 49 | case 1024: mode = 0x7; break; 50 | default: return; 51 | } 52 | TCCR2B = TCCR2B & 0b11111000 | mode; 53 | } 54 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/LearningKit/HelloWorld/HelloWorld.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void setup() { 4 | uView.begin(); // start MicroView 5 | uView.clear(PAGE); // clear page 6 | uView.print("HelloWorld"); // display HelloWorld 7 | uView.display(); 8 | } 9 | 10 | void loop () {} -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewAnalogClock/MicroViewAnalogClock.ino: -------------------------------------------------------------------------------- 1 | /***************************************************************** 2 | MicroView_Analog_Clock.ino 3 | SFE_LSM9DS0 Library Simple Example Code 4 | Jim Lindblom @ SparkFun Electronics 5 | Original Creation Date: February 28, 2015 6 | https://github.com/sparkfun/MicroView/tree/master/Libraries 7 | 8 | Turn your MicroView into an analog clock! 9 | 10 | This sketch requires the Arduino time library. Get it from 11 | here: http://playground.arduino.cc/Code/Time 12 | 13 | 14 | Development environment specifics: 15 | IDE: Arduino 1.6.0 16 | Hardware Platform: MicroView 17 | 18 | This code is beerware. If you see me (or any other SparkFun 19 | employee) at the local, and you've found our code helpful, please 20 | buy us a round! 21 | 22 | Distributed as-is; no warranty is given. 23 | *****************************************************************/ 24 | #include 25 | #include 26 | 27 | // Define how big the clock is. Don't make it larger than 23 28 | // This is the radius of the clock: 29 | #define CLOCK_SIZE 23 30 | 31 | // Use these defines to set the clock's begin time 32 | #define HOUR 10 33 | #define MINUTE 02 34 | #define SECOND 00 35 | #define DAY 28 36 | #define MONTH 2 37 | #define YEAR 2015 38 | 39 | const uint8_t maxW = uView.getLCDWidth(); 40 | const uint8_t midW = maxW/2; 41 | const uint8_t maxH = uView.getLCDHeight(); 42 | const uint8_t midH = maxH/2; 43 | 44 | void setup() 45 | { 46 | // Set the time in the time library: 47 | setTime(HOUR, MINUTE, SECOND, DAY, MONTH, YEAR); 48 | 49 | uView.begin(); // set up the MicroView 50 | uView.clear(PAGE);// erase hardware memory inside the OLED 51 | uView.display(); // display the content in the buffer 52 | 53 | // Draw clock face (circle outline & text): 54 | drawFace(); 55 | } 56 | 57 | void loop() 58 | { 59 | drawTime(); 60 | } 61 | 62 | void drawTime() 63 | { 64 | static boolean firstDraw = false; 65 | static unsigned long mSec = millis() + 1000; 66 | static float degresshour, degressmin, degresssec, 67 | hourx, houry, minx, miny, secx, secy; 68 | // If mSec 69 | if (mSec != (unsigned long)second()) 70 | { 71 | // First time draw requires extra line to set up XOR's: 72 | if (firstDraw) 73 | { 74 | uView.line(midW, midH, 32 + hourx, 24 + houry, WHITE, XOR); 75 | uView.line(midW, midH, 32 + minx, 24 + miny, WHITE, XOR); 76 | uView.line(midW, midH, 32 + secx, 24 + secy, WHITE, XOR); 77 | } 78 | // Calculate hour hand degrees: 79 | degresshour = (((hour() * 360) / 12) + 270) * (PI / 180); 80 | // Calculate minute hand degrees: 81 | degressmin = (((minute() * 360) / 60) + 270) * (PI / 180); 82 | // Calculate second hand degrees: 83 | degresssec = (((second() * 360) / 60) + 270) * (PI / 180); 84 | 85 | // Calculate x,y coordinates of hour hand: 86 | hourx = cos(degresshour) * (CLOCK_SIZE / 2.5); 87 | houry = sin(degresshour) * (CLOCK_SIZE / 2.5); 88 | // Calculate x,y coordinates of minute hand: 89 | minx = cos(degressmin) * (CLOCK_SIZE / 1.4); 90 | miny = sin(degressmin) * (CLOCK_SIZE / 1.4); 91 | // Calculate x,y coordinates of second hand: 92 | secx = cos(degresssec) * (CLOCK_SIZE / 1.1); 93 | secy = sin(degresssec) * (CLOCK_SIZE / 1.1); 94 | 95 | // Draw hands with the line function: 96 | uView.line(midW, midH, midW+hourx, midH+houry, WHITE, XOR); 97 | uView.line(midW, midH, midW+minx, midH+miny, WHITE, XOR); 98 | uView.line(midW, midH, midW+secx, midH+secy, WHITE, XOR); 99 | 100 | // Set firstDraw flag to true, so we don't do it again. 101 | firstDraw = true; 102 | 103 | // Actually draw the hands with the display() function. 104 | uView.display(); 105 | } 106 | } 107 | 108 | // Draw the clock face. That includes the circle outline and 109 | // the 12, 3, 6, and 9 text. 110 | void drawFace() 111 | { 112 | uView.setFontType(0); // set font type 0 (Smallest) 113 | 114 | uint8_t fontW = uView.getFontWidth(); 115 | uint8_t fontH = uView.getFontHeight(); 116 | 117 | //uView.setCursor(27, 0); // points cursor to x=27 y=0 118 | uView.setCursor(midW-fontW-1, midH-CLOCK_SIZE+1); 119 | uView.print(12); // Print the "12" 120 | uView.setCursor(midW-(fontW/2)-1, midH+CLOCK_SIZE-fontH-1); 121 | uView.print(6); // Print the "6" 122 | uView.setCursor(midW-CLOCK_SIZE+1, midH-fontH/2); 123 | uView.print(9); // Print the "9" 124 | uView.setCursor(midW+CLOCK_SIZE-fontW-2, midH-fontH/2); 125 | uView.print(3); // Print the "3" 126 | uView.circle(midW-1, midH-1, CLOCK_SIZE); 127 | 128 | //Draw the clock 129 | uView.display(); 130 | } 131 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewCube/MicroViewCube.ino: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | MicroViewCube.ino 3 | Rotating a 3-D Cube on the MicroView Display 4 | Jim Lindblom @ SparkFun Electronics 5 | Original Creation Date: June 9, 2014 6 | 7 | This sketch uses the MicroView library to draw a 3-D projected 8 | cube, and rotate it along all three axes. 9 | 10 | Development environment specifics: 11 | IDE: Arduino 1.0.5 12 | Hardware Platform: MicroView 13 | 14 | This code is beerware; if you see me (or any other SparkFun employee) at the 15 | local, and you've found our code helpful, please buy us a round! 16 | 17 | Distributed as-is; no warranty is given. 18 | ******************************************************************************/ 19 | #include 20 | 21 | #define SHAPE_SIZE 600 22 | #define ROTATION_SPEED 0 // ms delay between cube draws 23 | 24 | int SCREEN_WIDTH = uView.getLCDWidth(); 25 | int SCREEN_HEIGHT = uView.getLCDHeight(); 26 | 27 | float d = 3; 28 | float px[] = { -d, d, d, -d, -d, d, d, -d }; 29 | float py[] = { -d, -d, d, d, -d, -d, d, d }; 30 | float pz[] = { -d, -d, -d, -d, d, d, d, d }; 31 | 32 | float p2x[] = {0,0,0,0,0,0,0,0}; 33 | float p2y[] = {0,0,0,0,0,0,0,0}; 34 | 35 | float r[] = {0,0,0}; 36 | 37 | void setup() 38 | { 39 | uView.begin(); 40 | uView.clear(ALL); 41 | uView.display(); 42 | } 43 | 44 | void loop() 45 | { 46 | drawCube(); 47 | delay(ROTATION_SPEED); 48 | } 49 | 50 | void drawCube() 51 | { 52 | r[0]=r[0]+PI/180.0; // Add a degree 53 | r[1]=r[1]+PI/180.0; // Add a degree 54 | r[2]=r[2]+PI/180.0; // Add a degree 55 | if (r[0] >= 360.0*PI/180.0) r[0] = 0; 56 | if (r[1] >= 360.0*PI/180.0) r[1] = 0; 57 | if (r[2] >= 360.0*PI/180.0) r[2] = 0; 58 | 59 | for (int i=0;i<8;i++) 60 | { 61 | float px2 = px[i]; 62 | float py2 = cos(r[0])*py[i] - sin(r[0])*pz[i]; 63 | float pz2 = sin(r[0])*py[i] + cos(r[0])*pz[i]; 64 | 65 | float px3 = cos(r[1])*px2 + sin(r[1])*pz2; 66 | float py3 = py2; 67 | float pz3 = -sin(r[1])*px2 + cos(r[1])*pz2; 68 | 69 | float ax = cos(r[2])*px3 - sin(r[2])*py3; 70 | float ay = sin(r[2])*px3 + cos(r[2])*py3; 71 | float az = pz3-150; 72 | 73 | p2x[i] = SCREEN_WIDTH/2+ax*SHAPE_SIZE/az; 74 | p2y[i] = SCREEN_HEIGHT/2+ay*SHAPE_SIZE/az; 75 | } 76 | 77 | uView.clear(PAGE); 78 | for (int i=0;i<3;i++) 79 | { 80 | uView.line(p2x[i],p2y[i],p2x[i+1],p2y[i+1]); 81 | uView.line(p2x[i+4],p2y[i+4],p2x[i+5],p2y[i+5]); 82 | uView.line(p2x[i],p2y[i],p2x[i+4],p2y[i+4]); 83 | } 84 | uView.line(p2x[3],p2y[3],p2x[0],p2y[0]); 85 | uView.line(p2x[7],p2y[7],p2x[4],p2y[4]); 86 | uView.line(p2x[3],p2y[3],p2x[7],p2y[7]); 87 | uView.display(); 88 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewDemo/MicroViewDemo.ino: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #include 19 | #include 20 | 21 | #define clocksize 24 22 | 23 | uint16_t onDelay=5; // this is the on delay in milliseconds, if there is no on delay, the erase will be too fast to clean up the screen. 24 | 25 | void setup() { 26 | uView.begin(); // begin of MicroView 27 | uView.clear(ALL); // erase hardware memory inside the OLED controller 28 | uView.display(); // display the content in the buffer memory, by default it is the MicroView logo 29 | setTime(10,10,01,17,1,2014); 30 | delay(700); 31 | uView.clear(PAGE); // erase the memory buffer, when next uView.display() is called, the OLED will be cleared. 32 | } 33 | 34 | void displayConnect(char * value, char * text) { 35 | int y=0; 36 | uView.clear(PAGE); 37 | uView.setCursor(0,y); 38 | uView.print("Connect a"); 39 | if (strlen(value)>0) { 40 | uView.setCursor(0,y+10); 41 | uView.print(value); 42 | uView.setCursor(0,y+20); 43 | } 44 | else 45 | uView.setCursor(0,y+10); 46 | uView.print(text); 47 | uView.display(); 48 | } 49 | 50 | void displayRemove(char * text) { 51 | int y=0; 52 | uView.clear(PAGE); 53 | uView.setCursor(0,y); 54 | uView.print("Well done!"); 55 | uView.setCursor(0,y+9); 56 | uView.print("Remove the"); 57 | uView.setCursor(0,y+18); 58 | uView.print(text); 59 | uView.setCursor(0,y+27); 60 | uView.print("to proceed"); 61 | uView.display(); 62 | } 63 | 64 | int getXpos(int pin) { 65 | byte xpos[] = {0,0,8,17,26,34,42,51,59,59,51,42,34,26,17,8,0}; 66 | return xpos[pin]; 67 | } 68 | 69 | int getYpos(int pin) { 70 | if ((pin >0) && (pin <9)) { 71 | return 41; 72 | } 73 | else { 74 | return 6; 75 | } 76 | } 77 | 78 | void drawPin(int pin) { 79 | int x,y, dir; 80 | int color=WHITE; 81 | 82 | if ((pin >0) && (pin <9)) { 83 | dir=0; 84 | } 85 | else { 86 | dir=1; 87 | } 88 | 89 | x=getXpos(pin); 90 | y=getYpos(pin); 91 | 92 | if (dir==0) { 93 | uView.drawChar(x,y-10,pin+48,color,XOR); 94 | 95 | uView.line(x,y,x,y+4,color,XOR); 96 | x++; 97 | uView.line(x,y,x,y+5,color,XOR); 98 | x++; 99 | uView.line(x,y,x,y+6,color,XOR); 100 | x++; 101 | uView.line(x,y,x,y+5,color,XOR); 102 | x++; 103 | uView.line(x,y,x,y+4,color,XOR); 104 | } 105 | else { 106 | if (pin<10) 107 | uView.drawChar(x,y+3,pin+48,color,XOR); 108 | else { 109 | char str[5]; 110 | sprintf(str, "%d", pin); 111 | uView.drawChar(x,y+3,str[0],color,XOR); 112 | uView.drawChar(x,y+11, str[1],color,XOR); 113 | } 114 | 115 | uView.line(x,y,x,y-4,color,XOR); 116 | x++; 117 | uView.line(x,y,x,y-5,color,XOR); 118 | x++; 119 | uView.line(x,y,x,y-6,color,XOR); 120 | x++; 121 | uView.line(x,y,x,y-5,color,XOR); 122 | x++; 123 | uView.line(x,y,x,y-4,color,XOR); 124 | 125 | } 126 | uView.display(); 127 | } 128 | 129 | void fromPinToPin(int pin1, int pin2) { 130 | int x1,y1,x2,y2; 131 | x1=getXpos(pin1); 132 | y1=getYpos(pin1); 133 | x2=getXpos(pin2); 134 | uView.line(x1+6,y1-6, x2-1, y1-6); 135 | uView.display(); 136 | drawPin(pin1); 137 | drawPin(pin2); 138 | } 139 | 140 | void doJumper(int pin1, int pin2) { 141 | int result; 142 | int sense; 143 | 144 | switch(pin1) { 145 | case 7: sense=A0; break; 146 | case 6: sense=A1; break; 147 | case 5: sense=A2; break; 148 | case 4: sense=A3; break; 149 | case 3: sense=A4; break; 150 | case 2: sense=A5; break; 151 | default: return; 152 | } 153 | displayConnect("","jumper"); 154 | 155 | pinMode(sense,INPUT); 156 | digitalWrite(sense,HIGH); 157 | 158 | result=digitalRead(sense); 159 | while(result==1) { 160 | fromPinToPin(pin1,pin2); // on 161 | delay(300); 162 | fromPinToPin(pin1,pin2); // off 163 | delay(300); 164 | fromPinToPin(pin1,pin2); // on 165 | delay(300); 166 | result=digitalRead(sense); 167 | 168 | } 169 | 170 | uView.clear(PAGE); 171 | 172 | displayRemove("jumper"); 173 | 174 | result=digitalRead(sense); 175 | while(result==0) { 176 | result=digitalRead(sense); 177 | } 178 | uView.clear(PAGE); 179 | uView.display(); 180 | } 181 | 182 | void doResistor(int pin1, int pin2, int value, int LED) { 183 | int result,result2; 184 | int sense; 185 | int analogValue; 186 | int ledout; 187 | char resvalue[20]; 188 | 189 | if (value==330) 190 | analogValue=25; 191 | else 192 | analogValue=230; 193 | 194 | switch(pin1) { 195 | case 7: sense=A0; break; 196 | case 6: sense=A1; break; 197 | case 5: sense=A2; break; 198 | case 4: sense=A3; break; 199 | case 3: sense=A4; break; 200 | case 2: sense=A5; break; 201 | default: return; 202 | } 203 | 204 | sprintf(resvalue,"%d",value); 205 | strcat(resvalue," ohm"); 206 | displayConnect(resvalue,"resistor"); 207 | 208 | pinMode(sense,INPUT); 209 | digitalWrite(sense,HIGH); 210 | 211 | while(1) { 212 | fromPinToPin(pin1,pin2); // on 213 | delay(300); 214 | fromPinToPin(pin1,pin2); // off 215 | delay(300); 216 | fromPinToPin(pin1,pin2); // on 217 | delay(300); 218 | result=analogRead(sense); 219 | Serial.println(result); 220 | if ((result>(analogValue-20)) && (result<(analogValue+20))) { 221 | break; 222 | } 223 | } 224 | 225 | uView.clear(PAGE); 226 | 227 | if (LED==0) { 228 | displayRemove("resistor"); 229 | result=analogRead(sense); 230 | while(1) { 231 | result=analogRead(sense); 232 | if(result>(analogValue+20)) 233 | break; 234 | } 235 | } 236 | else { 237 | uView.clear(PAGE); 238 | 239 | int outpin=pin1-1; 240 | switch(outpin) { 241 | case 7: ledout=A0; break; 242 | case 6: ledout=A1; break; 243 | case 5: ledout=A2; break; 244 | case 4: ledout=A3; break; 245 | case 3: ledout=A4; break; 246 | case 2: ledout=A5; break; 247 | default: return; 248 | } 249 | pinMode(ledout,OUTPUT); 250 | displayConnect("","LED"); 251 | fromPinToPin(pin1,pin2); 252 | drawPin(pin1); 253 | uView.display(); 254 | while(1) { 255 | digitalWrite(ledout,HIGH); 256 | fromPinToPin(pin1-1,pin1); // on 257 | delay(300); 258 | digitalWrite(ledout,LOW); 259 | fromPinToPin(pin1-1,pin1); // off 260 | delay(300); 261 | result=analogRead(sense); 262 | digitalWrite(ledout,HIGH); 263 | fromPinToPin(pin1-1,pin1); // on 264 | delay(300); 265 | result2=analogRead(sense); 266 | Serial.print(result); 267 | Serial.print(","); 268 | Serial.println(result2); 269 | if ((result2-result)>400) { 270 | Serial.println("LED is blinking..."); 271 | break; 272 | } 273 | } 274 | uView.clear(PAGE); 275 | uView.setCursor(0,0); 276 | uView.print("Well done!"); 277 | uView.setCursor(0,10); 278 | uView.print("The LED is"); 279 | uView.setCursor(0,20); 280 | uView.print("BLINKING!"); 281 | 282 | uView.setCursor(0,40); 283 | uView.print("Thanks."); 284 | uView.display(); 285 | 286 | long longdly=millis(); 287 | 288 | while(1) { 289 | digitalWrite(ledout,HIGH); 290 | delay(300); 291 | digitalWrite(ledout,LOW); 292 | delay(300); 293 | if ((millis()-longdly)>6000) 294 | break; 295 | } 296 | } 297 | } 298 | 299 | void displayTry() { 300 | int y=0; 301 | uView.clear(PAGE); 302 | uView.setCursor(0,y); 303 | uView.print("Now you"); 304 | uView.setCursor(0,y+10); 305 | uView.print("have seen"); 306 | uView.setCursor(0,y+20); 307 | uView.print("our demo."); 308 | uView.display(); 309 | delay(onDelay); 310 | uView.clear(PAGE); 311 | uView.setCursor(0,y); 312 | uView.print("Let's try"); 313 | uView.setCursor(0,y+10); 314 | uView.print("our"); 315 | uView.setCursor(0,y+20); 316 | uView.print("built-in"); 317 | uView.setCursor(0,y+30); 318 | uView.print("tutorials."); 319 | uView.display(); 320 | delay(onDelay); 321 | uView.clear(PAGE); 322 | uView.setCursor(0,y); 323 | uView.print("When you"); 324 | uView.setCursor(0,y+10); 325 | uView.print("see PINs"); 326 | uView.setCursor(0,y+20); 327 | uView.print("blinking,"); 328 | uView.setCursor(0,y+30); 329 | uView.print("connect"); 330 | uView.setCursor(0,y+40); 331 | uView.print("the PINs"); 332 | uView.display(); 333 | delay(onDelay); 334 | uView.clear(PAGE); 335 | uView.setCursor(0,y); 336 | uView.print("to the"); 337 | uView.setCursor(0,y+10); 338 | uView.print("component"); 339 | uView.setCursor(0,y+20); 340 | uView.print("mentioned."); 341 | uView.display(); 342 | delay(onDelay); 343 | 344 | } 345 | 346 | void displayEnd() { 347 | int y=0; 348 | uView.clear(PAGE); 349 | uView.setCursor(0,y); 350 | uView.print("Please"); 351 | uView.setCursor(0,y+10); 352 | uView.print("proceed to"); 353 | uView.setCursor(0,y+20); 354 | uView.print("MicroView"); 355 | uView.setCursor(0,y+30); 356 | uView.print("website."); 357 | uView.display(); 358 | delay(onDelay); 359 | } 360 | 361 | void loop() { 362 | int i; 363 | static double counter=99999; 364 | static unsigned long mSec=millis()+1000; 365 | static uint8_t x0,y0,x1,y1; 366 | static float degresshour,degressmin,degresssec,hourx,houry,minx,miny,secx,secy; 367 | static boolean drawnFirst=false; 368 | 369 | uView.setFontType(0); // set font type 0, please see declaration in MicroView.cpp 370 | uView.setCursor(27,0); // points cursor to x=27 y=0 371 | uView.print(12); 372 | uView.setCursor(30,uView.getLCDHeight()-uView.getFontHeight()); 373 | uView.print(6); 374 | uView.setCursor(0,uView.getLCDHeight() /2-(uView.getFontHeight()/2)); 375 | uView.print(9); 376 | uView.setCursor(uView.getLCDWidth()-uView.getFontWidth(),uView.getLCDHeight()/2-(uView.getFontHeight()/2)); 377 | uView.print(3); 378 | uView.display(); // display the memory buffer drawn 379 | 380 | while ((second() % 11 )!=0) { 381 | if (mSec!=(unsigned long)second()) { 382 | if (drawnFirst) { 383 | uView.line(32,24,32+hourx,24+houry,WHITE,XOR); 384 | uView.line(32,24,32+minx,24+miny,WHITE,XOR); 385 | uView.line(32,24,32+secx,24+secy,WHITE,XOR); 386 | } 387 | 388 | degresshour = (((hour() * 360) / 12) + 270) * (PI / 180); 389 | degressmin = (((minute() * 360) / 60) + 270) * (PI / 180); 390 | degresssec = (((second() * 360) / 60) + 270) * (PI / 180); 391 | 392 | hourx = cos(degresshour) * (clocksize / 2.5); 393 | houry = sin(degresshour) * (clocksize / 2.5); 394 | 395 | minx = cos(degressmin) * (clocksize / 1.4); 396 | miny = sin(degressmin) * (clocksize / 1.4); 397 | 398 | secx = cos(degresssec) * (clocksize / 1.1); 399 | secy = sin(degresssec) * (clocksize / 1.1); 400 | 401 | 402 | uView.line(32,24,32+hourx,24+houry,WHITE,XOR); 403 | uView.line(32,24,32+minx,24+miny,WHITE,XOR); 404 | uView.line(32,24,32+secx,24+secy,WHITE,XOR); 405 | drawnFirst=true; 406 | uView.display(); 407 | 408 | mSec=second(); 409 | } 410 | } 411 | drawnFirst=false; 412 | uView.clear(PAGE); 413 | 414 | int maxX=40; 415 | onDelay=30; 416 | uView.setFontType(0); 417 | uView.setCursor(0,40); 418 | uView.print(" SPRITE "); 419 | for (int x=0; x0;x-=2) { 457 | uView.setFontType(4); 458 | uView.drawChar(x,10,48,WHITE, XOR); 459 | uView.setFontType(5); 460 | uView.drawChar(40-x,0,48,WHITE,XOR); 461 | uView.setFontType(6); 462 | uView.drawChar(x,32,48,WHITE,XOR); 463 | 464 | uView.display(); 465 | delay(onDelay); 466 | uView.setFontType(4); 467 | uView.drawChar(x,10,48,WHITE, XOR); 468 | uView.setFontType(5); 469 | uView.drawChar(40-x,0,48,WHITE,XOR); 470 | uView.setFontType(6); 471 | uView.drawChar(x,32,48,WHITE,XOR); 472 | 473 | uView.display(); 474 | uView.setFontType(4); 475 | uView.drawChar(x,10,49,WHITE, XOR); 476 | uView.setFontType(5); 477 | uView.drawChar(40-x,0,49,WHITE,XOR); 478 | uView.setFontType(6); 479 | uView.drawChar(x,32,49,WHITE,XOR); 480 | 481 | uView.display(); 482 | delay(onDelay); 483 | uView.setFontType(4); 484 | uView.drawChar(x,10,49,WHITE, XOR); 485 | uView.setFontType(5); 486 | uView.drawChar(40-x,0,49,WHITE,XOR); 487 | uView.setFontType(6); 488 | uView.drawChar(x,32,49,WHITE,XOR); 489 | 490 | uView.display(); 491 | } 492 | 493 | onDelay=5; 494 | uView.setFontType(0); 495 | uView.setCursor(0,40); 496 | uView.print(" LINE "); 497 | uView.display(); 498 | delay(500); 499 | 500 | for (i=0; i<150;i++) { 501 | x0=random(64); 502 | x1=random(64); 503 | y0=random(48); 504 | y1=random(48); 505 | 506 | uView.line(x0,y0,x1,y1, WHITE, XOR); // draw line from x0,y0 to x1,y1 using WHITE color and XOR draw mode 507 | uView.display(); 508 | delay(onDelay); 509 | uView.line(x0,y0,x1,y1, WHITE,XOR); 510 | uView.display(); 511 | } 512 | 513 | uView.setCursor(0,40); 514 | uView.print("RECTANGLE "); 515 | uView.display(); 516 | delay(500); 517 | 518 | x0=0;y0=0;x1=0;y1=0; 519 | for (i=1; i<64;i++) { 520 | y1=i; 521 | if (y1>47) y1=47; 522 | uView.rect(x0,y0,i,y1,WHITE,XOR); // draw rectangle from x0,y0 with width of i and height of y1 using WHITE color and XOR draw mode 523 | uView.display(); 524 | delay(onDelay); 525 | uView.rect(x0,y0,i,y1,WHITE,XOR); 526 | uView.display(); 527 | } 528 | 529 | uView.setCursor(0,40); 530 | uView.print(" CIRCLE "); 531 | uView.display(); 532 | delay(500); 533 | 534 | x0=32;y0=24; 535 | for (i=0;i<32;i++) { 536 | uView.circle(x0,y0,i,WHITE,XOR); // draw circle at x0,y0 with radius of i using WHITE color and XOR draw mode 537 | uView.display(); 538 | delay(onDelay); 539 | uView.circle(x0,y0,i,WHITE,XOR); 540 | uView.display(); 541 | delay(onDelay); 542 | 543 | } 544 | delay(500); 545 | 546 | uView.clear(PAGE); 547 | uView.setCursor(0,40); 548 | uView.print(" Font 0 "); 549 | uView.display(); 550 | 551 | uView.setFontType(0); 552 | uView.setCursor(0,0); 553 | uView.print("01234567890ABCDabcd01234567890ABCDabcd"); 554 | uView.display(); 555 | delay(1500); 556 | 557 | uView.clear(PAGE); 558 | uView.setCursor(0,40); 559 | uView.print(" Font 1 "); 560 | uView.display(); 561 | 562 | uView.setFontType(1); 563 | uView.setCursor(0,0); 564 | uView.print("0123ABCDabcd"); 565 | uView.display(); 566 | delay(1500); 567 | uView.clear(PAGE); 568 | 569 | counter=99999; 570 | while (counter>99970) { 571 | 572 | if (millis()>=mSec) { 573 | 574 | uView.setFontType(3); 575 | uView.setCursor(0,0); 576 | uView.print(counter); 577 | 578 | counter--; 579 | uView.display(); 580 | mSec=millis()+100; 581 | } 582 | } 583 | uView.clear(PAGE); 584 | 585 | counter=19.99; 586 | while (counter<20.2) { 587 | 588 | if (millis()>=mSec) { 589 | 590 | uView.setFontType(2); 591 | uView.setCursor(0,0); 592 | uView.print(counter + ((int)(counter*100)%20)); 593 | 594 | uView.setCursor(0,uView.getFontHeight()); 595 | uView.print(50-counter); 596 | 597 | uView.setCursor(0,(uView.getFontHeight()*2)); 598 | uView.print(75+counter+0.02); 599 | 600 | counter+=0.01; 601 | uView.display(); 602 | mSec=millis()+100; 603 | } 604 | } 605 | uView.clear(PAGE); 606 | 607 | // Simple Tutorial 608 | uView.setFontType(0); 609 | onDelay=3500; // set 3.5 second between each message 610 | displayTry(); // show please try our tutorial 611 | doJumper(5,8); // jumper tutorial 612 | doJumper(3,8); // jumper 613 | doJumper(2,8); 614 | doResistor(4,8,330,0); 615 | doResistor(4,8,10000,0); 616 | doResistor(5,8,330,1); // Do resistor with LED ends the tutorial. 617 | displayEnd(); 618 | uView.clear(PAGE); 619 | } 620 | 621 | 622 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewFlashingHeart/MicroViewFlashingHeart.ino: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Flashing Heart Demo 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #include 19 | 20 | const unsigned char logo [] = { 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 22 | 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0xFF, 0xE0, 0xE0, 0xE0, 23 | 0xE0, 0xE0, 0xE0, 0xFF, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 24 | 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0xFF, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 25 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 27 | 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 30 | 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 32 | 0x80, 0x80, 0x80, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 34 | 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 36 | 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 38 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0xFF, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, 0x00, 39 | 0x00, 0x00, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0xFF, 0xFF, 0xFE, 0xFE, 43 | 0xFE, 0xFE, 0xFF, 0xFF, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 45 | }; 46 | 47 | 48 | const unsigned char logo2 [] = { 49 | 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 50 | 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 51 | 0xE0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 52 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 55 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 56 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 58 | 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 59 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 60 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 61 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0xFF, 62 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 63 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 64 | 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 65 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 66 | 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 67 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x0F, 68 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 69 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 71 | 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 72 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 73 | }; 74 | 75 | 76 | void setup() { 77 | uView.begin(); 78 | uView.clear(PAGE); 79 | } 80 | 81 | void loop() { 82 | unsigned char i,j; 83 | for (i=0; i<6; i++) { 84 | uView.setPageAddress(i); 85 | uView.setColumnAddress(0); 86 | for (j=0;j<0x40;j++) { 87 | uView.data(logo[i*0x40+j]); 88 | } 89 | } 90 | 91 | delay(800); 92 | 93 | for (i=0; i<6; i++) { 94 | uView.setPageAddress(i); 95 | uView.setColumnAddress(0); 96 | for (j=0;j<0x40;j++) { 97 | uView.data(logo2[i*0x40+j]); 98 | } 99 | } 100 | delay(150); 101 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewPong/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Shane Lynch 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewPong/MicroViewPong.ino: -------------------------------------------------------------------------------- 1 | /***************************************************************** 2 | MicroView_Analog_Clock.ino 3 | SFE_LSM9DS0 Library Simple Example Code 4 | Original Creation Date: February 28, 2015 5 | https://github.com/sparkfun/MicroView/tree/master/Libraries 6 | 7 | Play pong on your MicroView! Tie a potentiometer to A1 for 8 | player 1 and A2 for player 2 (optional). 9 | 10 | If you want to play against the computer, uncomment out 11 | the SINGLE_PLAYER define on line 26. 12 | 13 | Development environment specifics: 14 | IDE: Arduino 1.6.0 15 | Hardware Platform: MicroView 16 | 17 | Please see the LICENSE file included with this sketch. This 18 | software was based on MicroPong by Shane Lynch: 19 | https://github.com/iequalshane/MicroPong 20 | *****************************************************************/ 21 | #include 22 | 23 | // Uncomment out this next line if you want to play against 24 | // an AI: 25 | //#define SINGLE_PLAYER 26 | 27 | // Pins used to control player paddles. These can be any 28 | // available analog input pin: 29 | const int player1Pin = A1; 30 | #ifndef SINGLE_PLAYER 31 | const int player2Pin = A2; 32 | #endif 33 | const float sensorMaxValue = 1024.0; 34 | 35 | const int renderDelay = 16; // About 60hz 36 | const int startDelay = 4000; 37 | const int gameOverDelay = 6000; 38 | 39 | const int scoreToWin = 10; 40 | int player1Score = 0; 41 | int player2Score = 0; 42 | 43 | const float paddleWidth = LCDWIDTH / 16.0; 44 | const float paddleHeight = LCDHEIGHT / 3.0; 45 | const float halfPaddleWidth = paddleWidth / 2.0; 46 | const float halfPaddleHeight = paddleHeight / 2.0; 47 | 48 | float player1PosX = 1.0 + halfPaddleWidth; 49 | float player1PosY = 0.0; 50 | float player2PosX = LCDWIDTH - 1.0 - halfPaddleWidth; 51 | float player2PosY = 0.0; 52 | 53 | // This is only used in SINGLE_PLAYER mode: 54 | #ifdef SINGLE_PLAYER 55 | float enemyVelY = 0.5; 56 | #endif 57 | 58 | const float ballRadius = 2.0; 59 | const float ballSpeedX = 1.0; 60 | float ballPosX = LCDWIDTH / 2.0; 61 | float ballPosY = LCDHEIGHT / 2.0; 62 | float ballVelX = -1.0 * ballSpeedX; 63 | float ballVelY = 0; 64 | 65 | void setup() 66 | { 67 | initializeGraphics(); 68 | initializeInput(); 69 | displayGameStart(); 70 | } 71 | 72 | void resetGame() 73 | { 74 | player2Score = 0; 75 | player1Score = 0; 76 | player2PosY = 0.0; 77 | ballPosX = LCDWIDTH / 2.0; 78 | ballPosY = LCDHEIGHT / 2.0; 79 | ballVelX = -1.0 * ballSpeedX; 80 | ballVelY = 0.0; 81 | } 82 | 83 | void initializeGraphics() 84 | { 85 | uView.begin(); 86 | uView.setFontType(1); 87 | } 88 | 89 | void initializeInput() 90 | { 91 | digitalWrite(player1Pin, HIGH); 92 | pinMode(player1Pin, INPUT); 93 | digitalWrite(player2Pin, HIGH); 94 | pinMode(player2Pin, INPUT); 95 | } 96 | 97 | void displayGameStart() 98 | { 99 | uView.clear(PAGE); 100 | renderString(20, 10, "Get"); 101 | renderString(10, 30, "Ready!"); 102 | uView.display(); 103 | delay(startDelay); 104 | } 105 | 106 | void loop() 107 | { 108 | updateGame(); 109 | renderGame(); 110 | 111 | if (player1Score >= scoreToWin) 112 | { 113 | gameOver(true); 114 | } 115 | else if (player2Score >= scoreToWin) 116 | { 117 | gameOver(false); 118 | } 119 | } 120 | 121 | void updateGame() 122 | { 123 | updatePlayer1(); 124 | updatePlayer2(); 125 | updateBall(); 126 | } 127 | 128 | float clampPaddlePosY(float paddlePosY) 129 | { 130 | float newPaddlePosY = paddlePosY; 131 | 132 | if (paddlePosY - halfPaddleHeight < 0) 133 | { 134 | newPaddlePosY = halfPaddleHeight; 135 | } 136 | else if (paddlePosY + halfPaddleHeight > LCDHEIGHT) 137 | { 138 | newPaddlePosY = LCDHEIGHT - halfPaddleHeight; 139 | } 140 | 141 | return newPaddlePosY; 142 | } 143 | 144 | void updatePlayer1() 145 | { 146 | float knobValue = 1 - analogRead(player1Pin) / sensorMaxValue; 147 | player1PosY = clampPaddlePosY(knobValue * LCDHEIGHT); 148 | } 149 | 150 | void updatePlayer2() 151 | { 152 | // If it's a single player game, update the AI's position 153 | #ifdef SINGLE_PLAYER 154 | // Follow the ball at a set speed 155 | if (player2PosY < ballPosY) 156 | { 157 | player2PosY += enemyVelY; 158 | } 159 | else if (player2PosY > ballPosY) 160 | { 161 | player2PosY -= enemyVelY; 162 | } 163 | 164 | player2PosY = clampPaddlePosY(player2PosY); 165 | #else // Else if this is multiplayer, get player 2's position 166 | float knobValue = analogRead(player2Pin) / sensorMaxValue; 167 | player2PosY = clampPaddlePosY(knobValue * LCDHEIGHT); 168 | #endif 169 | } 170 | 171 | void updateBall() 172 | { 173 | ballPosY += ballVelY; 174 | ballPosX += ballVelX; 175 | 176 | // Top and bottom wall collisions 177 | if (ballPosY < ballRadius) 178 | { 179 | ballPosY = ballRadius; 180 | ballVelY *= -1.0; 181 | } 182 | else if (ballPosY > LCDHEIGHT - ballRadius) 183 | { 184 | ballPosY = LCDHEIGHT - ballRadius; 185 | ballVelY *= -1.0; 186 | } 187 | 188 | // Left and right wall collisions 189 | if (ballPosX < ballRadius) 190 | { 191 | ballPosX = ballRadius; 192 | ballVelX = ballSpeedX; 193 | player2Score++; 194 | } 195 | else if (ballPosX > LCDWIDTH - ballRadius) 196 | { 197 | ballPosX = LCDWIDTH - ballRadius; 198 | ballVelX *= -1.0 * ballSpeedX; 199 | player1Score++; 200 | } 201 | 202 | // Paddle collisions 203 | if (ballPosX < player1PosX + ballRadius + halfPaddleWidth) 204 | { 205 | if (ballPosY > player1PosY - halfPaddleHeight - ballRadius && 206 | ballPosY < player1PosY + halfPaddleHeight + ballRadius) 207 | { 208 | ballVelX = ballSpeedX; 209 | ballVelY = 2.0 * (ballPosY - player1PosY) / halfPaddleHeight; 210 | } 211 | } 212 | else if (ballPosX > player2PosX - ballRadius - halfPaddleWidth) 213 | { 214 | if (ballPosY > player2PosY - halfPaddleHeight - ballRadius && 215 | ballPosY < player2PosY + halfPaddleHeight + ballRadius) 216 | { 217 | ballVelX = -1.0 * ballSpeedX; 218 | ballVelY = 2.0 * (ballPosY - player2PosY) / halfPaddleHeight; 219 | } 220 | } 221 | } 222 | 223 | void renderGame() 224 | { 225 | uView.clear(PAGE); 226 | 227 | renderScores(player1Score, player2Score); 228 | renderPaddle(player1PosX, player1PosY); 229 | renderPaddle(player2PosX, player2PosY); 230 | renderBall(ballPosX, ballPosY); 231 | 232 | uView.display(); 233 | delay(renderDelay); 234 | } 235 | 236 | void renderString(int x, int y, String string) 237 | { 238 | uView.setCursor(x, y); 239 | uView.print(string); 240 | } 241 | 242 | void renderPaddle(int x, int y) 243 | { 244 | uView.rect( 245 | x - halfPaddleWidth, 246 | y - halfPaddleHeight, 247 | paddleWidth, 248 | paddleHeight); 249 | } 250 | 251 | void renderBall(int x, int y) 252 | { 253 | uView.circle(x, y, 2); 254 | } 255 | 256 | void renderScores(int firstScore, int secondScore) 257 | { 258 | renderString(10, 0, String(firstScore)); 259 | renderString(LCDWIDTH - 14, 0, String(secondScore)); 260 | } 261 | 262 | void gameOver(bool didWin) 263 | { 264 | if (didWin) 265 | { 266 | #ifdef SINGLE_PLAYER 267 | renderString(20, 10, "You"); 268 | renderString(20, 30, "Win!"); 269 | #else 270 | renderString(0, 10, "Playr 1"); 271 | renderString(15, 30, "Wins"); 272 | #endif 273 | } 274 | else 275 | { 276 | #ifdef SINGLE_PLAYER 277 | renderString(20, 10, "You"); 278 | renderString(15, 30, "Lose!"); 279 | #else 280 | renderString(0, 10, "Playr 2"); 281 | renderString(15, 30, "Wins"); 282 | #endif 283 | } 284 | 285 | uView.display(); 286 | delay(gameOverDelay); 287 | 288 | // Get ready to start the game again. 289 | resetGame(); 290 | displayGameStart(); 291 | } 292 | 293 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewSineWave/MicroViewSineWave.ino: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Sine Wave Example 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #include 19 | 20 | void setup() { 21 | uView.begin(); 22 | uView.clear(PAGE); 23 | } 24 | 25 | void loop () { 26 | int i; 27 | float rad,srad, x,y; 28 | int amp=20; 29 | int nPhase=360; 30 | 31 | for(i=0; i. 17 | */ 18 | #include 19 | 20 | MicroViewWidget *widget[4]; // declaring an array of 4 MicroViewWidget 21 | 22 | void setup() { 23 | uView.begin(); // init and start MicroView 24 | uView.clear(PAGE); // erase the memory buffer, when next uView.display() is called, the OLED will be cleared. 25 | widget[0] = new MicroViewSlider(0,0,0,100); // declare widget0 as a Slider at x=0, y=0, min=0, max=100 26 | widget[1] = new MicroViewSlider(0,10,0,150); // declare widget0 as a Slider at x=0, y=10, min=0, max=150 27 | widget[2] = new MicroViewSlider(0,20,0,50); // declare widget0 as a Slider at x=0, y=20, min=0, max=50 28 | widget[3] = new MicroViewSlider(0,30,0,200); // declare widget0 as a Slider at x=0, y=30, min=0, max=200 29 | } 30 | 31 | void loop() { 32 | for (int i=0;i<=100;i++) { 33 | widget[0]->setValue(i); // set value i to widget0 34 | widget[1]->setValue(100-i); 35 | widget[2]->setValue(i); 36 | widget[3]->setValue(100-i); 37 | uView.display(); 38 | } 39 | 40 | for(int i=100; i>=0;i--) { 41 | widget[0]->setValue(i); 42 | widget[1]->setValue(100-i); 43 | widget[2]->setValue(i); 44 | widget[3]->setValue(100-i); 45 | uView.display(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewVSlider/MicroViewVSlider.ino: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #include 19 | 20 | MicroViewWidget *vWidget1, *vWidget2; 21 | 22 | void setup() { 23 | uView.begin(); 24 | uView.clear(PAGE); 25 | 26 | vWidget1 = new MicroViewSlider(0, 0, 0, 255, WIDGETSTYLE2); 27 | vWidget2 = new MicroViewSlider(31, 0, 0, 255, WIDGETSTYLE3); 28 | } 29 | 30 | void loop() { 31 | for (int i=0;i<=255;i++) { 32 | vWidget1->setValue(i); 33 | vWidget2->setValue(255-i); 34 | uView.display(); 35 | } 36 | 37 | for(int i=255; i>=0;i--) { 38 | vWidget1->setValue(i); 39 | vWidget2->setValue(255-i); 40 | uView.display(); 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewWidgetDemo/MicroViewWidgetDemo.ino: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | 21 | // The Arduino build process doesn't create a prototype for the spin function, 22 | // (probably because it has a function pointer as a parameter) 23 | // so it's added here. 24 | void spin(int16_t lowVal, int16_t highVal, int16_t stepSize, 25 | unsigned long stepDelay, void (*drawFunction)(int16_t val)); 26 | 27 | MicroViewWidget *widget1, *widget2; 28 | 29 | int16_t prevVal; // previous widget value 30 | 31 | void setup() { 32 | uView.begin(); 33 | } 34 | 35 | void loop() { 36 | /* ==================== Demo 1 ==================== 37 | Horizontal slider style 0, with and without numeric value. 38 | Range 0 to 100. 39 | ================================================ */ 40 | demoNumber(1); 41 | 42 | widget1 = new MicroViewSlider(4, 16, 0, 100); 43 | widget2 = new MicroViewSlider(4, 32, 0, 100, WIDGETSTYLE0 + WIDGETNOVALUE); 44 | 45 | spin(0, 100, 5, 100, update2widgets); 46 | 47 | delete widget1; 48 | delete widget2; 49 | 50 | /* ==================== Demo 2 ==================== 51 | Horizontal slider style 1, with and without numeric value. 52 | Range 100 to 200. 53 | ================================================ */ 54 | demoNumber(2); 55 | 56 | widget1 = new MicroViewSlider(0, 10, 100, 200, WIDGETSTYLE1); 57 | widget2 = new MicroViewSlider(0, 32, 100, 200, WIDGETSTYLE1 + WIDGETNOVALUE); 58 | 59 | spin(100, 200, 5, 100, update2widgets); 60 | 61 | delete widget1; 62 | delete widget2; 63 | 64 | /* ==================== Demo 3 ==================== 65 | Vertical slider style 2, with and without numeric value. 66 | Range 0 to 5000. 67 | ================================================ */ 68 | demoNumber(3); 69 | 70 | widget1 = new MicroViewSlider(10, 12, 0, 5000, WIDGETSTYLE2); 71 | widget2 = new MicroViewSlider(48, 12, 0, 5000, WIDGETSTYLE2 + WIDGETNOVALUE); 72 | 73 | spin(0, 5000, 250, 100, update2widgets); 74 | 75 | delete widget1; 76 | delete widget2; 77 | 78 | /* ==================== Demo 4 ==================== 79 | Vertical slider style 3, with and without numeric value. 80 | Range -20 to 20. 81 | ================================================ */ 82 | demoNumber(4); 83 | 84 | widget1 = new MicroViewSlider(16, 4, -20, 20, WIDGETSTYLE3); 85 | widget2 = new MicroViewSlider(54, 4, -20, 20, WIDGETSTYLE3 + WIDGETNOVALUE); 86 | 87 | spin(-20, 20, 2, 100, update2widgets); 88 | 89 | delete widget1; 90 | delete widget2; 91 | 92 | /* ==================== Demo 5 ==================== 93 | Gauge style 0, with and without numeric value. 94 | Range 0 to 200. 95 | ================================================ */ 96 | demoNumber(5); 97 | 98 | widget1 = new MicroViewGauge(15, 24, 0, 200, WIDGETSTYLE0); 99 | widget2 = new MicroViewGauge(48, 24, 0, 200, WIDGETSTYLE0 + WIDGETNOVALUE); 100 | 101 | spin(0, 200, 10, 100, update2widgets); 102 | 103 | delete widget1; 104 | delete widget2; 105 | 106 | /* ==================== Demo 6 ==================== 107 | Gauge style 1, with numeric value. 108 | Range -10 to 150. 109 | ================================================ */ 110 | demoNumber(6); 111 | 112 | widget1 = new MicroViewGauge(32, 24, -10, 150, WIDGETSTYLE1); 113 | 114 | spin(-10, 150, 8, 100, update1widget); 115 | 116 | delete widget1; 117 | 118 | /* ==================== Demo 7 ==================== 119 | Gauge style 1, with no numeric value. 120 | Range 0 to 240. 121 | ================================================ */ 122 | demoNumber(7); 123 | 124 | widget1 = new MicroViewGauge(32, 24, 0, 240, WIDGETSTYLE1 + WIDGETNOVALUE); 125 | 126 | spin(0, 240, 4, 33, update1widget); 127 | 128 | delete widget1; 129 | 130 | /* ==================== Demo 8 ==================== 131 | Slider style 0, with no numeric value. 132 | Value manually displayed in hexadecimal. 133 | Range 0 to 0xff. 134 | ================================================ */ 135 | demoNumber(8); 136 | 137 | widget1 = new MicroViewSlider(4, 16, 0, 0xff, WIDGETSTYLE0 + WIDGETNOVALUE); 138 | 139 | spin(0, 0xff, 5, 39, customSlider0); 140 | 141 | delete widget1; 142 | 143 | /* ==================== Demo 9 ==================== 144 | Slider style 1, with no numeric value. 145 | Value manually displayed, centred above the slider. 146 | Range -30000 to 30000. 147 | ================================================ */ 148 | demoNumber(9); 149 | 150 | widget1 = new MicroViewSlider(2, 24, -30000, 30000, WIDGETSTYLE1 + WIDGETNOVALUE); 151 | 152 | spin(-30000, 30000, 1500, 50, customSlider1); 153 | 154 | delete widget1; 155 | 156 | /* ==================== Demo 10 ==================== 157 | Slider style 2, with no numeric value. 158 | Value manually displayed. 159 | Pointer moves from low at the top to high at the bottom. 160 | Range 0 to 600. 161 | Note: The widget getValue() method will return a wrong 162 | value. It is changed to reverse the pointer direction. 163 | ================================================ */ 164 | demoNumber(10); 165 | 166 | widget1 = new MicroViewSlider(20, 10, 0, 600, WIDGETSTYLE2 + WIDGETNOVALUE); 167 | 168 | spin(0, 600, 30, 100, customSlider2); 169 | 170 | delete widget1; 171 | 172 | /* ==================== Demo 11 ==================== 173 | Slider style 3, with no numeric value. 174 | Value manually displayed, beside the pointer. 175 | Range 0 to 11. 176 | "These go to eleven!" - Nigel Tufnel of Spinal Tap. 177 | ================================================ */ 178 | demoNumber(11); 179 | 180 | widget1 = new MicroViewSlider(24, 2, 0, 11, WIDGETSTYLE3 + WIDGETNOVALUE); 181 | prevVal = widget1->getValue(); 182 | 183 | spin(0, 11, 1, 250, customSlider3); 184 | 185 | delete widget1; 186 | 187 | /* ==================== Demo 12 ==================== 188 | Gauge style 0, with no numeric value. 189 | Value manually displayed beneath, with a decimal point, 190 | in a larger font. 191 | "km/h" added to the bottom of the gauge. 192 | For simplicity, the range and values are actually 193 | 10 times what is to be displayed, so they can be set, 194 | stored and manipulated as integers. 195 | Range 0.0 to 20.0 (actually 0 to 200). 196 | ================================================ */ 197 | demoNumber(12); 198 | 199 | widget1 = new MicroViewGauge(35, 17, 0, 200, WIDGETSTYLE0 + WIDGETNOVALUE); 200 | 201 | // draw the fixed "km/h" text 202 | uView.setCursor(widget1->getX() - 11, widget1->getY() + 11); 203 | uView.print("km/h"); 204 | 205 | spin(0, 200, 1, 40, customGauge0); 206 | 207 | delete widget1; 208 | 209 | /* ==================== Demo 13 ==================== 210 | Gauge style 1, with no numeric value. 211 | Value manually displayed as a letter. 212 | Range 1 to 26 (A to Z). 213 | ================================================ */ 214 | demoNumber(13); 215 | 216 | widget1 = new MicroViewGauge(36, 24, 1, 26, WIDGETSTYLE1 + WIDGETNOVALUE); 217 | 218 | spin( 1, 26, 1, 200, customGauge1); 219 | 220 | delete widget1; 221 | 222 | /* ================== end of loop() ================== */ 223 | } 224 | 225 | // Function to update widget1 226 | void update1widget(int16_t val) { 227 | widget1->setValue(val); 228 | } 229 | 230 | // Function to update widget1 and widget2 231 | void update2widgets(int16_t val) { 232 | widget1->setValue(val); 233 | widget2->setValue(val); 234 | } 235 | 236 | // Update function for Demo 8 237 | void customSlider0(int16_t val) { 238 | widget1->setValue(val); 239 | uView.setCursor(widget1->getX() + 34, widget1->getY() + 1); 240 | uView.print("0x"); 241 | if (val < 0x10) { // add leading 0 if necessary. Only 2 digits supported. 242 | uView.print('0'); 243 | } 244 | uView.print(val, HEX); 245 | } 246 | 247 | // Update function for Demo 9 248 | void customSlider1(int16_t val) { 249 | widget1->setValue(val); 250 | uint8_t offsetY = widget1->getY() - 10; 251 | uint8_t offsetX = widget1->getX() + 14; 252 | uView.setCursor(offsetX, offsetY); 253 | uView.print(" "); // erase the previous value in case it's longer 254 | // calculate the offset to centre the value 255 | offsetX += ((widget1->getMaxValLen() - widget1->getValLen()) * 3); 256 | uView.setCursor(offsetX, offsetY); 257 | uView.print(val); 258 | } 259 | 260 | // Update function for Demo 10 261 | void customSlider2(int16_t val) { 262 | uView.setCursor(widget1->getX() + 1, widget1->getY() + 24); 263 | widget1->drawNumValue(val); 264 | // calculate to reverse the pointer direction 265 | widget1->setValue((int16_t) ((int32_t) widget1->getMaxValue() + 266 | (int32_t) widget1->getMinValue() - 267 | (int32_t) val)); 268 | } 269 | 270 | // Update function for Demo 11 271 | void customSlider3(int16_t val) { 272 | int16_t maxVal = widget1->getMaxValue(); 273 | uint16_t range = (uint16_t) (maxVal - widget1->getMinValue()); 274 | uint8_t offsetX = widget1->getX() + 9; 275 | 276 | // erase previous value. 277 | // pointer position is calculated the same way as the widget code. 278 | uint8_t offsetY = (float)(uint16_t)(maxVal - prevVal) / (float)range * 40; 279 | uView.setCursor(offsetX, offsetY); 280 | uView.print(" "); // This is being lazy. Should calculate width for value. 281 | 282 | // draw new value 283 | offsetY = (float)(uint16_t)(maxVal - val) / (float)range * 40; 284 | uView.setCursor(offsetX, offsetY); 285 | widget1->drawNumValue(val); 286 | 287 | widget1->setValue(val); 288 | } 289 | 290 | // Update function for Demo 12 291 | void customGauge0(int16_t val) { 292 | widget1->setValue(val); 293 | 294 | uView.setCursor(widget1->getX() - 17, widget1->getY() + 19); 295 | uView.setFontType(1); 296 | // add leading space if necessary, to right justify. 297 | // only 2 digit (plus decimal) numbers are supported. 298 | if (val < 100) { 299 | uView.print(' '); 300 | } 301 | uView.print((float)val / 10, 1); 302 | uView.setFontType(0); 303 | } 304 | 305 | // Update function for Demo 13 306 | void customGauge1(int16_t val) { 307 | widget1->setValue(val); 308 | uView.setCursor(widget1->getX() - 2, widget1->getY() + 9); 309 | uView.print((char)(val + 'A' - 1)); 310 | } 311 | 312 | // Clear the screen buffer and draw the demo number in the corner 313 | void demoNumber(int num) { 314 | uView.clear(PAGE); 315 | uView.setCursor(0, 0); 316 | uView.print(num); 317 | uView.print(":"); 318 | } 319 | 320 | // Spin up, then down, through the values. 321 | // 322 | // For each value, call the update function and display the new screen. 323 | void spin(int16_t lowVal, int16_t highVal, int16_t stepSize, 324 | unsigned long stepDelay, void (*drawFunction)(int16_t val)) { 325 | drawFunction(lowVal); 326 | uView.display(); 327 | prevVal = lowVal; 328 | delay(1500); 329 | 330 | for (int16_t i = lowVal + stepSize; i <= highVal; i += stepSize) { 331 | drawFunction(i); 332 | uView.display(); 333 | prevVal = i; 334 | delay(stepDelay); 335 | if ((i == 0) && (lowVal != 0)) { // pause briefly for a value of 0 336 | delay(750); 337 | } 338 | } 339 | 340 | delay(1500); 341 | 342 | for (int16_t i = highVal; i >= lowVal; i -= stepSize) { 343 | drawFunction(i); 344 | uView.display(); 345 | prevVal = i; 346 | delay(stepDelay); 347 | if ((i == 0) && (lowVal != 0)) { // pause briefly for a value of 0 348 | delay(750); 349 | } 350 | } 351 | 352 | delay(1500); 353 | } 354 | 355 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/MicroViewWidgetRedraw/MicroViewWidgetRedraw.ino: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #include 19 | 20 | MicroViewWidget *widget[2]; // declaring an array of 4 MicroViewWidget 21 | 22 | void setup() { 23 | uView.begin(); // init and start MicroView 24 | widget[0] = new MicroViewSlider(0,0,0,255); // declare widget0 as a Slider at x=0, y=0, min=0, max=100 25 | widget[1] = new MicroViewGauge(32,24,0,255,WIDGETSTYLE0); // declare widget0 as a Slider at x=0, y=10, min=0, max=150 26 | uView.clear(PAGE); // erase the memory buffer, when next uView.display() is called, the OLED will be cleared. 27 | } 28 | 29 | void loop() { 30 | 31 | widget[0]->reDraw(); 32 | for (int i=0;i<=255;i++) { 33 | widget[0]->setValue(i); // set value i to widget0 34 | uView.display(); 35 | } 36 | 37 | delay(500); 38 | uView.clear(PAGE); 39 | 40 | widget[1]->reDraw(); 41 | for (int i=0;i<=255;i++) { 42 | widget[1]->setValue(i); // set value i to widget0 43 | uView.display(); 44 | } 45 | 46 | delay(500); 47 | uView.clear(PAGE); 48 | } 49 | -------------------------------------------------------------------------------- /Libraries/Arduino/extras/OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Libraries/Arduino/extras/OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf -------------------------------------------------------------------------------- /Libraries/Arduino/extras/README.md: -------------------------------------------------------------------------------- 1 | NOTE: THIS DOCUMENTATION IS DEPRECATED. 2 | ======================================= 3 | MicroView 4 | --------- 5 | # MicroView Arduino Library 6 | Developed by [Geek Ammo Pty Ltd](http://www.geekammo.com) based on Arduino and other Open Source libraries. 7 | 8 | ## Description 9 | Arduino library for MicroView. 10 | 11 | ## Required Libraries 12 | 1. [Time.h](http://www.pjrc.com/teensy/td_libs_Time.html) NOTE: Only required when using clock/time functions. For example the MicroViewDemo in the example folder. 13 | 14 | ## Installation 15 | 1. Change directory to Arduino's main directory 16 | 2. cd libraries 17 | 3. mkdir MicroView 18 | 4. cd MicroView 19 | 5. git clone https://github.com/geekammo/MicroView-Arduino-Library.git . 20 | 6. Start Arduino IDE. 21 | 7. MicroView example is located at, File--->Example--->MicroView--->MicroViewDemo 22 | 23 | ### Example 1 - Hello World! 24 |

 25 | #include <MicroView.h>
 26 | 
 27 | void setup() {
 28 |     uView.begin();
 29 | }
 30 | 
 31 | void loop() {
 32 |     uView.print("HelloWorld");
 33 |     uView.display();		// display current page buffer
 34 | }
 35 | 
36 | 37 | ### Example 2 - Basic Drawing 38 |

 39 | #include <MicroView.h>
 40 | 
 41 | void setup() {
 42 |     uView.begin();
 43 |     uView.clear(PAGE);		// clear the page buffer
 44 | }
 45 | 
 46 | void loop() {
 47 |     uView.line(0,0,64,48);
 48 |     uView.circle(32,24,10);
 49 |     uView.rect(10,10,20,20);
 50 |     uView.pixel(50,5);
 51 |     uView.setCursor(0,40);
 52 |     uView.print(" MicroView");
 53 |     uView.display();		// display current page buffer
 54 | }
 55 | 
56 | 57 | ### Example 3 - Widgets 58 |

 59 | #include <MicroView.h>
 60 | 
 61 | MicroViewWidget *widget,*widget2;
 62 | 
 63 | void setup() {
 64 |     uView.begin();
 65 |     uView.clear(PAGE);
 66 |     widget= new MicroViewGauge(32,30,0,100);  // draw Gauge widget at x=32,y=30,min=0, max=100
 67 |     widget2= new MicroViewSlider(0,0,0,100);  // draw Slider widget at x=0,y=0,min=0, max=100
 68 | }
 69 | 
 70 | void loop() {
 71 |     for(int i=0; i<=100;i++) {
 72 |         widget->setValue(i);	// give a value to widget
 73 |         widget2->setValue(i);
 74 |         uView.display();		// display current page buffer
 75 |     }
 76 | }
 77 | 
78 | 79 | ### Example 4 - Communication 80 |

 81 | #include <MicroView.h>
 82 | 
 83 | void setup() {
 84 |     uView.begin();
 85 |     uView.clear(PAGE);
 86 | 	Serial.begin(115200);	// user decide the baud rate
 87 | }
 88 | 
 89 | void loop() {
 90 |     uView.checkComm();
 91 | }
 92 | 
93 | 94 | ## History 95 | **v1.22b: 4th October 2014 by Scott Allen and Ben Lewis** 96 | * replaced circleFill() with a faster algorithm, better looking circle - Ben Lewis 97 | * replaced sprintf with dedicated code, reduced program size - Scott Allen 98 | * added getValLen method for widgets to return length of current value - Scott Allen 99 | * initialised widget with minimum value instead of 0 - Scott Allen 100 | * added getValLen and getMaxValLen keywords 101 | * modified MicroViewDemo example to use getValLen method - Scott Allen 102 | 103 | **v1.21b: 22nd September 2014 by Esmit Pérez and Scott Allen** 104 | * re-factored code if/else with switch - Esmit Pérez 105 | * simplified draw() to remove redundant code - Esmit Pérez 106 | * added WIDGETNOVALUE to widgets - Scott 107 | * fixed compiler warning - Scott 108 | * improved gauge minor ticks - Scott 109 | * added destructor for MicroViewWidget base class - Scott 110 | 111 | **v1.20b: 27th August 2014 by Scott Allen, Emil Ong** 112 | * added Flashing Heart Example - JP 113 | * added getScreenBuffer() for access to screen RAM - Scott 114 | * added keywords for existing functions - Scott 115 | * fixed circleFill() - Emil 116 | 117 | **v1.19b: 19th August 2014 by Scott Allen** 118 | * added uView.scrollLeft() function 119 | * simplified Silder Widget drawFace() function 120 | * added full signed 16 bit ranges for widgets 121 | * improved drawing for minor and major ticks 122 | 123 | **v1.18b: 5th August 2014 by Scott Allen** 124 | * fixed compiler warning in MicroViewSlider 125 | * changed vertical slider direction. 126 | 127 | **v1.17b: 4th August 2014 by JP Liew** 128 | * added reDraw() for MicroViewWidget class 129 | * removed Serial.begin() from uView.begin() so that user can have control 130 | * added MicroViewWidgetRedraw example 131 | 132 | **v1.16b: 3rd August 2014 by czetie** 133 | * added vertical slider widget 134 | 135 | **v1.15b: 3rd August 2014 by Scott Allen** 136 | * improved lots of low level routines, Fast SPI 137 | * fixed some compilation warnings 138 | * reduced overdriving display inputs 139 | * added uView.end() to power off the display 140 | * improved speed of display() and clear() functions 141 | * fixed positionning of "3" on clock face 142 | 143 | **v1.14b: 26th July 2014 by JP Liew** 144 | * added Learning Kit Circuit Sketch 145 | 146 | **v1.13b: 13th June 2014 by JP Liew** 147 | * added Sine Wave Example 148 | * inserted license to example code 149 | 150 | **v1.12b: 11th June 2014 by JP Liew** 151 | * added comments for SparkFun Logo 152 | * added Rotating Cube example by Jim Lindblom @ SparkFun Electronics 153 | * changed git clone instruction to use https 154 | 155 | **v1.11b: 9th June 2014 by JP Liew** 156 | * added simple tutorials for production sketch 157 | * modified OLED RESET pin to 7 158 | * added SparkFun Logo 159 | 160 | **v1.10b: 22th April 2014 by JP Liew** 161 | * changed SS, RESET, DC pins to use weak internal pull-up resistors 162 | 163 | **v1.09b: 17th April 2014 by JP Liew** 164 | * changed verticalFlip() to flipVertical() and horizontalFlip() to flipHorizontal() for consistency 165 | * added debug messages for doCmd() 166 | 167 | **v1.08b: 18th February 2014 by JP Liew** 168 | * added verticalFlip(), horizontalFlip() 169 | 170 | **v1.07b: 15th February 2014 by JP Liew** 171 | * changed function name stopScroll to scrollStop for consistency 172 | * added contrast function 173 | * added invert function 174 | * added KEYWORD to keywords.txt 175 | * added checkComm() function to communicate with host PC 176 | 177 | **v1.06b: 9th February 2014 by JP Liew** 178 | * fixed Slider negative value not working 179 | * added round Gauge widget 180 | * changed Example 3 to show round Gauge 181 | 182 | **v1.05b: 6th February 2014 by JP Liew** 183 | * changed MICROVIEW class name to MicroView 184 | * created MicroViewWidget class 185 | * added routines to draw widget 186 | * added slider widget 187 | * merged MicroViewWidget into MicroView 188 | * merged SPI.h into MicroView 189 | 190 | **v1.04b: 3rd February 2014 by JP Liew** 191 | * declared permanent uView variable. 192 | * cleaned code and added some remarks. 193 | * added drawing functions that make use of default color and draw mode. 194 | * added example in README.md 195 | 196 | **v1.03b: 1st February 2014 by JP Liew** 197 | * added 7 segment number only font. 198 | 199 | **v1.02b: 31th January 2014 by JP Liew** 200 | * added sprite animation demo. 201 | 202 | **v1.01b: 30th January 2014 by JP Liew** 203 | * fixed font draw XOR mode bug. 204 | * added analog clock demo. 205 | 206 | **v1.00b: 30th January 2014 by JP Liew** 207 | * Initial commit. Beta with minor bugs. 208 | 209 | ## License 210 | MicroView Arduino Library 211 | Copyright (C) 2014 GeekAmmo 212 | 213 | This program is free software: you can redistribute it and/or modify 214 | it under the terms of the GNU General Public License as published by 215 | the Free Software Foundation, either version 3 of the License, or 216 | (at your option) any later version. 217 | 218 | This program is distributed in the hope that it will be useful, 219 | but WITHOUT ANY WARRANTY; without even the implied warranty of 220 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 221 | GNU General Public License for more details. 222 | 223 | You should have received a copy of the GNU General Public License 224 | along with this program. If not, see . 225 | 226 | -------------------------------------------------------------------------------- /Libraries/Arduino/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For MicroView 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | MICROVIEW KEYWORD1 10 | uView KEYWORD1 11 | MicroViewWidget KEYWORD1 12 | MicroViewSlider KEYWORD1 13 | MicroViewGauge KEYWORD1 14 | 15 | ####################################### 16 | # Methods and Functions (KEYWORD2) 17 | ####################################### 18 | 19 | begin KEYWORD2 20 | clear KEYWORD2 21 | invert KEYWORD2 22 | contrast KEYWORD2 23 | display KEYWORD2 24 | setCursor KEYWORD2 25 | pixel KEYWORD2 26 | line KEYWORD2 27 | lineH KEYWORD2 28 | lineV KEYWORD2 29 | rect KEYWORD2 30 | rectFill KEYWORD2 31 | circle KEYWORD2 32 | circleFill KEYWORD2 33 | drawChar KEYWORD2 34 | getLCDWidth KEYWORD2 35 | getLCDHeight KEYWORD2 36 | setColor KEYWORD2 37 | setDrawMode KEYWORD2 38 | getFontWidth KEYWORD2 39 | getFontHeight KEYWORD2 40 | getTotalFonts KEYWORD2 41 | getFontType KEYWORD2 42 | setFontType KEYWORD2 43 | getFontStartChar KEYWORD2 44 | getFontTotalChar KEYWORD2 45 | scrollRight KEYWORD2 46 | scrollLeft KEYWORD2 47 | scrollVertRight KEYWORD2 48 | scrollVertLeft KEYWORD2 49 | scrollStop KEYWORD2 50 | flipVertical KEYWORD2 51 | flipHorizontal KEYWORD2 52 | setColumnAddress KEYWORD2 53 | setPageAddress KEYWORD2 54 | data KEYWORD2 55 | getScreenBuffer KEYWORD2 56 | 57 | getX KEYWORD2 58 | getY KEYWORD2 59 | setX KEYWORD2 60 | setY KEYWORD2 61 | getMinValue KEYWORD2 62 | getMaxValue KEYWORD2 63 | setMaxValue KEYWORD2 64 | setMinValue KEYWORD2 65 | setValue KEYWORD2 66 | getValLen KEYWORD2 67 | getMaxValLen KEYWORD2 68 | draw KEYWORD2 69 | reDraw KEYWORD2 70 | drawFace KEYWORD2 71 | drawNumValue KEYWORD2 72 | checkComm KEYWORD2 73 | 74 | ####################################### 75 | # Constants (LITERAL1) 76 | ####################################### 77 | 78 | BLACK LITERAL1 79 | WHITE LITERAL1 80 | NORM LITERAL1 81 | XOR LITERAL1 82 | PAGE LITERAL1 83 | ALL LITERAL1 84 | WIDGETSTYLE0 LITERAL1 85 | WIDGETSTYLE1 LITERAL1 86 | WIDGETSTYLE2 LITERAL1 87 | WIDGETSTYLE3 LITERAL1 88 | WIDGETNOVALUE LITERAL1 89 | 90 | -------------------------------------------------------------------------------- /Libraries/Arduino/library.properties: -------------------------------------------------------------------------------- 1 | name=SparkFun MicroView 2 | version=1.0.1 3 | author=SparkFun Electronics 4 | maintainer=SparkFun Electronics 5 | sentence=The MicroView is a chip-sized Arduino with a built-in OLED, available from SparkFun Electronics 6 | paragraph=The MicroView is a chip-sized Arduino with a built-in OLED, available from SparkFun Electronics. 7 | category=Display 8 | url=https://github.com/sparkfun/SparkFun_MicroView_Arduino_Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/MicroView.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef MICROVIEW_H 19 | #define MICROVIEW_H 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #define swap(a, b) { uint8_t t = a; a = b; b = t; } 26 | 27 | #define OLEDPWR 4 // 3.3V regulator enable 28 | 29 | // Port and bit mappings for DC, RESET, SS 30 | // ** These are CPU dependent ** 31 | #define DCPORT PORTB 32 | #define DCDDR DDRB 33 | #define DCBIT 0 34 | 35 | #define RESETPORT PORTD 36 | #define RESETDDR DDRD 37 | #define RESETBIT 7 38 | 39 | #define SSPORT PORTB 40 | #define SSDDR DDRB 41 | #define SSBIT 2 42 | 43 | // Macros to quickly set DC, RESET, SS 44 | // A HIGH sets the signal to input mode with the internal pullup enabled 45 | #define DCHIGH ((DCPORT |= _BV(DCBIT)), (DCDDR &= ~_BV(DCBIT))) 46 | #define DCLOW ((DCPORT &= ~_BV(DCBIT)), (DCDDR |= _BV(DCBIT))) 47 | 48 | #define RESETHIGH ((RESETPORT |= _BV(RESETBIT)), (RESETDDR &= ~_BV(RESETBIT))) 49 | #define RESETLOW ((RESETPORT &= ~_BV(RESETBIT)), (RESETDDR |= _BV(RESETBIT))) 50 | 51 | #define SSHIGH ((SSPORT |= _BV(SSBIT)), (SSDDR &= ~_BV(SSBIT))) 52 | #define SSLOW ((SSPORT &= ~_BV(SSBIT)), (SSDDR |= _BV(SSBIT))) 53 | 54 | // SCK, MOSI already defined by original pins_arduino.h 55 | //#define SCK 13 56 | //#define MOSI 11 57 | 58 | #define BLACK 0 59 | #define WHITE 1 60 | 61 | #define LCDWIDTH 64 62 | #define LCDHEIGHT 48 63 | #define LCDPAGES (LCDHEIGHT / 8) 64 | #define LCDCOLUMNOFFSET 32 // Visible start column within SSD1306 controller memory 65 | 66 | #define LCDTOTALWIDTH 128 // Full width of SSD1306 controller memory 67 | #define LCDTOTALHEIGHT 64 // Full height of SSD1306 controller memory 68 | #define LCDTOTALPAGES (LCDTOTALHEIGHT / 8) 69 | 70 | #define FONTHEADERSIZE 6 71 | 72 | #define NORM 0 73 | #define XOR 1 74 | 75 | #define PAGE 0 76 | #define ALL 1 77 | 78 | #define WIDGETSTYLE0 0 79 | #define WIDGETSTYLE1 1 80 | // Added for Vertical slider styles 81 | #define WIDGETSTYLE2 2 82 | #define WIDGETSTYLE3 3 83 | 84 | // Flag to be added to widget style to indicate no numeric value display 85 | #define WIDGETNOVALUE 0x80 86 | 87 | #define SETCONTRAST 0x81 88 | #define DISPLAYALLONRESUME 0xA4 89 | #define DISPLAYALLON 0xA5 90 | #define NORMALDISPLAY 0xA6 91 | #define INVERTDISPLAY 0xA7 92 | #define DISPLAYOFF 0xAE 93 | #define DISPLAYON 0xAF 94 | #define SETDISPLAYOFFSET 0xD3 95 | #define SETCOMPINS 0xDA 96 | #define SETVCOMDESELECT 0xDB 97 | #define SETDISPLAYCLOCKDIV 0xD5 98 | #define SETPRECHARGE 0xD9 99 | #define SETMULTIPLEX 0xA8 100 | #define SETLOWCOLUMN 0x00 101 | #define SETHIGHCOLUMN 0x10 102 | #define SETPAGE 0xB0 103 | #define SETADDRESSMODE 0x20 104 | #define SETCOLUMNBOUNDS 0x21 105 | #define SETPAGEBOUNDS 0x22 106 | #define SETSTARTLINE 0x40 107 | #define MEMORYMODE 0x20 108 | #define COMSCANINC 0xC0 109 | #define COMSCANDEC 0xC8 110 | #define SEGREMAP 0xA0 111 | #define CHARGEPUMP 0x8D 112 | #define EXTERNALVCC 0x01 113 | #define SWITCHCAPVCC 0x02 114 | 115 | // Scroll 116 | #define ACTIVATESCROLL 0x2F 117 | #define DEACTIVATESCROLL 0x2E 118 | #define SETVERTICALSCROLLAREA 0xA3 119 | #define RIGHTHORIZONTALSCROLL 0x26 120 | #define LEFTHORIZONTALSCROLL 0x27 121 | #define VERTICALRIGHTHORIZONTALSCROLL 0x29 122 | #define VERTICALLEFTHORIZONTALSCROLL 0x2A 123 | 124 | typedef enum CMD { 125 | CMD_CLEAR, //0 126 | CMD_INVERT, //1 127 | CMD_CONTRAST, //2 128 | CMD_DISPLAY, //3 129 | CMD_SETCURSOR, //4 130 | CMD_PIXEL, //5 131 | CMD_LINE, //6 132 | CMD_LINEH, //7 133 | CMD_LINEV, //8 134 | CMD_RECT, //9 135 | CMD_RECTFILL, //10 136 | CMD_CIRCLE, //11 137 | CMD_CIRCLEFILL, //12 138 | CMD_DRAWCHAR, //13 139 | CMD_DRAWBITMAP, //14 140 | CMD_GETLCDWIDTH, //15 141 | CMD_GETLCDHEIGHT, //16 142 | CMD_SETCOLOR, //17 143 | CMD_SETDRAWMODE //18 144 | } commCommand_t; 145 | 146 | class MicroView : public Print{ 147 | public: 148 | MicroView(void) {}; 149 | void begin(void); 150 | void end(void); 151 | 152 | //#if ARDUINO >= 100 153 | 154 | virtual size_t write(uint8_t); 155 | 156 | //#else 157 | // virtual void write(uint8_t); 158 | //#endif 159 | 160 | // RAW LCD functions 161 | void command(uint8_t c); 162 | void command(uint8_t c1, uint8_t c2); 163 | void command(uint8_t c1, uint8_t c2, uint8_t c3); 164 | void data(uint8_t c); 165 | void setColumnAddress(uint8_t add); 166 | void setPageAddress(uint8_t add); 167 | 168 | // LCD Draw functions 169 | void clear(uint8_t mode); 170 | void clear(uint8_t mode, uint8_t c); 171 | void invert(boolean inv); 172 | void contrast(uint8_t contrast); 173 | void display(void); 174 | void setCursor(uint8_t x, uint8_t y); 175 | void pixel(uint8_t x, uint8_t y); 176 | void pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode); 177 | void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1); 178 | void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode); 179 | void lineH(uint8_t x, uint8_t y, uint8_t width); 180 | void lineH(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode); 181 | void lineV(uint8_t x, uint8_t y, uint8_t height); 182 | void lineV(uint8_t x, uint8_t y, uint8_t height, uint8_t color, uint8_t mode); 183 | void rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height); 184 | void rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode); 185 | void rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height); 186 | void rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode); 187 | void circle(uint8_t x, uint8_t y, uint8_t radius); 188 | void circle(uint8_t x, uint8_t y, uint8_t radius, uint8_t color, uint8_t mode); 189 | void circleFill(uint8_t x0, uint8_t y0, uint8_t radius); 190 | void circleFill(uint8_t x0, uint8_t y0, uint8_t radius, uint8_t color, uint8_t mode); 191 | void drawChar(uint8_t x, uint8_t y, uint8_t c); 192 | void drawChar(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode); 193 | void drawBitmap(void); 194 | uint8_t getLCDWidth(void); 195 | uint8_t getLCDHeight(void); 196 | void setColor(uint8_t color); 197 | void setDrawMode(uint8_t mode); 198 | uint8_t *getScreenBuffer(void); 199 | 200 | // Font functions 201 | uint8_t getFontWidth(void); 202 | uint8_t getFontHeight(void); 203 | uint8_t getTotalFonts(void); 204 | uint8_t getFontType(void); 205 | uint8_t setFontType(uint8_t type); 206 | uint8_t getFontStartChar(void); 207 | uint8_t getFontTotalChar(void); 208 | 209 | // LCD Rotate Scroll functions 210 | void scrollRight(uint8_t start, uint8_t stop); 211 | void scrollLeft(uint8_t start, uint8_t stop); 212 | void scrollVertRight(uint8_t start, uint8_t stop); 213 | void scrollVertLeft(uint8_t start, uint8_t stop); 214 | void scrollStop(void); 215 | void flipVertical(boolean flip); 216 | void flipHorizontal(boolean flip); 217 | 218 | // Communication 219 | void checkComm(void); 220 | void doCmd(uint8_t index); 221 | 222 | private: 223 | uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; 224 | uint16_t fontMapWidth; 225 | //unsigned char *fontsPointer[TOTALFONTS]; 226 | static const unsigned char *fontsPointer[]; 227 | 228 | int readSerial(void); 229 | }; 230 | 231 | class MicroViewWidget { 232 | public: 233 | MicroViewWidget(uint8_t newx, uint8_t newy, int16_t min, int16_t max); 234 | uint8_t getX(); 235 | uint8_t getY(); 236 | void setX(uint8_t newx); 237 | void setY(uint8_t newy); 238 | int16_t getMinValue(); 239 | int16_t getMaxValue(); 240 | int16_t getValue(); 241 | void setMinValue(int16_t min); 242 | void setMaxValue(int16_t max); 243 | void setValue(int16_t val); 244 | uint8_t getValLen(); 245 | uint8_t getMaxValLen(); 246 | /** \brief Draw widget value overridden by child class. */ 247 | virtual void draw(){}; 248 | /** \brief Draw widget face overridden by child class. */ 249 | virtual void drawFace(){}; 250 | void reDraw(); 251 | void drawNumValue(int16_t value); 252 | virtual ~MicroViewWidget(){}; 253 | protected: 254 | uint8_t posX; 255 | uint8_t posY; 256 | int16_t minValue; 257 | int16_t maxValue; 258 | int16_t value; 259 | uint8_t valLen; 260 | uint8_t maxValLen; 261 | private: 262 | /** \brief Draw or erase the widget pointer. Overridden by child class. */ 263 | virtual void drawPointer(){}; 264 | void setMaxValLen(); 265 | }; 266 | 267 | class MicroViewSlider: public MicroViewWidget{ 268 | public: 269 | MicroViewSlider(uint8_t newx, uint8_t newy, int16_t min, int16_t max); 270 | MicroViewSlider(uint8_t newx, uint8_t newy, int16_t min, int16_t max, uint8_t sty); 271 | void draw(); 272 | void drawFace(); 273 | private: 274 | void drawPointer(); 275 | uint8_t style, totalTicks; 276 | bool noValDraw; 277 | int16_t prevValue; 278 | }; 279 | 280 | class MicroViewGauge: public MicroViewWidget{ 281 | public: 282 | MicroViewGauge(uint8_t newx, uint8_t newy, int16_t min, int16_t max); 283 | MicroViewGauge(uint8_t newx, uint8_t newy, int16_t min, int16_t max, uint8_t sty); 284 | void draw(); 285 | void drawFace(); 286 | private: 287 | void drawPointer(); 288 | uint8_t style, radius; 289 | bool noValDraw; 290 | int16_t prevValue; 291 | }; 292 | 293 | #define SPI_CLOCK_DIV4 0x00 294 | #define SPI_CLOCK_DIV16 0x01 295 | #define SPI_CLOCK_DIV64 0x02 296 | #define SPI_CLOCK_DIV128 0x03 297 | #define SPI_CLOCK_DIV2 0x04 298 | #define SPI_CLOCK_DIV8 0x05 299 | #define SPI_CLOCK_DIV32 0x06 300 | //#define SPI_CLOCK_DIV64 0x07 301 | 302 | #define SPI_MODE0 0x00 303 | #define SPI_MODE1 0x04 304 | #define SPI_MODE2 0x08 305 | #define SPI_MODE3 0x0C 306 | 307 | #define SPI_MODE_MASK 0x0C // CPOL = bit 3, CPHA = bit 2 on SPCR 308 | #define SPI_CLOCK_MASK 0x03 // SPR1 = bit 1, SPR0 = bit 0 on SPCR 309 | #define SPI_2XCLOCK_MASK 0x01 // SPI2X = bit 0 on SPSR 310 | 311 | class MVSPIClass { 312 | public: 313 | /** \brief Wait for SPI serial transfer complete. */ 314 | inline static void wait(); 315 | 316 | /** \brief Transfer data byte via SPI port. */ 317 | inline static void transfer(byte _data); 318 | 319 | /** \brief Set up to begin a SPI packet transmit */ 320 | static void packetBegin(); 321 | 322 | /** \brief End a SPI packet transmit */ 323 | static void packetEnd(); 324 | 325 | // SPI Configuration methods 326 | 327 | inline static void attachInterrupt(); 328 | inline static void detachInterrupt(); // Default 329 | 330 | static void begin(); // Default 331 | static void end(); 332 | 333 | static void setBitOrder(uint8_t); 334 | static void setDataMode(uint8_t); 335 | static void setClockDivider(uint8_t); 336 | }; 337 | 338 | extern MVSPIClass MVSPI; 339 | 340 | void MVSPIClass::wait() { 341 | while (!(SPSR & _BV(SPIF))) 342 | ; 343 | } 344 | 345 | void MVSPIClass::transfer(byte _data) { 346 | SPDR = _data; 347 | } 348 | 349 | void MVSPIClass::attachInterrupt() { 350 | SPCR |= _BV(SPIE); 351 | } 352 | 353 | void MVSPIClass::detachInterrupt() { 354 | SPCR &= ~_BV(SPIE); 355 | } 356 | 357 | extern MicroView uView; 358 | 359 | /** \brief Get the number of print characters for a 16 bit signed value. */ 360 | uint8_t getInt16PrintLen(int16_t val); 361 | 362 | #endif 363 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/7segment.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef FONT7SEGMENT_H 19 | #define FONT7SEGMENT_H 20 | 21 | #include 22 | 23 | static const unsigned char sevensegment [] PROGMEM = { 24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 25 | 10,16,46,12,1,20, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 27 | 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02, 0xFC, 0x78, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 0x00, 0x00, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 29 | 0xFC, 0x78, 0x00, 0x00, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x7E, 0xFF, 0x00, 0x80, 30 | 0x80, 0x80, 0x80, 0x00, 0xFF, 0x7E, 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0x00, 0x00, 31 | 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x03, 32 | 0x03, 0x02, 0xFC, 0x78, 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x78, 0xFC, 33 | 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x60, 0xF0, 0xF0, 0x60, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x3F, 0x40, 0xC0, 35 | 0xC0, 0xC0, 0xC0, 0x40, 0x3F, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 36 | 0x1C, 0x3E, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x00, 0x00, 0x00, 0x00, 0x41, 0xC1, 0xC1, 0xC1, 37 | 0xC1, 0x41, 0x3E, 0x1C, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, 0x7E, 0x00, 0x00, 38 | 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C, 0x1C, 0x3E, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 39 | 0x3E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 0x1C, 0x3E, 0x41, 0xC1, 40 | 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C, 0x00, 0x00, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C 41 | }; 42 | #endif -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/font5x7.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef FONT5X7_H 19 | #define FONT5X7_H 20 | 21 | #include 22 | 23 | // Standard ASCII 5x7 font 24 | static const unsigned char font5x7[] PROGMEM = { 25 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 26 | 5,8,0,255,12,75, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 29 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 30 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 31 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 32 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 33 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 34 | 0x00, 0x18, 0x3C, 0x18, 0x00, 35 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 36 | 0x00, 0x18, 0x24, 0x18, 0x00, 37 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 38 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 39 | 0x26, 0x29, 0x79, 0x29, 0x26, 40 | 0x40, 0x7F, 0x05, 0x05, 0x07, 41 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 42 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 43 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 44 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 45 | 0x14, 0x22, 0x7F, 0x22, 0x14, 46 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 47 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 48 | 0x00, 0x66, 0x89, 0x95, 0x6A, 49 | 0x60, 0x60, 0x60, 0x60, 0x60, 50 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 51 | 0x08, 0x04, 0x7E, 0x04, 0x08, 52 | 0x10, 0x20, 0x7E, 0x20, 0x10, 53 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 54 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 55 | 0x1E, 0x10, 0x10, 0x10, 0x10, 56 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 57 | 0x30, 0x38, 0x3E, 0x38, 0x30, 58 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 60 | 0x00, 0x00, 0x5F, 0x00, 0x00, 61 | 0x00, 0x07, 0x00, 0x07, 0x00, 62 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 63 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 64 | 0x23, 0x13, 0x08, 0x64, 0x62, 65 | 0x36, 0x49, 0x56, 0x20, 0x50, 66 | 0x00, 0x08, 0x07, 0x03, 0x00, 67 | 0x00, 0x1C, 0x22, 0x41, 0x00, 68 | 0x00, 0x41, 0x22, 0x1C, 0x00, 69 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 70 | 0x08, 0x08, 0x3E, 0x08, 0x08, 71 | 0x00, 0x80, 0x70, 0x30, 0x00, 72 | 0x08, 0x08, 0x08, 0x08, 0x08, 73 | 0x00, 0x00, 0x60, 0x60, 0x00, 74 | 0x20, 0x10, 0x08, 0x04, 0x02, 75 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 76 | 0x00, 0x42, 0x7F, 0x40, 0x00, 77 | 0x72, 0x49, 0x49, 0x49, 0x46, 78 | 0x21, 0x41, 0x49, 0x4D, 0x33, 79 | 0x18, 0x14, 0x12, 0x7F, 0x10, 80 | 0x27, 0x45, 0x45, 0x45, 0x39, 81 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 82 | 0x41, 0x21, 0x11, 0x09, 0x07, 83 | 0x36, 0x49, 0x49, 0x49, 0x36, 84 | 0x46, 0x49, 0x49, 0x29, 0x1E, 85 | 0x00, 0x00, 0x14, 0x00, 0x00, 86 | 0x00, 0x40, 0x34, 0x00, 0x00, 87 | 0x00, 0x08, 0x14, 0x22, 0x41, 88 | 0x14, 0x14, 0x14, 0x14, 0x14, 89 | 0x00, 0x41, 0x22, 0x14, 0x08, 90 | 0x02, 0x01, 0x59, 0x09, 0x06, 91 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 92 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 93 | 0x7F, 0x49, 0x49, 0x49, 0x36, 94 | 0x3E, 0x41, 0x41, 0x41, 0x22, 95 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 96 | 0x7F, 0x49, 0x49, 0x49, 0x41, 97 | 0x7F, 0x09, 0x09, 0x09, 0x01, 98 | 0x3E, 0x41, 0x41, 0x51, 0x73, 99 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 100 | 0x00, 0x41, 0x7F, 0x41, 0x00, 101 | 0x20, 0x40, 0x41, 0x3F, 0x01, 102 | 0x7F, 0x08, 0x14, 0x22, 0x41, 103 | 0x7F, 0x40, 0x40, 0x40, 0x40, 104 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 105 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 106 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 107 | 0x7F, 0x09, 0x09, 0x09, 0x06, 108 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 109 | 0x7F, 0x09, 0x19, 0x29, 0x46, 110 | 0x26, 0x49, 0x49, 0x49, 0x32, 111 | 0x03, 0x01, 0x7F, 0x01, 0x03, 112 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 113 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 114 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 115 | 0x63, 0x14, 0x08, 0x14, 0x63, 116 | 0x03, 0x04, 0x78, 0x04, 0x03, 117 | 0x61, 0x59, 0x49, 0x4D, 0x43, 118 | 0x00, 0x7F, 0x41, 0x41, 0x41, 119 | 0x02, 0x04, 0x08, 0x10, 0x20, 120 | 0x00, 0x41, 0x41, 0x41, 0x7F, 121 | 0x04, 0x02, 0x01, 0x02, 0x04, 122 | 0x40, 0x40, 0x40, 0x40, 0x40, 123 | 0x00, 0x03, 0x07, 0x08, 0x00, 124 | 0x20, 0x54, 0x54, 0x78, 0x40, 125 | 0x7F, 0x28, 0x44, 0x44, 0x38, 126 | 0x38, 0x44, 0x44, 0x44, 0x28, 127 | 0x38, 0x44, 0x44, 0x28, 0x7F, 128 | 0x38, 0x54, 0x54, 0x54, 0x18, 129 | 0x00, 0x08, 0x7E, 0x09, 0x02, 130 | 0x18, 0xA4, 0xA4, 0x9C, 0x78, 131 | 0x7F, 0x08, 0x04, 0x04, 0x78, 132 | 0x00, 0x44, 0x7D, 0x40, 0x00, 133 | 0x20, 0x40, 0x40, 0x3D, 0x00, 134 | 0x7F, 0x10, 0x28, 0x44, 0x00, 135 | 0x00, 0x41, 0x7F, 0x40, 0x00, 136 | 0x7C, 0x04, 0x78, 0x04, 0x78, 137 | 0x7C, 0x08, 0x04, 0x04, 0x78, 138 | 0x38, 0x44, 0x44, 0x44, 0x38, 139 | 0xFC, 0x18, 0x24, 0x24, 0x18, 140 | 0x18, 0x24, 0x24, 0x18, 0xFC, 141 | 0x7C, 0x08, 0x04, 0x04, 0x08, 142 | 0x48, 0x54, 0x54, 0x54, 0x24, 143 | 0x04, 0x04, 0x3F, 0x44, 0x24, 144 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 145 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 146 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 147 | 0x44, 0x28, 0x10, 0x28, 0x44, 148 | 0x4C, 0x90, 0x90, 0x90, 0x7C, 149 | 0x44, 0x64, 0x54, 0x4C, 0x44, 150 | 0x00, 0x08, 0x36, 0x41, 0x00, 151 | 0x00, 0x00, 0x77, 0x00, 0x00, 152 | 0x00, 0x41, 0x36, 0x08, 0x00, 153 | 0x02, 0x01, 0x02, 0x04, 0x02, 154 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 155 | 0x1E, 0xA1, 0xA1, 0x61, 0x12, 156 | 0x3A, 0x40, 0x40, 0x20, 0x7A, 157 | 0x38, 0x54, 0x54, 0x55, 0x59, 158 | 0x21, 0x55, 0x55, 0x79, 0x41, 159 | 0x21, 0x54, 0x54, 0x78, 0x41, 160 | 0x21, 0x55, 0x54, 0x78, 0x40, 161 | 0x20, 0x54, 0x55, 0x79, 0x40, 162 | 0x0C, 0x1E, 0x52, 0x72, 0x12, 163 | 0x39, 0x55, 0x55, 0x55, 0x59, 164 | 0x39, 0x54, 0x54, 0x54, 0x59, 165 | 0x39, 0x55, 0x54, 0x54, 0x58, 166 | 0x00, 0x00, 0x45, 0x7C, 0x41, 167 | 0x00, 0x02, 0x45, 0x7D, 0x42, 168 | 0x00, 0x01, 0x45, 0x7C, 0x40, 169 | 0xF0, 0x29, 0x24, 0x29, 0xF0, 170 | 0xF0, 0x28, 0x25, 0x28, 0xF0, 171 | 0x7C, 0x54, 0x55, 0x45, 0x00, 172 | 0x20, 0x54, 0x54, 0x7C, 0x54, 173 | 0x7C, 0x0A, 0x09, 0x7F, 0x49, 174 | 0x32, 0x49, 0x49, 0x49, 0x32, 175 | 0x32, 0x48, 0x48, 0x48, 0x32, 176 | 0x32, 0x4A, 0x48, 0x48, 0x30, 177 | 0x3A, 0x41, 0x41, 0x21, 0x7A, 178 | 0x3A, 0x42, 0x40, 0x20, 0x78, 179 | 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 180 | 0x39, 0x44, 0x44, 0x44, 0x39, 181 | 0x3D, 0x40, 0x40, 0x40, 0x3D, 182 | 0x3C, 0x24, 0xFF, 0x24, 0x24, 183 | 0x48, 0x7E, 0x49, 0x43, 0x66, 184 | 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 185 | 0xFF, 0x09, 0x29, 0xF6, 0x20, 186 | 0xC0, 0x88, 0x7E, 0x09, 0x03, 187 | 0x20, 0x54, 0x54, 0x79, 0x41, 188 | 0x00, 0x00, 0x44, 0x7D, 0x41, 189 | 0x30, 0x48, 0x48, 0x4A, 0x32, 190 | 0x38, 0x40, 0x40, 0x22, 0x7A, 191 | 0x00, 0x7A, 0x0A, 0x0A, 0x72, 192 | 0x7D, 0x0D, 0x19, 0x31, 0x7D, 193 | 0x26, 0x29, 0x29, 0x2F, 0x28, 194 | 0x26, 0x29, 0x29, 0x29, 0x26, 195 | 0x30, 0x48, 0x4D, 0x40, 0x20, 196 | 0x38, 0x08, 0x08, 0x08, 0x08, 197 | 0x08, 0x08, 0x08, 0x08, 0x38, 198 | 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 199 | 0x2F, 0x10, 0x28, 0x34, 0xFA, 200 | 0x00, 0x00, 0x7B, 0x00, 0x00, 201 | 0x08, 0x14, 0x2A, 0x14, 0x22, 202 | 0x22, 0x14, 0x2A, 0x14, 0x08, 203 | 0xAA, 0x00, 0x55, 0x00, 0xAA, 204 | 0xAA, 0x55, 0xAA, 0x55, 0xAA, 205 | 0x00, 0x00, 0x00, 0xFF, 0x00, 206 | 0x10, 0x10, 0x10, 0xFF, 0x00, 207 | 0x14, 0x14, 0x14, 0xFF, 0x00, 208 | 0x10, 0x10, 0xFF, 0x00, 0xFF, 209 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 210 | 0x14, 0x14, 0x14, 0xFC, 0x00, 211 | 0x14, 0x14, 0xF7, 0x00, 0xFF, 212 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 213 | 0x14, 0x14, 0xF4, 0x04, 0xFC, 214 | 0x14, 0x14, 0x17, 0x10, 0x1F, 215 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 216 | 0x14, 0x14, 0x14, 0x1F, 0x00, 217 | 0x10, 0x10, 0x10, 0xF0, 0x00, 218 | 0x00, 0x00, 0x00, 0x1F, 0x10, 219 | 0x10, 0x10, 0x10, 0x1F, 0x10, 220 | 0x10, 0x10, 0x10, 0xF0, 0x10, 221 | 0x00, 0x00, 0x00, 0xFF, 0x10, 222 | 0x10, 0x10, 0x10, 0x10, 0x10, 223 | 0x10, 0x10, 0x10, 0xFF, 0x10, 224 | 0x00, 0x00, 0x00, 0xFF, 0x14, 225 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 226 | 0x00, 0x00, 0x1F, 0x10, 0x17, 227 | 0x00, 0x00, 0xFC, 0x04, 0xF4, 228 | 0x14, 0x14, 0x17, 0x10, 0x17, 229 | 0x14, 0x14, 0xF4, 0x04, 0xF4, 230 | 0x00, 0x00, 0xFF, 0x00, 0xF7, 231 | 0x14, 0x14, 0x14, 0x14, 0x14, 232 | 0x14, 0x14, 0xF7, 0x00, 0xF7, 233 | 0x14, 0x14, 0x14, 0x17, 0x14, 234 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 235 | 0x14, 0x14, 0x14, 0xF4, 0x14, 236 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 237 | 0x00, 0x00, 0x1F, 0x10, 0x1F, 238 | 0x00, 0x00, 0x00, 0x1F, 0x14, 239 | 0x00, 0x00, 0x00, 0xFC, 0x14, 240 | 0x00, 0x00, 0xF0, 0x10, 0xF0, 241 | 0x10, 0x10, 0xFF, 0x10, 0xFF, 242 | 0x14, 0x14, 0x14, 0xFF, 0x14, 243 | 0x10, 0x10, 0x10, 0x1F, 0x00, 244 | 0x00, 0x00, 0x00, 0xF0, 0x10, 245 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 246 | 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 247 | 0xFF, 0xFF, 0xFF, 0x00, 0x00, 248 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 249 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 250 | 0x38, 0x44, 0x44, 0x38, 0x44, 251 | 0x7C, 0x2A, 0x2A, 0x3E, 0x14, 252 | 0x7E, 0x02, 0x02, 0x06, 0x06, 253 | 0x02, 0x7E, 0x02, 0x7E, 0x02, 254 | 0x63, 0x55, 0x49, 0x41, 0x63, 255 | 0x38, 0x44, 0x44, 0x3C, 0x04, 256 | 0x40, 0x7E, 0x20, 0x1E, 0x20, 257 | 0x06, 0x02, 0x7E, 0x02, 0x02, 258 | 0x99, 0xA5, 0xE7, 0xA5, 0x99, 259 | 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 260 | 0x4C, 0x72, 0x01, 0x72, 0x4C, 261 | 0x30, 0x4A, 0x4D, 0x4D, 0x30, 262 | 0x30, 0x48, 0x78, 0x48, 0x30, 263 | 0xBC, 0x62, 0x5A, 0x46, 0x3D, 264 | 0x3E, 0x49, 0x49, 0x49, 0x00, 265 | 0x7E, 0x01, 0x01, 0x01, 0x7E, 266 | 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 267 | 0x44, 0x44, 0x5F, 0x44, 0x44, 268 | 0x40, 0x51, 0x4A, 0x44, 0x40, 269 | 0x40, 0x44, 0x4A, 0x51, 0x40, 270 | 0x00, 0x00, 0xFF, 0x01, 0x03, 271 | 0xE0, 0x80, 0xFF, 0x00, 0x00, 272 | 0x08, 0x08, 0x6B, 0x6B, 0x08, 273 | 0x36, 0x12, 0x36, 0x24, 0x36, 274 | 0x06, 0x0F, 0x09, 0x0F, 0x06, 275 | 0x00, 0x00, 0x18, 0x18, 0x00, 276 | 0x00, 0x00, 0x10, 0x10, 0x00, 277 | 0x30, 0x40, 0xFF, 0x01, 0x01, 278 | 0x00, 0x1F, 0x01, 0x01, 0x1E, 279 | 0x00, 0x19, 0x1D, 0x17, 0x12, 280 | 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 281 | 0x00, 0x00, 0x00, 0x00, 0x00 282 | }; 283 | #endif // FONT5X7_H 284 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/font8x16.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef FONT8X16_H 19 | #define FONT8X16_H 20 | 21 | #include 22 | 23 | static const unsigned char font8x16[] PROGMEM = { 24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 25 | 8,16,32,96,2,56, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 27 | 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, 28 | 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, 29 | 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, 30 | 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 31 | 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, 34 | 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, 35 | 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 36 | 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, 37 | 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 38 | 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, 39 | 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 40 | 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 41 | 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 44 | 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, 45 | 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 51 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 53 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 55 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 57 | 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, 59 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 60 | 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 61 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, 62 | 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, 63 | 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, 64 | 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, 65 | 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 66 | 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 67 | 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, 68 | 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 69 | 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, 70 | 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, 71 | 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, 72 | 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 73 | 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 74 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, 75 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 76 | 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 77 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 78 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 79 | 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 80 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 81 | 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 82 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, 83 | 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 84 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 85 | 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 86 | 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 87 | 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, 88 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 90 | 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 91 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 92 | 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, 93 | 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 94 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 95 | 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 96 | 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, 97 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, 98 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 99 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, 100 | 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 101 | 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, 102 | 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 103 | 0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, 104 | 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, 105 | 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 107 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 108 | 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 109 | 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, 110 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 111 | 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 112 | 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 113 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 114 | 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, 115 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 116 | 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 117 | 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, 118 | 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, 119 | 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, 120 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 121 | 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 122 | }; 123 | #endif 124 | 125 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/fontlargenumber.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef FONTLARGENUMBER_H 19 | #define FONTLARGENUMBER_H 20 | 21 | #include 22 | 23 | static const unsigned char fontlargenumber[] PROGMEM = { 24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 25 | 12,48,48,11,1,32, 26 | 0x00, 0xC0, 0xF8, 0x7C, 0x3E, 0x3E, 0xFC, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 27 | 0x78, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7C, 0x3C, 0x3E, 0x3E, 0xFE, 0xFC, 28 | 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x3E, 0x3E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x3E, 30 | 0x3E, 0x3E, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0xFC, 0x3E, 0x3E, 0x3E, 31 | 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0xFE, 0xFE, 0x00, 0x00, 32 | 0x00, 0x00, 0xC0, 0xF8, 0xFE, 0x3E, 0x7E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 33 | 0x7E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xF9, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 35 | 0x00, 0x00, 0x07, 0x03, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 38 | 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 40 | 0x7F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 41 | 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 42 | 0x3F, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 43 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 45 | 0xFC, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFE, 0x3F, 0x03, 0x00, 0xFF, 0xFF, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3E, 0x7E, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0xFF, 0xFF, 0x80, 0xF0, 0x7C, 0x7C, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x80, 0xF8, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9F, 0xFF, 0xF8, 0xFE, 0x1F, 49 | 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xFC, 51 | 0x7F, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xE7, 0xE0, 54 | 0xE0, 0xE0, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 55 | 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 0x3F, 57 | 0x03, 0x03, 0x1F, 0xFF, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x3E, 0x3E, 0x0F, 0x01, 58 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x07, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 61 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 62 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFF, 0xFF, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 63 | 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x80, 64 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 65 | 0x00, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 66 | 0x00, 0x00, 0x80, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 67 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0x3F, 0x7C, 0x7C, 0x3F, 0x1F, 0x03, 0x00, 0x00, 0x00, 68 | 0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7F, 0x7F, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7C, 69 | 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0x7C, 0x7C, 0x7E, 0x1F, 0x07, 70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 71 | 0x00, 0x1F, 0x3E, 0x7C, 0x7C, 0x3E, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 72 | 0x7F, 0x7C, 0x7C, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x3F, 0x7E, 0x7C, 0x7E, 0x3F, 0x1F, 0x01, 0x00, 0x00, 74 | 0x00, 0x00, 0x3E, 0x7C, 0x7C, 0x7E, 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 75 | 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 76 | }; 77 | #endif 78 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/space01.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef SPACE01_H 19 | #define SPACE01_H 20 | 21 | #include 22 | 23 | static const unsigned char space01[] PROGMEM = { 24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 25 | 22,16,48,2,0,44, 26 | 0xFC, 0xFC, 0xC0, 0xC0, 0xF3, 0xF3, 0x3C, 0x3C, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0x3C, 0x3C, 27 | 0xF3, 0xF3, 0xC0, 0xC0, 0xFC, 0xFC, 0x00, 0x00, 0xC0, 0xC0, 0xF3, 0xF3, 0x3C, 0x3C, 0xF0, 0xF0, 28 | 0xF0, 0xF0, 0xF0, 0xF0, 0x3C, 0x3C, 0xF3, 0xF3, 0xC0, 0xC0, 0x00, 0x00, 0x03, 0x03, 0xCF, 0xCF, 29 | 0x3F, 0x3F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x3F, 0x3F, 0xCF, 0xCF, 30 | 0x03, 0x03, 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, 0xCF, 0xCF, 0xCF, 0xCF, 0x0F, 0x0F, 0xCF, 0xCF, 31 | 0xCF, 0xCF, 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, 32 | }; 33 | #endif 34 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/space02.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef SPACE02_H 19 | #define SPACE02_H 20 | 21 | #include 22 | 23 | static const unsigned char space02[] PROGMEM = { 24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 25 | 24,16,48,2,0,48, 26 | 0xF0, 0xF0, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 27 | 0x3C, 0x3C, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0, 0xF0, 0xF0, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, 28 | 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0x3C, 0x3C, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0, 29 | 0xC3, 0xC3, 0xC3, 0xC3, 0x33, 0x33, 0x3F, 0x3F, 0x0F, 0x0F, 0x33, 0x33, 0x33, 0x33, 0x0F, 0x0F, 30 | 0x3F, 0x3F, 0x33, 0x33, 0xC3, 0xC3, 0xC3, 0xC3, 0x03, 0x03, 0x33, 0x33, 0xFF, 0xFF, 0xCF, 0xCF, 31 | 0x0F, 0x0F, 0x33, 0x33, 0x33, 0x33, 0x0F, 0x0F, 0xCF, 0xCF, 0xFF, 0xFF, 0x33, 0x33, 0x03, 0x03 32 | }; 33 | #endif 34 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/util/space03.h: -------------------------------------------------------------------------------- 1 | /* 2 | MicroView Arduino Library 3 | Copyright (C) 2014 GeekAmmo 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | #ifndef SPACE03_H 19 | #define SPACE03_H 20 | 21 | #include 22 | 23 | static const unsigned char space03[] PROGMEM = { 24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) 25 | 16,16,48,2,0,32, 26 | 0xC0, 0xC0, 0xF0, 0xF0, 0x3C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x3C, 0xF0, 0xF0, 0xC0, 0xC0, 27 | 0xC0, 0xC0, 0xF0, 0xF0, 0x3C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x3C, 0xF0, 0xF0, 0xC0, 0xC0, 28 | 0xC3, 0xC3, 0x33, 0x33, 0xCF, 0xCF, 0x33, 0x33, 0x33, 0x33, 0xCF, 0xCF, 0x33, 0x33, 0xC3, 0xC3, 29 | 0x33, 0x33, 0xCF, 0xCF, 0x03, 0x03, 0x0F, 0x0F, 0x0F, 0x0F, 0x03, 0x03, 0xCF, 0xCF, 0x33, 0x33 30 | }; 31 | #endif 32 | -------------------------------------------------------------------------------- /Libraries/README.md: -------------------------------------------------------------------------------- 1 | SparkFun MicroView Libraries 2 | ================================= 3 | 4 | Libraries for use in different environments. 5 | 6 | 7 | Directory Contents 8 | ------------------- 9 | * **/Arduino** - [Arduino IDE](http://www.arduino.cc/en/Main/Software) libraries 10 | 11 | 12 | License Information 13 | ------------------- 14 | This product is open source! 15 | 16 | The code is released under the GPL v3 license. For more information see the included LICENSE.md file. 17 | 18 | Distributed as-is; no warranty is given. 19 | 20 | - Your friends at SparkFun. 21 | 22 | 23 | 24 | BUILD INSTRUCTIONS: 25 | ------------------- 26 | To get the most up-to-date version of the library, please use the following git subtree commands. 27 | 28 | $git subtree add -P Libraries/Arduino --squash https://github.com/sparkfun/SparkFun_MicroView_Arduino_Library.git master 29 | 30 | $git subtree pull -P Libraries/Arduino --squash https://github.com/sparkfun/SparkFun_MicroView_Arduino_Library.git master 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MicroView 2 | ============= 3 | 4 | ![MicroView](https://cdn.sparkfun.com//assets/parts/9/8/4/5/Micro_View-01.jpg) 5 | 6 | [*SparkFun Microview (DEV-12923)*](https://www.sparkfun.com/products/12923) 7 | 8 | The MicroView is a chip-sized Arduino with a built-in OLED. Compatible with the MicroView USB Programmer linked below. 9 | 10 | Repository Contents 11 | ------------------- 12 | * **/Datasheets** - Datasheets for the OLED module 13 | * **/Enclosure** - 3D model of the standard Microview Enclosure 14 | * **/Hardware** - All Eagle design files (.brd, .sch) 15 | * **/Libraries** - All Arduino libraries and board examples 16 | * **/Production** - Test bed files and production panel files 17 | 18 | Product Versions 19 | ---------------- 20 | * [DEV-12923](https://www.sparkfun.com/products/12923)- Version 1.0 21 | * [DEV-12924](https://www.sparkfun.com/products/12924)- MicroView USB Programmer version 0.2 22 | 23 | License Information 24 | ------------------- 25 | The hardware is released under [Creative Commons ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). 26 | The code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round! 27 | 28 | Distributed as-is; no warranty is given. 29 | --------------------------------------------------------------------------------