Colorduino plasma demo, matrix test and browser simulator
- ColorduinoPlasma sketch and Colorduino library v1.2.6 (lincomatic @ fff7bd3) - ColorduinoMatrixTest hardware test sketch - web/index.html: bit-accurate port of the plasma with large resolutions - prebuilt 16 MHz firmware (with and without Optiboot) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
a18f081e0a
15 files changed
+3103
No files matched your search
@@ -0,0 +1,4 @@
|
|||||||
|
build/
|
||||||
|
*.elf
|
||||||
|
.vscode/
|
||||||
|
.claude/
|
||||||
@@ -0,0 +1,502 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# colorduino-plasma
|
||||||
|
|
||||||
|
The classic **ColorduinoPlasma** demo for the ITead Colorduino 8×8 RGB LED matrix, plus a
|
||||||
|
**browser simulator** that renders the exact same effect on your PC — at the original 8×8 or at
|
||||||
|
much higher resolutions.
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
| Path | What |
|
||||||
|
|---|---|
|
||||||
|
| `arduino/ColorduinoPlasma/` | The plasma demo sketch (from the lincomatic Colorduino library) |
|
||||||
|
| `arduino/ColorduinoMatrixTest/` | Hardware test: full colours, row/column scan, per-LED walk, brightness ramps, checkerboard |
|
||||||
|
| `libraries/Colorduino/` | Colorduino library v1.2.6 by Sam C. Lin ([lincomatic/Colorduino](https://github.com/lincomatic/Colorduino) @ `fff7bd3`) |
|
||||||
|
| `web/index.html` | Browser simulator — open it directly, no server needed |
|
||||||
|
| `firmware/` | Prebuilt hex files for ATmega328(P/PB) @ 16 MHz |
|
||||||
|
|
||||||
|
## Browser simulator
|
||||||
|
|
||||||
|
Open `web/index.html` in any browser.
|
||||||
|
|
||||||
|
It is a straight port of `plasma_morph()` / `HSVtoRGB()` and matches the AVR build bit for bit
|
||||||
|
as closely as possible:
|
||||||
|
|
||||||
|
- all maths in 32-bit float (`Math.fround`), like `double` = `float` on AVR
|
||||||
|
- the hue cast `(unsigned char)(value * 128)` **wraps negative values** (two's complement),
|
||||||
|
which is what avr-libc's `__fixunssfsi` does — clamping to 0 would give a very different image
|
||||||
|
- same `gamma8` table, same start value `paletteShift = 128000`
|
||||||
|
|
||||||
|
Controls:
|
||||||
|
|
||||||
|
- **Width / Height** — the plasma is an infinite field; a larger grid shows more of it.
|
||||||
|
The Colorduino shows the top-left 8×8 (toggle *Mark 8×8 area*).
|
||||||
|
- **Detail** — sub-samples between LED positions, so the same area renders smoothly.
|
||||||
|
- **Colour** — *LED light* converts the gamma-corrected PWM values (linear light) to sRGB so it
|
||||||
|
looks like the LEDs; *Raw PWM values* shows the bytes sent to the DM163; *Without gamma table*
|
||||||
|
skips the gamma lookup.
|
||||||
|
- **Speed**, **Rotate**, **LED dots**, pause (Space), step (→), fullscreen (F).
|
||||||
|
|
||||||
|
The board's white balance (`{36, 63, 63}`) is an LED current correction and is not applied on screen.
|
||||||
|
|
||||||
|
## Building the sketches
|
||||||
|
|
||||||
|
1. Copy `libraries/Colorduino` into your Arduino `libraries` folder
|
||||||
|
(e.g. `Documents/Arduino/libraries/Colorduino`).
|
||||||
|
2. Open a sketch from `arduino/`, select board **Arduino Uno**, and build.
|
||||||
|
|
||||||
|
With arduino-cli, no install needed:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
arduino-cli compile -b arduino:avr:uno --library libraries/Colorduino arduino/ColorduinoPlasma
|
||||||
|
```
|
||||||
|
|
||||||
|
> The library drives all of PORTD (including RX/TX), so `Serial` can't be used alongside it.
|
||||||
|
|
||||||
|
## Flashing
|
||||||
|
|
||||||
|
### Over serial (bootloader present)
|
||||||
|
|
||||||
|
Connect a USB-serial adapter (FTDI-style, with DTR for auto-reset) to the Colorduino's serial
|
||||||
|
header and upload as **Arduino Uno** (Optiboot, 115200 baud).
|
||||||
|
|
||||||
|
### Over ISP (Arduino as ISP)
|
||||||
|
|
||||||
|
A normal ISP write erases the chip, including the bootloader. Flash the combined image to keep it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
avrdude -p m328pb -c stk500v1 -P COM16 -b 19200 -U flash:w:firmware/ColorduinoPlasma_16MHz_optiboot.hex:i
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `-p m328p` if your board has an ATmega328P (signature `1E 95 0F`) rather than a 328PB
|
||||||
|
(`1E 95 16`).
|
||||||
|
|
||||||
|
Fuses used here (16 MHz crystal, 512-byte Optiboot boot section):
|
||||||
|
|
||||||
|
| low | high | extended |
|
||||||
|
|---|---|---|
|
||||||
|
| `0xFF` | `0xD6` | `0xF5` |
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The sketches, the library and the simulator (a port of the sketch) are licensed under the
|
||||||
|
GNU LGPL v2.1 or later — see [LICENSE](LICENSE). Original copyrights: Sam C. Lin (Colorduino
|
||||||
|
library and demo), Ben Combee, Ken Corey, Windell H. Oskay (color cycling plasma),
|
||||||
|
zzy@IteadStudio. The library folder includes its upstream `COPYING` file.
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
Colorduino 8x8 RGB matrix hardware test
|
||||||
|
Needs the Colorduino library (lincomatic).
|
||||||
|
|
||||||
|
Sequence (loops forever):
|
||||||
|
1. Full screen: RED, GREEN, BLUE, WHITE -> dead colour channel / driver (DM163)
|
||||||
|
2. Rows one at a time (white) -> dead row driver (M54564)
|
||||||
|
3. Columns one at a time, R then G then B -> dead column channel
|
||||||
|
4. Every LED one by one, R, G, B each -> single dead / stuck LEDs
|
||||||
|
5. Brightness ramp 0..255 per colour -> PWM / greyscale problems
|
||||||
|
6. Checkerboard + inverse -> shorts between neighbours
|
||||||
|
|
||||||
|
Note: Colorduino drives all of PORTD, so Serial cannot be used while it runs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Colorduino.h>
|
||||||
|
|
||||||
|
const uint8_t W = ColorduinoScreenWidth;
|
||||||
|
const uint8_t H = ColorduinoScreenHeight;
|
||||||
|
|
||||||
|
void show() { Colorduino.FlipPage(); }
|
||||||
|
|
||||||
|
void fill(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
|
Colorduino.ColorFill(r, g, b); // ColorFill flips the page itself
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearBuf() {
|
||||||
|
for (uint8_t y = 0; y < H; y++)
|
||||||
|
for (uint8_t x = 0; x < W; x++)
|
||||||
|
Colorduino.SetPixel(x, y, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fullColours() {
|
||||||
|
fill(255, 0, 0); delay(1500);
|
||||||
|
fill(0, 255, 0); delay(1500);
|
||||||
|
fill(0, 0, 255); delay(1500);
|
||||||
|
fill(255, 255, 255); delay(1500);
|
||||||
|
fill(0, 0, 0); delay(300);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rowScan() {
|
||||||
|
for (uint8_t y = 0; y < H; y++) {
|
||||||
|
clearBuf();
|
||||||
|
for (uint8_t x = 0; x < W; x++) Colorduino.SetPixel(x, y, 255, 255, 255);
|
||||||
|
show();
|
||||||
|
delay(400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void columnScan() {
|
||||||
|
const uint8_t cols[3][3] = {{255, 0, 0}, {0, 255, 0}, {0, 0, 255}};
|
||||||
|
for (uint8_t c = 0; c < 3; c++) {
|
||||||
|
for (uint8_t x = 0; x < W; x++) {
|
||||||
|
clearBuf();
|
||||||
|
for (uint8_t y = 0; y < H; y++)
|
||||||
|
Colorduino.SetPixel(x, y, cols[c][0], cols[c][1], cols[c][2]);
|
||||||
|
show();
|
||||||
|
delay(250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pixelWalk() {
|
||||||
|
for (uint8_t y = 0; y < H; y++) {
|
||||||
|
for (uint8_t x = 0; x < W; x++) {
|
||||||
|
clearBuf(); Colorduino.SetPixel(x, y, 255, 0, 0); show(); delay(120);
|
||||||
|
clearBuf(); Colorduino.SetPixel(x, y, 0, 255, 0); show(); delay(120);
|
||||||
|
clearBuf(); Colorduino.SetPixel(x, y, 0, 0, 255); show(); delay(120);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ramps() {
|
||||||
|
for (uint8_t c = 0; c < 4; c++) {
|
||||||
|
for (int v = 0; v <= 255; v += 3) {
|
||||||
|
uint8_t r = (c == 0 || c == 3) ? v : 0;
|
||||||
|
uint8_t g = (c == 1 || c == 3) ? v : 0;
|
||||||
|
uint8_t b = (c == 2 || c == 3) ? v : 0;
|
||||||
|
fill(r, g, b);
|
||||||
|
delay(12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void checker() {
|
||||||
|
for (uint8_t i = 0; i < 6; i++) {
|
||||||
|
for (uint8_t y = 0; y < H; y++)
|
||||||
|
for (uint8_t x = 0; x < W; x++) {
|
||||||
|
bool on = ((x + y + i) & 1);
|
||||||
|
Colorduino.SetPixel(x, y, on ? 255 : 0, on ? 255 : 0, on ? 255 : 0);
|
||||||
|
}
|
||||||
|
show();
|
||||||
|
delay(500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
Colorduino.Init();
|
||||||
|
// white balance (R, G, B), 0..63 - same default as the Plasma example
|
||||||
|
unsigned char whiteBal[3] = {36, 63, 63};
|
||||||
|
Colorduino.SetWhiteBal(whiteBal);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
fullColours();
|
||||||
|
rowScan();
|
||||||
|
columnScan();
|
||||||
|
pixelWalk();
|
||||||
|
ramps();
|
||||||
|
checker();
|
||||||
|
}
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
/*
|
||||||
|
ColorduinoPlasma - Plasma demo using Colorduino Library for Arduino
|
||||||
|
Copyright (c) 2011 Sam C. Lin lincomatic@hotmail.com ALL RIGHTS RESERVED
|
||||||
|
|
||||||
|
based on Color cycling plasma
|
||||||
|
Version 0.1 - 8 July 2009
|
||||||
|
Copyright (c) 2009 Ben Combee. All right reserved.
|
||||||
|
Copyright (c) 2009 Ken Corey. All right reserved.
|
||||||
|
Copyright (c) 2008 Windell H. Oskay. All right reserved.
|
||||||
|
Copyright (c) 2011 Sam C. Lin All Rights Reserved
|
||||||
|
|
||||||
|
This demo is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This demo is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Colorduino.h>
|
||||||
|
|
||||||
|
// To show off our hardware PWM LED driver (capable of displaying 16M colors),
|
||||||
|
// we will add gamma correction to show more accurate colors, and we will
|
||||||
|
// see better color transition.
|
||||||
|
#include "gamma8.h"
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char r;
|
||||||
|
unsigned char g;
|
||||||
|
unsigned char b;
|
||||||
|
} ColorRGB;
|
||||||
|
|
||||||
|
//a color with 3 components: h, s and v
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char h;
|
||||||
|
unsigned char s;
|
||||||
|
unsigned char v;
|
||||||
|
} ColorHSV;
|
||||||
|
|
||||||
|
// increase the scaling of the plasma to see more details of the color transition.
|
||||||
|
const float PlasmaScaling = 10.0;
|
||||||
|
unsigned char plasma[ColorduinoScreenWidth][ColorduinoScreenHeight];
|
||||||
|
long paletteShift;
|
||||||
|
|
||||||
|
|
||||||
|
//Converts an HSV color to RGB color
|
||||||
|
void HSVtoRGB(void *vRGB, void *vHSV)
|
||||||
|
{
|
||||||
|
float r, g, b, h, s, v; //this function works with floats between 0 and 1
|
||||||
|
float f, p, q, t;
|
||||||
|
int i;
|
||||||
|
ColorRGB *colorRGB=(ColorRGB *)vRGB;
|
||||||
|
ColorHSV *colorHSV=(ColorHSV *)vHSV;
|
||||||
|
|
||||||
|
h = (float)(colorHSV->h / 256.0);
|
||||||
|
s = (float)(colorHSV->s / 256.0);
|
||||||
|
v = (float)(colorHSV->v / 256.0);
|
||||||
|
|
||||||
|
//if saturation is 0, the color is a shade of grey
|
||||||
|
if(s == 0.0) {
|
||||||
|
b = v;
|
||||||
|
g = b;
|
||||||
|
r = g;
|
||||||
|
}
|
||||||
|
//if saturation > 0, more complex calculations are needed
|
||||||
|
else
|
||||||
|
{
|
||||||
|
h *= 6.0; //to bring hue to a number between 0 and 6, better for the calculations
|
||||||
|
i = (int)(floor(h)); //e.g. 2.7 becomes 2 and 3.01 becomes 3 or 4.9999 becomes 4
|
||||||
|
f = h - i;//the fractional part of h
|
||||||
|
|
||||||
|
p = (float)(v * (1.0 - s));
|
||||||
|
q = (float)(v * (1.0 - (s * f)));
|
||||||
|
t = (float)(v * (1.0 - (s * (1.0 - f))));
|
||||||
|
|
||||||
|
switch(i)
|
||||||
|
{
|
||||||
|
case 0: r=v; g=t; b=p; break;
|
||||||
|
case 1: r=q; g=v; b=p; break;
|
||||||
|
case 2: r=p; g=v; b=t; break;
|
||||||
|
case 3: r=p; g=q; b=v; break;
|
||||||
|
case 4: r=t; g=p; b=v; break;
|
||||||
|
case 5: r=v; g=p; b=q; break;
|
||||||
|
default: r = g = b = 0; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
colorRGB->r = (int)(r * 255.0);
|
||||||
|
colorRGB->g = (int)(g * 255.0);
|
||||||
|
colorRGB->b = (int)(b * 255.0);
|
||||||
|
|
||||||
|
// gamma correction
|
||||||
|
colorRGB->r = pgm_read_byte(&gamma8[colorRGB->r]);
|
||||||
|
colorRGB->g = pgm_read_byte(&gamma8[colorRGB->g]);
|
||||||
|
colorRGB->b = pgm_read_byte(&gamma8[colorRGB->b]);
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
dist(float a, float b, float c, float d)
|
||||||
|
{
|
||||||
|
return sqrt((c-a)*(c-a)+(d-b)*(d-b));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
plasma_morph()
|
||||||
|
{
|
||||||
|
unsigned char x,y;
|
||||||
|
float value;
|
||||||
|
ColorRGB colorRGB;
|
||||||
|
ColorHSV colorHSV;
|
||||||
|
|
||||||
|
for(y = 0; y < ColorduinoScreenHeight; y++)
|
||||||
|
for(x = 0; x < ColorduinoScreenWidth; x++) {
|
||||||
|
{
|
||||||
|
value = sin((x + paletteShift) / PlasmaScaling)
|
||||||
|
+ sin(dist(x, y, 64.0, 64.0) / PlasmaScaling)
|
||||||
|
+ sin((y + paletteShift / 7.0) / PlasmaScaling)
|
||||||
|
+ sin(dist(x, y, 192.0, 100.0) / PlasmaScaling);
|
||||||
|
colorHSV.h=(unsigned char)((value) * 128)&0xff;
|
||||||
|
colorHSV.s=255;
|
||||||
|
colorHSV.v=255;
|
||||||
|
HSVtoRGB(&colorRGB, &colorHSV);
|
||||||
|
|
||||||
|
Colorduino.SetPixel(x, y, colorRGB.r, colorRGB.g, colorRGB.b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
paletteShift++;
|
||||||
|
|
||||||
|
Colorduino.FlipPage(); // swap screen buffers to show it
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************************************
|
||||||
|
Name: ColorFill
|
||||||
|
Function: Fill the frame with a color
|
||||||
|
Parameter:R: the value of RED. Range:RED 0~255
|
||||||
|
G: the value of GREEN. Range:RED 0~255
|
||||||
|
B: the value of BLUE. Range:RED 0~255
|
||||||
|
********************************************************/
|
||||||
|
void ColorFill(unsigned char R,unsigned char G,unsigned char B)
|
||||||
|
{
|
||||||
|
PixelRGB *p = Colorduino.GetPixel(0,0);
|
||||||
|
for (unsigned char y=0;y<ColorduinoScreenWidth;y++) {
|
||||||
|
for(unsigned char x=0;x<ColorduinoScreenHeight;x++) {
|
||||||
|
p->r = R;
|
||||||
|
p->g = G;
|
||||||
|
p->b = B;
|
||||||
|
p++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Colorduino.FlipPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
Colorduino.Init(); // initialize the board
|
||||||
|
|
||||||
|
// compensate for relative intensity differences in R/G/B brightness
|
||||||
|
// array of 6-bit base values for RGB (0~63)
|
||||||
|
// whiteBalVal[0]=red
|
||||||
|
// whiteBalVal[1]=green
|
||||||
|
// whiteBalVal[2]=blue
|
||||||
|
unsigned char whiteBalVal[3] = {36,63,63}; // for LEDSEE 6x6cm round matrix
|
||||||
|
Colorduino.SetWhiteBal(whiteBalVal);
|
||||||
|
|
||||||
|
|
||||||
|
// start with morphing plasma, but allow going to color cycling if desired.
|
||||||
|
paletteShift=128000;
|
||||||
|
unsigned char bcolor;
|
||||||
|
|
||||||
|
//generate the plasma once
|
||||||
|
for(unsigned char y = 0; y < ColorduinoScreenHeight; y++)
|
||||||
|
for(unsigned char x = 0; x < ColorduinoScreenWidth; x++)
|
||||||
|
{
|
||||||
|
//the plasma buffer is a sum of sines
|
||||||
|
bcolor = (unsigned char)
|
||||||
|
(
|
||||||
|
128.0 + (128.0 * sin(x*8.0 / 16.0))
|
||||||
|
+ 128.0 + (128.0 * sin(y*8.0 / 16.0))
|
||||||
|
) / 2;
|
||||||
|
plasma[x][y] = bcolor;
|
||||||
|
}
|
||||||
|
|
||||||
|
// to adjust white balance you can uncomment this line
|
||||||
|
// and comment out the plasma_morph() in loop()
|
||||||
|
// and then experiment with whiteBalVal above
|
||||||
|
// ColorFill(255,255,255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
plasma_morph();
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// A simple gamma look-up-table, stored in Program Memory
|
||||||
|
// To access the table, must use: pgm_read_byte()
|
||||||
|
|
||||||
|
#ifndef _INC_GAMMA8_H_
|
||||||
|
#define _INC_GAMMA8_H_
|
||||||
|
|
||||||
|
const uint8_t PROGMEM gamma8[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5,
|
||||||
|
5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10,
|
||||||
|
10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16,
|
||||||
|
17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25,
|
||||||
|
25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36,
|
||||||
|
37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50,
|
||||||
|
51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68,
|
||||||
|
69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89,
|
||||||
|
90, 92, 93, 95, 96, 98, 99,101,102,104,105,107,109,110,112,114,
|
||||||
|
115,117,119,120,122,124,126,127,129,131,133,135,137,138,140,142,
|
||||||
|
144,146,148,150,152,154,156,158,160,162,164,167,169,171,173,175,
|
||||||
|
177,180,182,184,186,189,191,193,196,198,200,203,205,208,210,213,
|
||||||
|
215,218,220,223,225,228,231,233,236,239,241,244,247,249,252,255 };
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,274 @@
|
|||||||
|
:100000000C94EC000C9414010C9414010C94140145
|
||||||
|
:100010000C9414010C9414010C9414010C9414010C
|
||||||
|
:100020000C9414010C9460010C9414010C941401B0
|
||||||
|
:100030000C9414010C9414010C9414010C941401EC
|
||||||
|
:100040000C9416010C9414010C9414010C941401DA
|
||||||
|
:100050000C9414010C9414010C9414010C941401CC
|
||||||
|
:100060000C9414010C94140105A84CCDB2D44EB9D3
|
||||||
|
:100070003836A9020C50B9918688083CA6AAAA2A4B
|
||||||
|
:10008000BE000000803F00000000240027002A007E
|
||||||
|
:1000900000000000250028002B00040404040404D0
|
||||||
|
:1000A0000404020202020202030303030303010227
|
||||||
|
:1000B00004081020408001020408102001020408F6
|
||||||
|
:1000C00010200000000800020100000304070000E7
|
||||||
|
:1000D0000000000000000000000000000000000020
|
||||||
|
:1000E000000000000000000000000000000001010E
|
||||||
|
:1000F00001010101010101010101010101010202EE
|
||||||
|
:1001000002020202020202030303030303030404C4
|
||||||
|
:100110000404040505050506060606070707070883
|
||||||
|
:1001200008080909090A0A0A0B0B0B0C0C0D0D0D26
|
||||||
|
:100130000E0E0F0F101011111212131314141515A7
|
||||||
|
:10014000161617181819191A1B1B1C1D1D1E1F2007
|
||||||
|
:100150002021222323242526272728292A2B2C2D3A
|
||||||
|
:100160002E2F303132323334363738393A3B3C3D3A
|
||||||
|
:100170003E3F40424344454648494A4B4D4E4F510D
|
||||||
|
:100180005253555657595A5C5D5F606263656668A5
|
||||||
|
:10019000696B6D6E7072737577787A7C7E7F818300
|
||||||
|
:1001A0008587898A8C8E90929496989A9C9EA0A21C
|
||||||
|
:1001B000A4A7A9ABADAFB1B4B6B8BABDBFC1C4C6F0
|
||||||
|
:1001C000C8CBCDD0D2D5D7DADCDFE1E4E7E9ECEF7C
|
||||||
|
:1001D000F1F4F7F9FCFF310511241FBECFEFD8E091
|
||||||
|
:1001E000DEBFCDBF11E0A0E0B1E0EEEFF0E102C074
|
||||||
|
:1001F00005900D92A031B107D9F722E0A0E1B1E05E
|
||||||
|
:1002000001C01D92A33AB207E1F710E0CCEED0E0B6
|
||||||
|
:1002100004C02197FE010E947708CB3ED107C9F7A1
|
||||||
|
:100220000E94EE010C947D080C9400001F920F9226
|
||||||
|
:100230000FB60F9211242F933F938F939F93AF93F9
|
||||||
|
:10024000BF9380919F029091A002A091A102B091D2
|
||||||
|
:10025000A20230919E0223E0230F2D3758F501961C
|
||||||
|
:10026000A11DB11D20939E0280939F029093A00236
|
||||||
|
:10027000A093A102B093A20280919A0290919B0256
|
||||||
|
:10028000A0919C02B0919D020196A11DB11D809389
|
||||||
|
:100290009A0290939B02A0939C02B0939D02BF91FF
|
||||||
|
:1002A000AF919F918F913F912F910F900FBE0F9023
|
||||||
|
:1002B0001F90189526E8230F0296A11DB11DD2CFDD
|
||||||
|
:1002C0001F920F920FB60F9211242F933F934F93CB
|
||||||
|
:1002D0005F938F939F93EF93FF938091100180938F
|
||||||
|
:1002E000B2001BB815B8409A419880919502F0E091
|
||||||
|
:1002F000E0E0883060F498E18902900111242B5EDF
|
||||||
|
:100300003F4FE0919102F0919202E20FF31FAF0193
|
||||||
|
:1003100048515109228198E027FF31C05F9A220F8E
|
||||||
|
:100320005E985E9A9150C1F7218198E027FF29C01D
|
||||||
|
:100330005F9A220F5E985E9A9150C1F7208198E0F3
|
||||||
|
:1003400027FF21C05F9A220F5E985E9A9150C1F7F5
|
||||||
|
:1003500033974E175F07F1F6419A4198883008F0BD
|
||||||
|
:1003600037C0E82FF0E0E954FE4F0C947708C50140
|
||||||
|
:10037000D901DB01DD01DF01E101E301E6015F9865
|
||||||
|
:10038000CECF5F98D6CF5F98DECF91E095B98F5FE3
|
||||||
|
:10039000883008F580939502FF91EF919F918F919E
|
||||||
|
:1003A0005F914F913F912F910F900FBE0F901F9033
|
||||||
|
:1003B000189592E0EBCF94E0E9CF98E0E7CF90E199
|
||||||
|
:1003C000E5CF90E2E3CF98E09BB9E1CF90E1FCCF9D
|
||||||
|
:1003D0001BB815B8DCCF10929502DECFCF93DF9318
|
||||||
|
:1003E000CDB7DEB7AA970FB6F894DEBF0FBECDBF6C
|
||||||
|
:1003F000789484B5826084BD84B5816084BD85B500
|
||||||
|
:10040000826085BD85B5816085BD80916E0081600B
|
||||||
|
:1004100080936E00109281008091810082608093B1
|
||||||
|
:1004200081008091810081608093810080918000B3
|
||||||
|
:100430008160809380008091B10084608093B100DE
|
||||||
|
:100440008091B00081608093B00080917A008460D8
|
||||||
|
:1004500080937A0080917A00826080937A00809104
|
||||||
|
:100460007A00816080937A0080917A00806880931E
|
||||||
|
:100470007A001092C1008DE0E0E0F1E09E012F5F74
|
||||||
|
:100480003F4FD90101900D928A95E1F7D901AE0154
|
||||||
|
:10049000425F5F4F8D9190E08C0102551F4FF80134
|
||||||
|
:1004A000B490BC0166567F4FFB01E490EE20A1F0B2
|
||||||
|
:1004B000F12CEE0CFF1CF701EA57FF4FC590D490CA
|
||||||
|
:1004C000F701E057FF4FE590F490FFB6F894F6017E
|
||||||
|
:1004D000E080BE28B082FFBE8E539F4FFC01849106
|
||||||
|
:1004E000F8010491FB0164916623E9F0882359F037
|
||||||
|
:1004F000833009F4CCC108F0BFC1813009F4CDC10B
|
||||||
|
:10050000823009F4CEC1E62FF0E0EE0FFF1FE05776
|
||||||
|
:10051000FF4F859194916FB7F894FC01708100951D
|
||||||
|
:10052000072300836FBF4A175B0709F0B3CF429AD6
|
||||||
|
:100530004298429A109295028091B1008560809312
|
||||||
|
:10054000B1008091B1008D7F8093B1008091B000A7
|
||||||
|
:100550008C7F8093B0008091B60080628093B6005B
|
||||||
|
:10056000809170008160809370008FEF8093B20063
|
||||||
|
:1005700083E680931001789480910D0190910E0193
|
||||||
|
:10058000A0910F0189839A83AB83F8944198409896
|
||||||
|
:1005900098E0FE0134968291880F880F46E087FF2D
|
||||||
|
:1005A0008DC15F9A880F5E985E9A4150C1F72E17F1
|
||||||
|
:1005B0003F0789F7915069F7409A789480E094EF6B
|
||||||
|
:1005C000A1E0B0E08093960290939702A0939802E6
|
||||||
|
:1005D000B09399028091960290919702A09198020F
|
||||||
|
:1005E000B0919902898B9A8BAB8BBC8BBC01CD01EE
|
||||||
|
:1005F0000E94570620E030E040EE50E40E94AD0536
|
||||||
|
:100600006F8F78A389A39AA3A0919302B0919402CB
|
||||||
|
:10061000BE8BAD8B312C212C622D70E090E080E000
|
||||||
|
:100620000E9455066B017C01AC019B0160E070E00B
|
||||||
|
:1006300080E892E40E9440059B01AC010E943B07C8
|
||||||
|
:100640006B8F7C8F8D8F9E8FB101032C000C880BDC
|
||||||
|
:10065000990B0E9457062F8D38A149A15AA10E94DB
|
||||||
|
:10066000410520E030E040E251E40E94AD050E94E7
|
||||||
|
:10067000A8076BA37CA38DA39EA3A701960160E0AE
|
||||||
|
:1006800070E088EC92E40E9440059B01AC010E945E
|
||||||
|
:100690003B076FA378A789A79AA789899A89AB890D
|
||||||
|
:1006A000BC898F8B988FA98FBA8FAD89BE89BF8780
|
||||||
|
:1006B000AE87188A6F89788D898D9A8D0E9457062A
|
||||||
|
:1006C00020E030E040E251E40E94AD050E94A8071E
|
||||||
|
:1006D0004B015C01B8896B2F70E090E080E00E94D4
|
||||||
|
:1006E00055066B017C01AC019B0160E070E080E885
|
||||||
|
:1006F00092E40E9440059B01AC010E943B072B8DB8
|
||||||
|
:100700003C8D4D8D5E8D0E9441050E94B60720E014
|
||||||
|
:1007100030E040E251E40E94AD050E94A8072B01A1
|
||||||
|
:100720003C01A701960160E070E080E493E40E9440
|
||||||
|
:1007300040059B01AC010E943B072FA138A549A5AC
|
||||||
|
:100740005AA50E9441050E94B60720E030E040E231
|
||||||
|
:1007500051E40E94AD050E94A8076B017C01A30132
|
||||||
|
:100760009201C501B4010E9441052BA13CA14DA1FC
|
||||||
|
:100770005EA10E944105A70196010E94410520E06B
|
||||||
|
:1007800030E040E053E40E943B070E94260670E000
|
||||||
|
:1007900090E080E00E94570620E030E040E85BE314
|
||||||
|
:1007A0000E943B0720E030E040EC50E40E943B0711
|
||||||
|
:1007B0004B015C010E9492060E941F066B01072EEE
|
||||||
|
:1007C000000C880B990B0E9457069B01AC01C501D8
|
||||||
|
:1007D000B4010E9440052B013C0120E030E04FE7CE
|
||||||
|
:1007E0005FE30E943B079B01AC0160E070E080E8A2
|
||||||
|
:1007F0009FE30E94400520E030E04FE75FE30E9466
|
||||||
|
:100800003B074B015C01A301920160E070E080E8CE
|
||||||
|
:100810009FE30E94400520E030E04FE75FE30E9445
|
||||||
|
:100820003B079B01AC0160E070E080E89FE30E9421
|
||||||
|
:10083000400520E030E04FE75FE30E943B077B018B
|
||||||
|
:100840008C01E2E0CE16D10409F4E1C0CCF5C1146C
|
||||||
|
:10085000D10409F4FFC0CA94CD2809F449C0612C21
|
||||||
|
:10086000712CC12CD12CE12CF12C00E010E0812C5A
|
||||||
|
:10087000912CA12CB12C46C08730B1F08830D1F03A
|
||||||
|
:10088000843009F040CE809180008F7D03C080913C
|
||||||
|
:1008900080008F778093800036CE84B58F7784BDBB
|
||||||
|
:1008A00032CE84B58F7DFBCF8091B0008F7780935F
|
||||||
|
:1008B000B00029CE8091B0008F7DF9CF5F9872CEC5
|
||||||
|
:1008C00084E0C816D10409F4B8C00CF4ADC0A5E0AA
|
||||||
|
:1008D000CA16D10421F634016501E12CF12C0FE791
|
||||||
|
:1008E0001BE3812C912C8FE7A82E9FE3B92E0AC021
|
||||||
|
:1008F000612C712CAFE7CA2EBBE3DB2EE12CF12C6F
|
||||||
|
:100900000FE71FE320E030E04FE753E4B401C501F7
|
||||||
|
:100910000E943B070E941F06FB01FF27EA52FF4F80
|
||||||
|
:10092000B49020E030E04FE753E4B701C8010E94E3
|
||||||
|
:100930003B070E941F06FB01FF27EA52FF4F14915D
|
||||||
|
:1009400020E030E04FE753E4B301C6010E943B07CB
|
||||||
|
:100950000E941F06FB01FF27EA52FF4FE4918E859C
|
||||||
|
:100960009F85009739F0DC01BC9211961C9311977A
|
||||||
|
:100970001296EC93B889BF5FB88B8F89988DA98D3B
|
||||||
|
:10098000BA8D0196A11DB11D8F8B988FA98FBA8F3B
|
||||||
|
:10099000AE85BF851396BF87AE87B889B83009F09A
|
||||||
|
:1009A00089CEEFEF2E1A3E0A8D899E8948969E8B3E
|
||||||
|
:1009B0008D8B98E02916310409F02ECE89899A8909
|
||||||
|
:1009C000AB89BC890196A11DB11D809396029093BD
|
||||||
|
:1009D0009702A0939802B0939902F89480919102A3
|
||||||
|
:1009E000909192022091930230919402309392025E
|
||||||
|
:1009F0002093910290939402809393027894A0E0C4
|
||||||
|
:100A0000B0E0AB2B09F4E6CD0E940000E3CD3B0142
|
||||||
|
:100A10006C01E12CF12C0FE71FE3812C912C6FE787
|
||||||
|
:100A2000A62E7BE3B72E6ECF74018501612C712C4D
|
||||||
|
:100A3000EFE7CE2EFFE3DF2EF0CF47015801612C08
|
||||||
|
:100A4000712C4FE7C42E5FE3D52EE12CF12C0FE77C
|
||||||
|
:100A50001BE358CF612C712C2FE7C22E3BE3D32E22
|
||||||
|
:100A600040CF1092950281E191E09093940280939F
|
||||||
|
:100A7000930281ED91E09093920280939102089508
|
||||||
|
:100A80005058BB27AA270E9458050C94E9060E94DB
|
||||||
|
:100A9000DB0638F00E94E20620F039F49F3F19F49B
|
||||||
|
:100AA00026F40C94D8060EF4E095E7FB0C94A90606
|
||||||
|
:100AB000E92F0E94FA0658F3BA17620773078407F2
|
||||||
|
:100AC000950720F079F4A6F50C9434070EF4E09520
|
||||||
|
:100AD0000B2EBA2FA02D0B01B90190010C01CA01F8
|
||||||
|
:100AE000A0011124FF27591B99F0593F50F4503EA3
|
||||||
|
:100AF00068F11A16F040A22F232F342F4427585F95
|
||||||
|
:100B0000F3CF469537952795A795F0405395C9F7AC
|
||||||
|
:100B10007EF41F16BA0B620B730B840BBAF0915064
|
||||||
|
:100B2000A1F0FF0FBB1F661F771F881FC2F70EC003
|
||||||
|
:100B3000BA0F621F731F841F48F4879577956795D6
|
||||||
|
:100B4000B795F7959E3F08F0B0CF9395880F08F0C2
|
||||||
|
:100B50009927EE0F9795879508950E94C1050C94EB
|
||||||
|
:100B6000E9060E94E20658F00E94DB0640F029F4F4
|
||||||
|
:100B70005F3F29F00C94A90651110C9435070C9491
|
||||||
|
:100B8000D8060E94FA0668F39923B1F3552391F32E
|
||||||
|
:100B9000951B550BBB27AA2762177307840738F0EC
|
||||||
|
:100BA0009F5F5F4F220F331F441FAA1FA9F335D049
|
||||||
|
:100BB0000E2E3AF0E0E832D091505040E695001CFD
|
||||||
|
:100BC000CAF72BD0FE2F29D0660F771F881FBB1FB7
|
||||||
|
:100BD000261737074807AB07B0E809F0BB0B802D95
|
||||||
|
:100BE000BF01FF2793585F4F3AF09E3F510578F0C1
|
||||||
|
:100BF0000C94A9060C9435075F3FE4F3983ED4F3B8
|
||||||
|
:100C0000869577956795B795F7959F5FC9F7880F94
|
||||||
|
:100C1000911D9695879597F90895E1E0660F771FE6
|
||||||
|
:100C2000881FBB1F621773078407BA0720F0621B77
|
||||||
|
:100C3000730B840BBA0BEE1F88F7E09508950E94A2
|
||||||
|
:100C400026066894B1110C94350708950E94020796
|
||||||
|
:100C500088F09F5798F0B92F9927B751B0F0E1F07D
|
||||||
|
:100C6000660F771F881F991F1AF0BA95C9F714C02D
|
||||||
|
:100C7000B13091F00E943407B1E008950C9434072C
|
||||||
|
:100C8000672F782F8827B85F39F0B93FCCF3869566
|
||||||
|
:100C900077956795B395D9F73EF4909580957095C3
|
||||||
|
:100CA00061957F4F8F4F9F4F0895E89409C097FB40
|
||||||
|
:100CB0003EF490958095709561957F4F8F4F9F4F33
|
||||||
|
:100CC0009923A9F0F92F96E9BB279395F695879577
|
||||||
|
:100CD00077956795B795F111F8CFFAF4BB0F11F43A
|
||||||
|
:100CE00060FF1BC06F5F7F4F8F4F9F4F16C08823E1
|
||||||
|
:100CF00011F096E911C0772321F09EE8872F762F17
|
||||||
|
:100D000005C0662371F096E8862F70E060E02AF057
|
||||||
|
:100D10009A95660F771F881FDAF7880F9695879543
|
||||||
|
:100D200097F908950E941C0790F09F3748F491119D
|
||||||
|
:100D300016F00C94350760E070E080E89FEB0895B2
|
||||||
|
:100D400026F41B16611D711D811D0C94AF060C94B9
|
||||||
|
:100D5000CA0697F99F6780E870E060E008958823ED
|
||||||
|
:100D600071F4772321F09850872B762F07C06623E4
|
||||||
|
:100D700011F499270DC09051862B70E060E02AF0A5
|
||||||
|
:100D80009A95660F771F881FDAF7880F96958795D3
|
||||||
|
:100D900097F908959F3F31F0915020F4879577950A
|
||||||
|
:100DA0006795B795880F911D9695879597F9089542
|
||||||
|
:100DB0009FEF80EC089500240A9416161706180673
|
||||||
|
:100DC0000906089500240A9412161306140605064F
|
||||||
|
:100DD0000895092E0394000C11F4882352F0BB0FE0
|
||||||
|
:100DE00040F4BF2B11F460FF04C06F5F7F4F8F4F43
|
||||||
|
:100DF0009F4F089557FD9058440F551F59F05F3F7E
|
||||||
|
:100E000071F04795880F97FB991F61F09F3F79F02C
|
||||||
|
:100E100087950895121613061406551FF2CF4695AE
|
||||||
|
:100E2000F1DF08C0161617061806991FF1CF869530
|
||||||
|
:100E300071056105089408950E940207A0F0BEE7BD
|
||||||
|
:100E4000B91788F4BB279F3860F41616B11D672FB9
|
||||||
|
:100E5000782F8827985FF7CF869577956795B11D8E
|
||||||
|
:100E600093959639C8F30895E894BB2766277727AA
|
||||||
|
:100E7000CB0197F908950E944E070C94E9060E9451
|
||||||
|
:100E8000DB0638F00E94E20620F0952311F00C9466
|
||||||
|
:100E9000A9060C94D80611240C9435070E94FA0672
|
||||||
|
:100EA00070F3959FC1F3950F50E0551F629FF001BD
|
||||||
|
:100EB000729FBB27F00DB11D639FAA27F00DB11DD6
|
||||||
|
:100EC000AA1F649F6627B00DA11D661F829F22275F
|
||||||
|
:100ED000B00DA11D621F739FB00DA11D621F839FE6
|
||||||
|
:100EE000A00D611D221F749F3327A00D611D231FBC
|
||||||
|
:100EF000849F600D211D822F762F6A2F11249F570A
|
||||||
|
:100F000050409AF0F1F088234AF0EE0FFF1FBB1F0C
|
||||||
|
:100F1000661F771F881F91505040A9F79E3F5105CB
|
||||||
|
:100F200080F00C94A9060C9435075F3FE4F3983EDB
|
||||||
|
:100F3000D4F3869577956795B795F795E7959F5F75
|
||||||
|
:100F4000C1F7FE2B880F911D9695879597F9089507
|
||||||
|
:100F50009F930E94FF070F9007FCEE5F0C942808F8
|
||||||
|
:100F600019F416F40C94D8060C94CA060E940207D1
|
||||||
|
:100F7000B8F39923C9F3B6F39F57550B87FF0E9427
|
||||||
|
:100F8000F6070024A0E640EA900180585695979510
|
||||||
|
:100F900028F4805C660F771F881F20F0261737071C
|
||||||
|
:100FA000480730F4621B730B840B202931294A2B2C
|
||||||
|
:100FB000A69517940794202531254A2758F7660FE0
|
||||||
|
:100FC000771F881F20F026173707480730F4620B79
|
||||||
|
:100FD000730B840B200D311D411DA09581F7B901C4
|
||||||
|
:100FE000842F9158880F9695879508959150504079
|
||||||
|
:100FF000660F771F881FD2F708950C94D8060E94B9
|
||||||
|
:101000000207D8F3E894E0E0BB279F57F0F02AED01
|
||||||
|
:101010003FE049EC06C0EE0FBB0F661F771F881F2D
|
||||||
|
:1010200028F0B23A62077307840728F0B25A620BBD
|
||||||
|
:10103000730B840BE3959A9572F7803830F49A9588
|
||||||
|
:10104000BB0F661F771F881FD2F790480C94CC0601
|
||||||
|
:10105000EF93E0FF07C0A2EA2AED3FE049EC5FEB27
|
||||||
|
:101060000E9458050E94E9060F90039401FC9058D5
|
||||||
|
:10107000E8E6F0E00C943C089F938F937F936F9386
|
||||||
|
:10108000FF93EF939B01AC010E943B07EF91FF910F
|
||||||
|
:101090000E9450082F913F914F915F910C943B0714
|
||||||
|
:1010A000DF93CF931F930F93FF92EF92DF927B0119
|
||||||
|
:1010B0008C01689406C0DA2EEF010E944E07FE01F3
|
||||||
|
:1010C000E894A5912591359145915591A6F3EF01AD
|
||||||
|
:1010D0000E945805FE019701A801DA9469F7DF9094
|
||||||
|
:1010E000EF90FF900F911F91CF91DF910895EE0F38
|
||||||
|
:0E10F000FF1F0590F491E02D0994F894FFCFB6
|
||||||
|
:1010FE000E0F100304060708090A0B0C0D243F3FC0
|
||||||
|
:00000001FF
|
||||||
@@ -0,0 +1,308 @@
|
|||||||
|
:020000040000FA
|
||||||
|
:100000000C94EC000C9414010C9414010C94140145
|
||||||
|
:100010000C9414010C9414010C9414010C9414010C
|
||||||
|
:100020000C9414010C9460010C9414010C941401B0
|
||||||
|
:100030000C9414010C9414010C9414010C941401EC
|
||||||
|
:100040000C9416010C9414010C9414010C941401DA
|
||||||
|
:100050000C9414010C9414010C9414010C941401CC
|
||||||
|
:100060000C9414010C94140105A84CCDB2D44EB9D3
|
||||||
|
:100070003836A9020C50B9918688083CA6AAAA2A4B
|
||||||
|
:10008000BE000000803F00000000240027002A007E
|
||||||
|
:1000900000000000250028002B00040404040404D0
|
||||||
|
:1000A0000404020202020202030303030303010227
|
||||||
|
:1000B00004081020408001020408102001020408F6
|
||||||
|
:1000C00010200000000800020100000304070000E7
|
||||||
|
:1000D0000000000000000000000000000000000020
|
||||||
|
:1000E000000000000000000000000000000001010E
|
||||||
|
:1000F00001010101010101010101010101010202EE
|
||||||
|
:1001000002020202020202030303030303030404C4
|
||||||
|
:100110000404040505050506060606070707070883
|
||||||
|
:1001200008080909090A0A0A0B0B0B0C0C0D0D0D26
|
||||||
|
:100130000E0E0F0F101011111212131314141515A7
|
||||||
|
:10014000161617181819191A1B1B1C1D1D1E1F2007
|
||||||
|
:100150002021222323242526272728292A2B2C2D3A
|
||||||
|
:100160002E2F303132323334363738393A3B3C3D3A
|
||||||
|
:100170003E3F40424344454648494A4B4D4E4F510D
|
||||||
|
:100180005253555657595A5C5D5F606263656668A5
|
||||||
|
:10019000696B6D6E7072737577787A7C7E7F818300
|
||||||
|
:1001A0008587898A8C8E90929496989A9C9EA0A21C
|
||||||
|
:1001B000A4A7A9ABADAFB1B4B6B8BABDBFC1C4C6F0
|
||||||
|
:1001C000C8CBCDD0D2D5D7DADCDFE1E4E7E9ECEF7C
|
||||||
|
:1001D000F1F4F7F9FCFF310511241FBECFEFD8E091
|
||||||
|
:1001E000DEBFCDBF11E0A0E0B1E0EEEFF0E102C074
|
||||||
|
:1001F00005900D92A031B107D9F722E0A0E1B1E05E
|
||||||
|
:1002000001C01D92A33AB207E1F710E0CCEED0E0B6
|
||||||
|
:1002100004C02197FE010E947708CB3ED107C9F7A1
|
||||||
|
:100220000E94EE010C947D080C9400001F920F9226
|
||||||
|
:100230000FB60F9211242F933F938F939F93AF93F9
|
||||||
|
:10024000BF9380919F029091A002A091A102B091D2
|
||||||
|
:10025000A20230919E0223E0230F2D3758F501961C
|
||||||
|
:10026000A11DB11D20939E0280939F029093A00236
|
||||||
|
:10027000A093A102B093A20280919A0290919B0256
|
||||||
|
:10028000A0919C02B0919D020196A11DB11D809389
|
||||||
|
:100290009A0290939B02A0939C02B0939D02BF91FF
|
||||||
|
:1002A000AF919F918F913F912F910F900FBE0F9023
|
||||||
|
:1002B0001F90189526E8230F0296A11DB11DD2CFDD
|
||||||
|
:1002C0001F920F920FB60F9211242F933F934F93CB
|
||||||
|
:1002D0005F938F939F93EF93FF938091100180938F
|
||||||
|
:1002E000B2001BB815B8409A419880919502F0E091
|
||||||
|
:1002F000E0E0883060F498E18902900111242B5EDF
|
||||||
|
:100300003F4FE0919102F0919202E20FF31FAF0193
|
||||||
|
:1003100048515109228198E027FF31C05F9A220F8E
|
||||||
|
:100320005E985E9A9150C1F7218198E027FF29C01D
|
||||||
|
:100330005F9A220F5E985E9A9150C1F7208198E0F3
|
||||||
|
:1003400027FF21C05F9A220F5E985E9A9150C1F7F5
|
||||||
|
:1003500033974E175F07F1F6419A4198883008F0BD
|
||||||
|
:1003600037C0E82FF0E0E954FE4F0C947708C50140
|
||||||
|
:10037000D901DB01DD01DF01E101E301E6015F9865
|
||||||
|
:10038000CECF5F98D6CF5F98DECF91E095B98F5FE3
|
||||||
|
:10039000883008F580939502FF91EF919F918F919E
|
||||||
|
:1003A0005F914F913F912F910F900FBE0F901F9033
|
||||||
|
:1003B000189592E0EBCF94E0E9CF98E0E7CF90E199
|
||||||
|
:1003C000E5CF90E2E3CF98E09BB9E1CF90E1FCCF9D
|
||||||
|
:1003D0001BB815B8DCCF10929502DECFCF93DF9318
|
||||||
|
:1003E000CDB7DEB7AA970FB6F894DEBF0FBECDBF6C
|
||||||
|
:1003F000789484B5826084BD84B5816084BD85B500
|
||||||
|
:10040000826085BD85B5816085BD80916E0081600B
|
||||||
|
:1004100080936E00109281008091810082608093B1
|
||||||
|
:1004200081008091810081608093810080918000B3
|
||||||
|
:100430008160809380008091B10084608093B100DE
|
||||||
|
:100440008091B00081608093B00080917A008460D8
|
||||||
|
:1004500080937A0080917A00826080937A00809104
|
||||||
|
:100460007A00816080937A0080917A00806880931E
|
||||||
|
:100470007A001092C1008DE0E0E0F1E09E012F5F74
|
||||||
|
:100480003F4FD90101900D928A95E1F7D901AE0154
|
||||||
|
:10049000425F5F4F8D9190E08C0102551F4FF80134
|
||||||
|
:1004A000B490BC0166567F4FFB01E490EE20A1F0B2
|
||||||
|
:1004B000F12CEE0CFF1CF701EA57FF4FC590D490CA
|
||||||
|
:1004C000F701E057FF4FE590F490FFB6F894F6017E
|
||||||
|
:1004D000E080BE28B082FFBE8E539F4FFC01849106
|
||||||
|
:1004E000F8010491FB0164916623E9F0882359F037
|
||||||
|
:1004F000833009F4CCC108F0BFC1813009F4CDC10B
|
||||||
|
:10050000823009F4CEC1E62FF0E0EE0FFF1FE05776
|
||||||
|
:10051000FF4F859194916FB7F894FC01708100951D
|
||||||
|
:10052000072300836FBF4A175B0709F0B3CF429AD6
|
||||||
|
:100530004298429A109295028091B1008560809312
|
||||||
|
:10054000B1008091B1008D7F8093B1008091B000A7
|
||||||
|
:100550008C7F8093B0008091B60080628093B6005B
|
||||||
|
:10056000809170008160809370008FEF8093B20063
|
||||||
|
:1005700083E680931001789480910D0190910E0193
|
||||||
|
:10058000A0910F0189839A83AB83F8944198409896
|
||||||
|
:1005900098E0FE0134968291880F880F46E087FF2D
|
||||||
|
:1005A0008DC15F9A880F5E985E9A4150C1F72E17F1
|
||||||
|
:1005B0003F0789F7915069F7409A789480E094EF6B
|
||||||
|
:1005C000A1E0B0E08093960290939702A0939802E6
|
||||||
|
:1005D000B09399028091960290919702A09198020F
|
||||||
|
:1005E000B0919902898B9A8BAB8BBC8BBC01CD01EE
|
||||||
|
:1005F0000E94570620E030E040EE50E40E94AD0536
|
||||||
|
:100600006F8F78A389A39AA3A0919302B0919402CB
|
||||||
|
:10061000BE8BAD8B312C212C622D70E090E080E000
|
||||||
|
:100620000E9455066B017C01AC019B0160E070E00B
|
||||||
|
:1006300080E892E40E9440059B01AC010E943B07C8
|
||||||
|
:100640006B8F7C8F8D8F9E8FB101032C000C880BDC
|
||||||
|
:10065000990B0E9457062F8D38A149A15AA10E94DB
|
||||||
|
:10066000410520E030E040E251E40E94AD050E94E7
|
||||||
|
:10067000A8076BA37CA38DA39EA3A701960160E0AE
|
||||||
|
:1006800070E088EC92E40E9440059B01AC010E945E
|
||||||
|
:100690003B076FA378A789A79AA789899A89AB890D
|
||||||
|
:1006A000BC898F8B988FA98FBA8FAD89BE89BF8780
|
||||||
|
:1006B000AE87188A6F89788D898D9A8D0E9457062A
|
||||||
|
:1006C00020E030E040E251E40E94AD050E94A8071E
|
||||||
|
:1006D0004B015C01B8896B2F70E090E080E00E94D4
|
||||||
|
:1006E00055066B017C01AC019B0160E070E080E885
|
||||||
|
:1006F00092E40E9440059B01AC010E943B072B8DB8
|
||||||
|
:100700003C8D4D8D5E8D0E9441050E94B60720E014
|
||||||
|
:1007100030E040E251E40E94AD050E94A8072B01A1
|
||||||
|
:100720003C01A701960160E070E080E493E40E9440
|
||||||
|
:1007300040059B01AC010E943B072FA138A549A5AC
|
||||||
|
:100740005AA50E9441050E94B60720E030E040E231
|
||||||
|
:1007500051E40E94AD050E94A8076B017C01A30132
|
||||||
|
:100760009201C501B4010E9441052BA13CA14DA1FC
|
||||||
|
:100770005EA10E944105A70196010E94410520E06B
|
||||||
|
:1007800030E040E053E40E943B070E94260670E000
|
||||||
|
:1007900090E080E00E94570620E030E040E85BE314
|
||||||
|
:1007A0000E943B0720E030E040EC50E40E943B0711
|
||||||
|
:1007B0004B015C010E9492060E941F066B01072EEE
|
||||||
|
:1007C000000C880B990B0E9457069B01AC01C501D8
|
||||||
|
:1007D000B4010E9440052B013C0120E030E04FE7CE
|
||||||
|
:1007E0005FE30E943B079B01AC0160E070E080E8A2
|
||||||
|
:1007F0009FE30E94400520E030E04FE75FE30E9466
|
||||||
|
:100800003B074B015C01A301920160E070E080E8CE
|
||||||
|
:100810009FE30E94400520E030E04FE75FE30E9445
|
||||||
|
:100820003B079B01AC0160E070E080E89FE30E9421
|
||||||
|
:10083000400520E030E04FE75FE30E943B077B018B
|
||||||
|
:100840008C01E2E0CE16D10409F4E1C0CCF5C1146C
|
||||||
|
:10085000D10409F4FFC0CA94CD2809F449C0612C21
|
||||||
|
:10086000712CC12CD12CE12CF12C00E010E0812C5A
|
||||||
|
:10087000912CA12CB12C46C08730B1F08830D1F03A
|
||||||
|
:10088000843009F040CE809180008F7D03C080913C
|
||||||
|
:1008900080008F778093800036CE84B58F7784BDBB
|
||||||
|
:1008A00032CE84B58F7DFBCF8091B0008F7780935F
|
||||||
|
:1008B000B00029CE8091B0008F7DF9CF5F9872CEC5
|
||||||
|
:1008C00084E0C816D10409F4B8C00CF4ADC0A5E0AA
|
||||||
|
:1008D000CA16D10421F634016501E12CF12C0FE791
|
||||||
|
:1008E0001BE3812C912C8FE7A82E9FE3B92E0AC021
|
||||||
|
:1008F000612C712CAFE7CA2EBBE3DB2EE12CF12C6F
|
||||||
|
:100900000FE71FE320E030E04FE753E4B401C501F7
|
||||||
|
:100910000E943B070E941F06FB01FF27EA52FF4F80
|
||||||
|
:10092000B49020E030E04FE753E4B701C8010E94E3
|
||||||
|
:100930003B070E941F06FB01FF27EA52FF4F14915D
|
||||||
|
:1009400020E030E04FE753E4B301C6010E943B07CB
|
||||||
|
:100950000E941F06FB01FF27EA52FF4FE4918E859C
|
||||||
|
:100960009F85009739F0DC01BC9211961C9311977A
|
||||||
|
:100970001296EC93B889BF5FB88B8F89988DA98D3B
|
||||||
|
:10098000BA8D0196A11DB11D8F8B988FA98FBA8F3B
|
||||||
|
:10099000AE85BF851396BF87AE87B889B83009F09A
|
||||||
|
:1009A00089CEEFEF2E1A3E0A8D899E8948969E8B3E
|
||||||
|
:1009B0008D8B98E02916310409F02ECE89899A8909
|
||||||
|
:1009C000AB89BC890196A11DB11D809396029093BD
|
||||||
|
:1009D0009702A0939802B0939902F89480919102A3
|
||||||
|
:1009E000909192022091930230919402309392025E
|
||||||
|
:1009F0002093910290939402809393027894A0E0C4
|
||||||
|
:100A0000B0E0AB2B09F4E6CD0E940000E3CD3B0142
|
||||||
|
:100A10006C01E12CF12C0FE71FE3812C912C6FE787
|
||||||
|
:100A2000A62E7BE3B72E6ECF74018501612C712C4D
|
||||||
|
:100A3000EFE7CE2EFFE3DF2EF0CF47015801612C08
|
||||||
|
:100A4000712C4FE7C42E5FE3D52EE12CF12C0FE77C
|
||||||
|
:100A50001BE358CF612C712C2FE7C22E3BE3D32E22
|
||||||
|
:100A600040CF1092950281E191E09093940280939F
|
||||||
|
:100A7000930281ED91E09093920280939102089508
|
||||||
|
:100A80005058BB27AA270E9458050C94E9060E94DB
|
||||||
|
:100A9000DB0638F00E94E20620F039F49F3F19F49B
|
||||||
|
:100AA00026F40C94D8060EF4E095E7FB0C94A90606
|
||||||
|
:100AB000E92F0E94FA0658F3BA17620773078407F2
|
||||||
|
:100AC000950720F079F4A6F50C9434070EF4E09520
|
||||||
|
:100AD0000B2EBA2FA02D0B01B90190010C01CA01F8
|
||||||
|
:100AE000A0011124FF27591B99F0593F50F4503EA3
|
||||||
|
:100AF00068F11A16F040A22F232F342F4427585F95
|
||||||
|
:100B0000F3CF469537952795A795F0405395C9F7AC
|
||||||
|
:100B10007EF41F16BA0B620B730B840BBAF0915064
|
||||||
|
:100B2000A1F0FF0FBB1F661F771F881FC2F70EC003
|
||||||
|
:100B3000BA0F621F731F841F48F4879577956795D6
|
||||||
|
:100B4000B795F7959E3F08F0B0CF9395880F08F0C2
|
||||||
|
:100B50009927EE0F9795879508950E94C1050C94EB
|
||||||
|
:100B6000E9060E94E20658F00E94DB0640F029F4F4
|
||||||
|
:100B70005F3F29F00C94A90651110C9435070C9491
|
||||||
|
:100B8000D8060E94FA0668F39923B1F3552391F32E
|
||||||
|
:100B9000951B550BBB27AA2762177307840738F0EC
|
||||||
|
:100BA0009F5F5F4F220F331F441FAA1FA9F335D049
|
||||||
|
:100BB0000E2E3AF0E0E832D091505040E695001CFD
|
||||||
|
:100BC000CAF72BD0FE2F29D0660F771F881FBB1FB7
|
||||||
|
:100BD000261737074807AB07B0E809F0BB0B802D95
|
||||||
|
:100BE000BF01FF2793585F4F3AF09E3F510578F0C1
|
||||||
|
:100BF0000C94A9060C9435075F3FE4F3983ED4F3B8
|
||||||
|
:100C0000869577956795B795F7959F5FC9F7880F94
|
||||||
|
:100C1000911D9695879597F90895E1E0660F771FE6
|
||||||
|
:100C2000881FBB1F621773078407BA0720F0621B77
|
||||||
|
:100C3000730B840BBA0BEE1F88F7E09508950E94A2
|
||||||
|
:100C400026066894B1110C94350708950E94020796
|
||||||
|
:100C500088F09F5798F0B92F9927B751B0F0E1F07D
|
||||||
|
:100C6000660F771F881F991F1AF0BA95C9F714C02D
|
||||||
|
:100C7000B13091F00E943407B1E008950C9434072C
|
||||||
|
:100C8000672F782F8827B85F39F0B93FCCF3869566
|
||||||
|
:100C900077956795B395D9F73EF4909580957095C3
|
||||||
|
:100CA00061957F4F8F4F9F4F0895E89409C097FB40
|
||||||
|
:100CB0003EF490958095709561957F4F8F4F9F4F33
|
||||||
|
:100CC0009923A9F0F92F96E9BB279395F695879577
|
||||||
|
:100CD00077956795B795F111F8CFFAF4BB0F11F43A
|
||||||
|
:100CE00060FF1BC06F5F7F4F8F4F9F4F16C08823E1
|
||||||
|
:100CF00011F096E911C0772321F09EE8872F762F17
|
||||||
|
:100D000005C0662371F096E8862F70E060E02AF057
|
||||||
|
:100D10009A95660F771F881FDAF7880F9695879543
|
||||||
|
:100D200097F908950E941C0790F09F3748F491119D
|
||||||
|
:100D300016F00C94350760E070E080E89FEB0895B2
|
||||||
|
:100D400026F41B16611D711D811D0C94AF060C94B9
|
||||||
|
:100D5000CA0697F99F6780E870E060E008958823ED
|
||||||
|
:100D600071F4772321F09850872B762F07C06623E4
|
||||||
|
:100D700011F499270DC09051862B70E060E02AF0A5
|
||||||
|
:100D80009A95660F771F881FDAF7880F96958795D3
|
||||||
|
:100D900097F908959F3F31F0915020F4879577950A
|
||||||
|
:100DA0006795B795880F911D9695879597F9089542
|
||||||
|
:100DB0009FEF80EC089500240A9416161706180673
|
||||||
|
:100DC0000906089500240A9412161306140605064F
|
||||||
|
:100DD0000895092E0394000C11F4882352F0BB0FE0
|
||||||
|
:100DE00040F4BF2B11F460FF04C06F5F7F4F8F4F43
|
||||||
|
:100DF0009F4F089557FD9058440F551F59F05F3F7E
|
||||||
|
:100E000071F04795880F97FB991F61F09F3F79F02C
|
||||||
|
:100E100087950895121613061406551FF2CF4695AE
|
||||||
|
:100E2000F1DF08C0161617061806991FF1CF869530
|
||||||
|
:100E300071056105089408950E940207A0F0BEE7BD
|
||||||
|
:100E4000B91788F4BB279F3860F41616B11D672FB9
|
||||||
|
:100E5000782F8827985FF7CF869577956795B11D8E
|
||||||
|
:100E600093959639C8F30895E894BB2766277727AA
|
||||||
|
:100E7000CB0197F908950E944E070C94E9060E9451
|
||||||
|
:100E8000DB0638F00E94E20620F0952311F00C9466
|
||||||
|
:100E9000A9060C94D80611240C9435070E94FA0672
|
||||||
|
:100EA00070F3959FC1F3950F50E0551F629FF001BD
|
||||||
|
:100EB000729FBB27F00DB11D639FAA27F00DB11DD6
|
||||||
|
:100EC000AA1F649F6627B00DA11D661F829F22275F
|
||||||
|
:100ED000B00DA11D621F739FB00DA11D621F839FE6
|
||||||
|
:100EE000A00D611D221F749F3327A00D611D231FBC
|
||||||
|
:100EF000849F600D211D822F762F6A2F11249F570A
|
||||||
|
:100F000050409AF0F1F088234AF0EE0FFF1FBB1F0C
|
||||||
|
:100F1000661F771F881F91505040A9F79E3F5105CB
|
||||||
|
:100F200080F00C94A9060C9435075F3FE4F3983EDB
|
||||||
|
:100F3000D4F3869577956795B795F795E7959F5F75
|
||||||
|
:100F4000C1F7FE2B880F911D9695879597F9089507
|
||||||
|
:100F50009F930E94FF070F9007FCEE5F0C942808F8
|
||||||
|
:100F600019F416F40C94D8060C94CA060E940207D1
|
||||||
|
:100F7000B8F39923C9F3B6F39F57550B87FF0E9427
|
||||||
|
:100F8000F6070024A0E640EA900180585695979510
|
||||||
|
:100F900028F4805C660F771F881F20F0261737071C
|
||||||
|
:100FA000480730F4621B730B840B202931294A2B2C
|
||||||
|
:100FB000A69517940794202531254A2758F7660FE0
|
||||||
|
:100FC000771F881F20F026173707480730F4620B79
|
||||||
|
:100FD000730B840B200D311D411DA09581F7B901C4
|
||||||
|
:100FE000842F9158880F9695879508959150504079
|
||||||
|
:100FF000660F771F881FD2F708950C94D8060E94B9
|
||||||
|
:101000000207D8F3E894E0E0BB279F57F0F02AED01
|
||||||
|
:101010003FE049EC06C0EE0FBB0F661F771F881F2D
|
||||||
|
:1010200028F0B23A62077307840728F0B25A620BBD
|
||||||
|
:10103000730B840BE3959A9572F7803830F49A9588
|
||||||
|
:10104000BB0F661F771F881FD2F790480C94CC0601
|
||||||
|
:10105000EF93E0FF07C0A2EA2AED3FE049EC5FEB27
|
||||||
|
:101060000E9458050E94E9060F90039401FC9058D5
|
||||||
|
:10107000E8E6F0E00C943C089F938F937F936F9386
|
||||||
|
:10108000FF93EF939B01AC010E943B07EF91FF910F
|
||||||
|
:101090000E9450082F913F914F915F910C943B0714
|
||||||
|
:1010A000DF93CF931F930F93FF92EF92DF927B0119
|
||||||
|
:1010B0008C01689406C0DA2EEF010E944E07FE01F3
|
||||||
|
:1010C000E894A5912591359145915591A6F3EF01AD
|
||||||
|
:1010D0000E945805FE019701A801DA9469F7DF9094
|
||||||
|
:1010E000EF90FF900F911F91CF91DF910895EE0F38
|
||||||
|
:1010F000FF1F0590F491E02D0994F894FFCF0E0F97
|
||||||
|
:0E110000100304060708090A0B0C0D243F3FDC
|
||||||
|
:107E0000112484B714BE81FFF0D085E080938100F7
|
||||||
|
:107E100082E08093C00088E18093C10086E0809377
|
||||||
|
:107E2000C20080E18093C4008EE0C9D0259A86E02C
|
||||||
|
:107E300020E33CEF91E0309385002093840096BBD3
|
||||||
|
:107E4000B09BFECF1D9AA8958150A9F7CC24DD24C4
|
||||||
|
:107E500088248394B5E0AB2EA1E19A2EF3E0BF2EE7
|
||||||
|
:107E6000A2D0813461F49FD0082FAFD0023811F036
|
||||||
|
:107E7000013811F484E001C083E08DD089C08234E0
|
||||||
|
:107E800011F484E103C0853419F485E0A6D080C0E4
|
||||||
|
:107E9000853579F488D0E82EFF2485D0082F10E0AE
|
||||||
|
:107EA000102F00270E291F29000F111F8ED06801E7
|
||||||
|
:107EB0006FC0863521F484E090D080E0DECF843638
|
||||||
|
:107EC00009F040C070D06FD0082F6DD080E0C81688
|
||||||
|
:107ED00080E7D80618F4F601B7BEE895C0E0D1E017
|
||||||
|
:107EE00062D089930C17E1F7F0E0CF16F0E7DF06D8
|
||||||
|
:107EF00018F0F601B7BEE89568D007B600FCFDCFD4
|
||||||
|
:107F0000A601A0E0B1E02C9130E011968C91119780
|
||||||
|
:107F100090E0982F8827822B932B1296FA010C0160
|
||||||
|
:107F200087BEE89511244E5F5F4FF1E0A038BF0790
|
||||||
|
:107F300051F7F601A7BEE89507B600FCFDCF97BE46
|
||||||
|
:107F4000E89526C08437B1F42ED02DD0F82E2BD052
|
||||||
|
:107F50003CD0F601EF2C8F010F5F1F4F84911BD097
|
||||||
|
:107F6000EA94F801C1F70894C11CD11CFA94CF0C13
|
||||||
|
:107F7000D11C0EC0853739F428D08EE10CD085E9AC
|
||||||
|
:107F80000AD08FE07ACF813511F488E018D01DD067
|
||||||
|
:107F900080E101D065CF982F8091C00085FFFCCF94
|
||||||
|
:107FA0009093C60008958091C00087FFFCCF809118
|
||||||
|
:107FB000C00084FD01C0A8958091C6000895E0E648
|
||||||
|
:107FC000F0E098E1908380830895EDDF803219F02E
|
||||||
|
:107FD00088E0F5DFFFCF84E1DECF1F93182FE3DFCA
|
||||||
|
:107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6
|
||||||
|
:047FF000FF270994CA
|
||||||
|
:027FFE00040479
|
||||||
|
:00000001FF
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Arduino Interface Library for ITeadStudio Colorduino and Colors Shield
|
||||||
|
Copyright (c) 2011-2016 Sam C. Lin <lincomatic@hotmail.com>
|
||||||
|
|
||||||
|
To install, copy libraries/Colorduino to your <arduino sketchbook folder>/libraries/Colorduino folder.
|
||||||
|
ColorduinoPlasma.pde is a sample program which uses the library. It displays an animated plasma on an 8x8 LED matrix
|
||||||
|
|
||||||
|
NOTE: Later versions of Arduino make the library run slowly. It's easy to see because ColorduinoPlasma runs slowly in a step-like version. I'm not sure which version triggers the slowdown, but my testing with Arduino 1.6.3 -> 1.8.1 all exhibit the slowdown. Arduino 1.0.2 runs full speed
|
||||||
|
|
||||||
|
Modified: Removed the inefficient digitalPinToBitMask() and digitalPinToPort(), which was causing the sketch to run very slow if compiled by later versions of Arduino.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
name=Colorduino
|
||||||
|
version=1.2.6
|
||||||
|
author=Sam C. Lin <lincomatic@hotmail.com>
|
||||||
|
maintainer=Sam C. Lin <lincomatic@hotmail.com>
|
||||||
|
sentence=Arduino Interface Library for ITeadStudio Colorduino and Colors Shield
|
||||||
|
paragraph=Arduino Interface Library for ITeadStudio Colorduino and Colors Shield
|
||||||
|
category=Display
|
||||||
|
url=https://github.com/lincomatic/Colorduino
|
||||||
|
architectures=avr
|
||||||
|
includes=Colorduino.h
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
/*
|
||||||
|
Colorduino - Colorduino Library for Arduino
|
||||||
|
Copyright (c) 2011-2012 Sam C. Lin <lincomatic@hotmail.com>
|
||||||
|
based on C code by zzy@iteadstudio
|
||||||
|
Copyright (c) 2010 zzy@IteadStudio. All right reserved.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
#include "Colorduino.h"
|
||||||
|
|
||||||
|
void ColorduinoObject::LED_Delay(unsigned char i)
|
||||||
|
{
|
||||||
|
unsigned int y;
|
||||||
|
y = i * 10;
|
||||||
|
while(y--);
|
||||||
|
}
|
||||||
|
|
||||||
|
// compensate for relative intensity differences in R/G/B brightness
|
||||||
|
// array of 6-bit base values for RGB (0~63)
|
||||||
|
// wbval[0]=red
|
||||||
|
// wbval[1]=green
|
||||||
|
// wbval[2]=blue
|
||||||
|
void ColorduinoObject::SetWhiteBal(unsigned char wbval[3])
|
||||||
|
{
|
||||||
|
cli(); // must not allow ISR to come in now, will screw up timing!
|
||||||
|
LED_LAT_CLR;
|
||||||
|
LED_SLB_CLR;
|
||||||
|
for(unsigned char k=0;k<ColorduinoScreenHeight;k++)
|
||||||
|
for(unsigned char i = 3;i > 0 ;i--)
|
||||||
|
{
|
||||||
|
unsigned char temp = wbval[i-1]<<2;
|
||||||
|
for(unsigned char j = 0;j<6;j++)
|
||||||
|
{
|
||||||
|
if(temp &0x80)
|
||||||
|
LED_SDA_SET;
|
||||||
|
else
|
||||||
|
LED_SDA_CLR;
|
||||||
|
|
||||||
|
temp =temp << 1;
|
||||||
|
LED_SCL_CLR;
|
||||||
|
LED_SCL_SET;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LED_SLB_SET;
|
||||||
|
sei(); // safe to re-enable ISR
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************************************
|
||||||
|
Name: ColorFill
|
||||||
|
Function: Fill the frame with a color
|
||||||
|
Parameter:R: the value of RED. Range:RED 0~255
|
||||||
|
G: the value of GREEN. Range:RED 0~255
|
||||||
|
B: the value of BLUE. Range:RED 0~255
|
||||||
|
********************************************************/
|
||||||
|
void ColorduinoObject::ColorFill(unsigned char R,unsigned char G,unsigned char B)
|
||||||
|
{
|
||||||
|
PixelRGB *p = GetPixel(0,0);
|
||||||
|
for (unsigned char y=0;y<ColorduinoScreenWidth;y++) {
|
||||||
|
for(unsigned char x=0;x<ColorduinoScreenHeight;x++) {
|
||||||
|
p->r = R;
|
||||||
|
p->g = G;
|
||||||
|
p->b = B;
|
||||||
|
p++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FlipPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ISR fires every 256-TCNTn ticks
|
||||||
|
// if TCNTn = 100, ISR fires every 156 ticks
|
||||||
|
// prescaler = 128 so ISR fires every 16MHz / 128 = 125KHz
|
||||||
|
// 125KHz / 156 = 801.282Hz / 8 rows = 100.16Hz refresh rate
|
||||||
|
// if TCNTn = 61, ISR fires every 256 - 61 = 195 ticks
|
||||||
|
// 125KHz / 195 = 641.026Hz / 8 rows = 80.128Hz refresh rate
|
||||||
|
|
||||||
|
unsigned char timerCounter;
|
||||||
|
|
||||||
|
void ColorduinoObject::SetTimerCounter(unsigned char data)
|
||||||
|
{
|
||||||
|
timerCounter = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (__AVR_ATmega32U4__)
|
||||||
|
ISR(TIMER4_OVF_vect) //Timer4 Service
|
||||||
|
{
|
||||||
|
//ISR fires every 256-TCNT4 ticks
|
||||||
|
//so if TCNT4 = 100, ISR fires every 156 ticks
|
||||||
|
//prescaler = 128 so ISR fires every 16MHz / 128 = 125KHz
|
||||||
|
//125KHz / 156 = 801.282Hz / 8 rows = 100.16Hz refresh rate
|
||||||
|
//if TCNT4 = 61, ISR fires every 256 - 61 = 195 ticks
|
||||||
|
//125KHz / 195 = 641.026Hz / 8 rows = 80.128Hz refresh rate
|
||||||
|
//TCNT4 = 100;
|
||||||
|
TCNT4 = timerCounter;
|
||||||
|
close_all_lines;
|
||||||
|
Colorduino.run();
|
||||||
|
Colorduino.open_line(Colorduino.line);
|
||||||
|
if (++Colorduino.line > 7) Colorduino.line = 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
ISR(TIMER2_OVF_vect) //Timer2 Service
|
||||||
|
{
|
||||||
|
// ISR fires every 256-TCNT2 ticks
|
||||||
|
// so if TCNT2 = 100, ISR fires every 156 ticks
|
||||||
|
// prescaler = 128 so ISR fires every 16MHz / 128 = 125KHz
|
||||||
|
// 125KHz / 156 = 801.282Hz / 8 rows = 100.16Hz refresh rate
|
||||||
|
// if TCNT2 = 61, ISR fires every 256 - 61 = 195 ticks
|
||||||
|
// 125KHz / 195 = 641.026Hz / 8 rows = 80.128Hz refresh rate
|
||||||
|
// TCNT2 = 100;
|
||||||
|
TCNT2 = timerCounter;
|
||||||
|
close_all_lines;
|
||||||
|
Colorduino.run();
|
||||||
|
Colorduino.open_line(Colorduino.line);
|
||||||
|
if (++Colorduino.line > 7) Colorduino.line = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
the LED Hardware operate functions zone
|
||||||
|
****************************************************/
|
||||||
|
|
||||||
|
/***************************************************
|
||||||
|
the LED datas operate functions zone
|
||||||
|
***************************************************/
|
||||||
|
|
||||||
|
void ColorduinoObject::run()
|
||||||
|
{
|
||||||
|
LED_SLB_SET;
|
||||||
|
LED_LAT_CLR;
|
||||||
|
// Inside the LED driver. Channel 23 is the last shift register so we should
|
||||||
|
// start with column 7B-7G-7R... and ...1B-1G-1R last
|
||||||
|
#if defined (REVERSE_ROWCHANNELS)
|
||||||
|
PixelRGB *pixel = GetDrawPixel(0,line);
|
||||||
|
#else
|
||||||
|
PixelRGB *pixel = GetDrawPixel(ColorduinoScreenWidth-1,line);
|
||||||
|
#endif
|
||||||
|
for(unsigned char x=0;x<ColorduinoScreenWidth;x++)
|
||||||
|
{
|
||||||
|
unsigned char temp = pixel->b;
|
||||||
|
unsigned char p;
|
||||||
|
for(p=0;p<ColorduinoBitsPerColor;p++) {
|
||||||
|
if(temp & 0x80)
|
||||||
|
LED_SDA_SET;
|
||||||
|
else
|
||||||
|
LED_SDA_CLR;
|
||||||
|
temp <<= 1;
|
||||||
|
LED_SCL_CLR;
|
||||||
|
LED_SCL_SET;
|
||||||
|
}
|
||||||
|
temp = pixel->g;
|
||||||
|
for(p=0;p<ColorduinoBitsPerColor;p++) {
|
||||||
|
if(temp & 0x80)
|
||||||
|
LED_SDA_SET;
|
||||||
|
else
|
||||||
|
LED_SDA_CLR;
|
||||||
|
temp <<= 1;
|
||||||
|
LED_SCL_CLR;
|
||||||
|
LED_SCL_SET;
|
||||||
|
}
|
||||||
|
temp = pixel->r;
|
||||||
|
for(p=0;p<ColorduinoBitsPerColor;p++) {
|
||||||
|
if(temp & 0x80)
|
||||||
|
LED_SDA_SET;
|
||||||
|
else
|
||||||
|
LED_SDA_CLR;
|
||||||
|
temp <<= 1;
|
||||||
|
LED_SCL_CLR;
|
||||||
|
LED_SCL_SET;
|
||||||
|
}
|
||||||
|
#if defined (REVERSE_ROWCHANNELS)
|
||||||
|
pixel++;
|
||||||
|
#else
|
||||||
|
pixel--;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
LED_LAT_SET;
|
||||||
|
LED_LAT_CLR;
|
||||||
|
}
|
||||||
|
|
||||||
|
// global instance
|
||||||
|
ColorduinoObject Colorduino;
|
||||||
@@ -0,0 +1,349 @@
|
|||||||
|
/*
|
||||||
|
Colorduino - Colorduino Library for Arduino
|
||||||
|
Copyright (c) 2011-2016 Sam C. Lin <lincomatic@hotmail.com>
|
||||||
|
based on C code by zzy@iteadstudio
|
||||||
|
Copyright (c) 2010 zzy@IteadStudio. All right reserved.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
#ifndef _COLORDUINO_H_
|
||||||
|
#define _COLORDUINO_H_
|
||||||
|
|
||||||
|
#if defined(ARDUINO) && ARDUINO >= 100
|
||||||
|
#include "Arduino.h"
|
||||||
|
#else
|
||||||
|
#include "WProgram.h"
|
||||||
|
#include "pins_arduino.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
|
||||||
|
#define ColorduinoBitsPerColor 8
|
||||||
|
|
||||||
|
#define ColorduinoScreenWidth 8
|
||||||
|
#define ColorduinoScreenHeight 8
|
||||||
|
|
||||||
|
//#define REVERSE_ROWCHANNELS
|
||||||
|
|
||||||
|
/*****************************
|
||||||
|
define the IO
|
||||||
|
*****************************/
|
||||||
|
//
|
||||||
|
// Removed all the inefficient digitalPinToBitMask() and
|
||||||
|
// digitalPinToPort(), replaced with direct PORT and bit mapping
|
||||||
|
//
|
||||||
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
|
||||||
|
#define RST PORTF // A2 = PF2
|
||||||
|
#define RST_BIT 0x04
|
||||||
|
#define LAT PORTF // A1 = PF1
|
||||||
|
#define LAT_BIT 0x02
|
||||||
|
#define SLB PORTF // A0 = PF0
|
||||||
|
#define SLB_BIT 0x01
|
||||||
|
#define SCL PORTH // D6 = PH3
|
||||||
|
#define SCL_BIT 0x08
|
||||||
|
#define SDA PORTH // D7 = PH4
|
||||||
|
#define SDA_BIT 0x10
|
||||||
|
|
||||||
|
#define open_line0 {PORTH=0x20;} // D8 = PH5
|
||||||
|
#define open_line1 {PORTH=0x40;} // D9 = PH6
|
||||||
|
#define open_line2 {PORTB=0x10;} // D10 = PB4
|
||||||
|
#define open_line3 {PORTB=0x20;} // D11 = PB5
|
||||||
|
#define open_line4 {PORTB=0x40;} // D12 = PB6
|
||||||
|
#define open_line5 {PORTB=0x80;} // D13 = PB7
|
||||||
|
#define open_line6 {PORTE=0x20;} // D3 = PE5
|
||||||
|
#define open_line7 {PORTG=0x20;} // D4 = PG5
|
||||||
|
#define close_all_lines {PORTH=0x00;PORTB=0x00;PORTE=0x00;PORTG=0x00;}
|
||||||
|
|
||||||
|
#elif defined(__AVR_ATmega32U4__)
|
||||||
|
|
||||||
|
#define RST PORTF // A2 = PF5
|
||||||
|
#define RST_BIT 0x20
|
||||||
|
#define LAT PORTF // A1 = PF6
|
||||||
|
#define LAT_BIT 0x40
|
||||||
|
#define SLB PORTF // A0 = PF7
|
||||||
|
#define SLB_BIT 0x80
|
||||||
|
#define SCL PORTD // D6 = PD7
|
||||||
|
#define SCL_BIT 0x80
|
||||||
|
#define SDA PORTE // D7 = PE6
|
||||||
|
#define SDA_BIT 0x40
|
||||||
|
|
||||||
|
#define open_line0 {PORTB=0x10;} // D8 = PB4
|
||||||
|
#define open_line1 {PORTB=0x20;} // D9 = PB5
|
||||||
|
#define open_line2 {PORTB=0x40;} // D10 = PB6
|
||||||
|
#define open_line3 {PORTB=0x80;} // D11 = PB7
|
||||||
|
#define open_line4 {PORTD=0x40;} // D12 = PD6
|
||||||
|
#define open_line5 {PORTC=0x80;} // D13 = PC7
|
||||||
|
#define open_line6 {PORTD=0x01;} // D3 = PD0
|
||||||
|
#define open_line7 {PORTD=0x10;} // D4 = PD4
|
||||||
|
#define close_all_lines {PORTB=0x00;PORTD=0x00;PORTC=0x00;}
|
||||||
|
|
||||||
|
#else // 328/168
|
||||||
|
|
||||||
|
#define RST PORTC // A2 = PC2
|
||||||
|
#define RST_BIT 0x04
|
||||||
|
#define LAT PORTC // A1 = PC1
|
||||||
|
#define LAT_BIT 0x02
|
||||||
|
#define SLB PORTC // A0 = PC0
|
||||||
|
#define SLB_BIT 0x01
|
||||||
|
#define SCL PORTD // D6 = PD6
|
||||||
|
#define SCL_BIT 0x40
|
||||||
|
#define SDA PORTD // D7 = PD7
|
||||||
|
#define SDA_BIT 0x80
|
||||||
|
|
||||||
|
#define open_line0 {PORTB=0x01;} // D8 = PB0
|
||||||
|
#define open_line1 {PORTB=0x02;} // D9 = PB1
|
||||||
|
#define open_line2 {PORTB=0x04;} // D10 = PB2
|
||||||
|
#define open_line3 {PORTB=0x08;} // D11 = PB3
|
||||||
|
#define open_line4 {PORTB=0x10;} // D12 = PB4
|
||||||
|
#define open_line5 {PORTB=0x20;} // D13 = PB5
|
||||||
|
#define open_line6 {PORTD=0x08;} // D3 = PD3
|
||||||
|
#define open_line7 {PORTD=0x10;} // D4 = PD4
|
||||||
|
#define close_all_lines {PORTD=0x00;PORTB=0x00;}
|
||||||
|
|
||||||
|
#endif // defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
|
||||||
|
#define LED_RST_SET RST|=RST_BIT
|
||||||
|
#define LED_RST_CLR RST&=~RST_BIT
|
||||||
|
#define LED_SDA_SET SDA|=SDA_BIT
|
||||||
|
#define LED_SDA_CLR SDA&=~SDA_BIT
|
||||||
|
#define LED_SCL_SET SCL|=SCL_BIT
|
||||||
|
#define LED_SCL_CLR SCL&=~SCL_BIT
|
||||||
|
#define LED_LAT_SET LAT|=LAT_BIT
|
||||||
|
#define LED_LAT_CLR LAT&=~LAT_BIT
|
||||||
|
#define LED_SLB_SET SLB|=SLB_BIT
|
||||||
|
#define LED_SLB_CLR SLB&=~SLB_BIT
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct pixelRGB {
|
||||||
|
unsigned char r;
|
||||||
|
unsigned char g;
|
||||||
|
unsigned char b;
|
||||||
|
} PixelRGB;
|
||||||
|
|
||||||
|
class ColorduinoObject {
|
||||||
|
public:
|
||||||
|
PixelRGB frameBuffer0[ColorduinoScreenWidth*ColorduinoScreenHeight];
|
||||||
|
PixelRGB frameBuffer1[ColorduinoScreenWidth*ColorduinoScreenHeight];
|
||||||
|
PixelRGB *curDrawFrame;
|
||||||
|
PixelRGB *curWriteFrame;
|
||||||
|
unsigned char line;
|
||||||
|
|
||||||
|
ColorduinoObject() {
|
||||||
|
line = 0;
|
||||||
|
curWriteFrame = frameBuffer0;
|
||||||
|
curDrawFrame = frameBuffer1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _IO_Init()
|
||||||
|
{
|
||||||
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
DDRF = 0xff;
|
||||||
|
DDRH = 0xff;
|
||||||
|
DDRB = 0xff;
|
||||||
|
DDRE = 0xff;
|
||||||
|
DDRG = 0xff;
|
||||||
|
|
||||||
|
PORTF = 0x00;
|
||||||
|
PORTH = 0x00;
|
||||||
|
PORTB = 0x00;
|
||||||
|
PORTE = 0x00;
|
||||||
|
PORTG = 0x00;
|
||||||
|
#elif defined(__AVR_ATmega328__) || defined(__AVR_ATmega168__)
|
||||||
|
DDRD = 0xff; // set all pins direction of PortD
|
||||||
|
DDRC = 0xff; // set all pins direction of PortC
|
||||||
|
DDRB = 0xff; // set all pins direction of PortB
|
||||||
|
|
||||||
|
PORTD = 0x00; // set all pins output is low of PortD
|
||||||
|
PORTC = 0x00; // set all pins output is low of PortC
|
||||||
|
PORTB = 0x00; // set all pins output is low of PortB
|
||||||
|
#else
|
||||||
|
uint8_t lines[] = {A0,A1,A2,3,4,6,7,8,9,10,11,12,13};
|
||||||
|
|
||||||
|
for(int i = 0; i < 13;i++){
|
||||||
|
pinMode(lines[i],OUTPUT);
|
||||||
|
digitalWrite(lines[i],LOW);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void LED_Delay(unsigned char i);
|
||||||
|
|
||||||
|
void SetWhiteBal(unsigned char wbval[3]);
|
||||||
|
|
||||||
|
void _LED_Init()
|
||||||
|
{
|
||||||
|
LED_RST_SET;
|
||||||
|
LED_Delay(1);
|
||||||
|
LED_RST_CLR;
|
||||||
|
LED_Delay(1);
|
||||||
|
LED_RST_SET;
|
||||||
|
LED_Delay(1);
|
||||||
|
|
||||||
|
line = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _TC2_Init()
|
||||||
|
{
|
||||||
|
// Arduino runs at 16 Mhz...
|
||||||
|
// Timer Settings, for the Timer Control Register etc. , thank you internets. ATmega168 !
|
||||||
|
// Timer2 (8bit) Settings:
|
||||||
|
// prescaler (frequency divider) values: CS22 CS21 CS20
|
||||||
|
// 0 0 0 stopped
|
||||||
|
// 0 0 1 /1
|
||||||
|
// 0 1 0 /8
|
||||||
|
// 0 1 1 /32
|
||||||
|
// 1 0 0 /64
|
||||||
|
// 1 0 1 /128
|
||||||
|
// 1 1 0 /256
|
||||||
|
// 1 1 1 /1024
|
||||||
|
// TCNT2 increments every = 16MHz / prescaler
|
||||||
|
|
||||||
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
TCCR2B = 0x00; // Disable timer while configuring
|
||||||
|
TCCR2A = 0x00; // Use normal mode
|
||||||
|
TIMSK2 = 0x01; // Timer2 overflow interrupt enable
|
||||||
|
TCNT2 = 0xff; // Reset timer to count of 255
|
||||||
|
TCCR2B = 0x05; // Prescaler = 128
|
||||||
|
#elif defined(__AVR_ATmega32U4__)
|
||||||
|
// set prescaler to 128 -> TCNT2 freq = 125KHz
|
||||||
|
//TCCR4B |= (1<<CS43);
|
||||||
|
//TCCR4B &= ~((1<<CS42)|(1<<CS41)|(1<<CS40));
|
||||||
|
TCCR4B |= ((1<<CS42)|(1<<CS41)|(1<<CS40));
|
||||||
|
TCCR4C &= ~(1<<PWM4D);
|
||||||
|
//TCCR4D &= ~((1<<WGM41)|(1<<WGM40)); // Use normal mode
|
||||||
|
TCCR4A &= ~((1<<COM4A1)|(1<<COM4A0)); // Use normal mode
|
||||||
|
TIMSK4 |= (1<<TOIE4); //Timer4D Overflow Interrupt Enable
|
||||||
|
TIFR4 |= (1<<TOV4);
|
||||||
|
OCR4C = 0xff;
|
||||||
|
TCNT4 = 0xff;
|
||||||
|
#else
|
||||||
|
// set prescaler to 128 -> TCNT2 freq = 125KHz
|
||||||
|
TCCR2B |= ((1<<CS22)|(1<<CS20));
|
||||||
|
TCCR2B &= ~((1<<CS21));
|
||||||
|
|
||||||
|
TCCR2A &= ~((1<<WGM21) | (1<<WGM20)); // Use normal mode
|
||||||
|
ASSR |= (1<<AS2); // Use internal clock - external clock not used in Arduino
|
||||||
|
TIMSK2 |= ((1<<TOIE2) | (0<<OCIE2B)); //Timer2 Overflow Interrupt Enable
|
||||||
|
TCNT2 = 0xff;
|
||||||
|
#endif
|
||||||
|
// TCNTn=99, ISR fires every 256-99 = 157 ticks, 125KHz/157 = 796.2Hz/8 rows = 99.5Hz refresh rate
|
||||||
|
SetTimerCounter(99);
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
void open_line(unsigned char x)
|
||||||
|
{
|
||||||
|
switch (x)
|
||||||
|
{
|
||||||
|
case 0 :open_line0;
|
||||||
|
break;
|
||||||
|
case 1 :open_line1;
|
||||||
|
break;
|
||||||
|
case 2 :open_line2;
|
||||||
|
break;
|
||||||
|
case 3 :open_line3;
|
||||||
|
break;
|
||||||
|
case 4 :open_line4;
|
||||||
|
break;
|
||||||
|
case 5 :open_line5;
|
||||||
|
break;
|
||||||
|
case 6 :open_line6;
|
||||||
|
break;
|
||||||
|
case 7 :open_line7;
|
||||||
|
break;
|
||||||
|
default: close_all_lines;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Init() {
|
||||||
|
_IO_Init(); //Init IO
|
||||||
|
_LED_Init(); //Init LED Hardware
|
||||||
|
_TC2_Init(); //Init Timer/Count2
|
||||||
|
}
|
||||||
|
|
||||||
|
void FlipPage() {
|
||||||
|
cli();
|
||||||
|
// swap frame buffers
|
||||||
|
PixelRGB *tmp = curDrawFrame;
|
||||||
|
curDrawFrame = curWriteFrame;
|
||||||
|
curWriteFrame = tmp;
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
// get a pixel for writing in the offscreen framebuffer, return null if out of screen
|
||||||
|
PixelRGB *GetPixel(char x, char y) {
|
||||||
|
if ( x < 0 || x >= ColorduinoScreenWidth ||
|
||||||
|
y < 0 || y >= ColorduinoScreenHeight )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return curWriteFrame + (y * ColorduinoScreenWidth) + x;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get a pixel from the active framebuffer, return null if out of screen
|
||||||
|
PixelRGB *GetDrawPixel(char x, char y) {
|
||||||
|
if ( x < 0 || x >= ColorduinoScreenWidth ||
|
||||||
|
y < 0 || y >= ColorduinoScreenHeight )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return curDrawFrame + (y * ColorduinoScreenWidth) + x;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set a pixel in the offscreen frame buffer
|
||||||
|
void SetPixel(char x, char y, unsigned char r, unsigned char g, unsigned char b) {
|
||||||
|
PixelRGB *p = GetPixel(x,y);
|
||||||
|
if (p) {
|
||||||
|
p->r = r;
|
||||||
|
p->g = g;
|
||||||
|
p->b = b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set a pixel in the offscreen frame buffer
|
||||||
|
void SetPixel(char x, char y, const PixelRGB & color) {
|
||||||
|
PixelRGB * p = GetPixel(x,y);
|
||||||
|
if (p) {
|
||||||
|
*p = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************************************
|
||||||
|
Name: ColorFill
|
||||||
|
Function: Fill the frame with a color
|
||||||
|
Parameter:R: the value of RED. Range:RED 0~255
|
||||||
|
G: the value of GREEN. Range:RED 0~255
|
||||||
|
B: the value of BLUE. Range:RED 0~255
|
||||||
|
********************************************************/
|
||||||
|
void ColorFill(unsigned char R,unsigned char G,unsigned char B);
|
||||||
|
|
||||||
|
/********************************************************
|
||||||
|
Name: SetTimerCounter(unsigned char data)
|
||||||
|
Function: Set the TimerCounter variable.
|
||||||
|
ISR fires every 256-TCNTn ticks
|
||||||
|
Parameter:data=loaded into TCNTn at the end of ISR
|
||||||
|
********************************************************/
|
||||||
|
void SetTimerCounter(unsigned char data);
|
||||||
|
|
||||||
|
void run();
|
||||||
|
};
|
||||||
|
|
||||||
|
extern ColorduinoObject Colorduino;
|
||||||
|
|
||||||
|
#endif // _COLORDUINO_H_
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
2018/09/07 DC v1.2.7
|
||||||
|
- Colorduino.h - Remove all the inefficient digitalPinToBitMask() and digitalPinToPort(),
|
||||||
|
which was causing the sketch to run very slow if compiled by later versions of Arduino.
|
||||||
|
- Colorduino.cpp - Disable interrupts inside SetWhiteBal(), so the timer ISR can’t
|
||||||
|
come in at the same time, it will screw up the control signal timing.
|
||||||
|
- Add a function to change the interrupt timer counter
|
||||||
|
- Origin (0,0) is bottom left corner. When we update the LED driver in run(), channel 23 is
|
||||||
|
the last shift register so we should start with column 7B-7G-7R... and ...1B-1G-1R last
|
||||||
|
You can use the REVERSE_ROWCHANNELS define to flip the columns.
|
||||||
|
|
||||||
|
2016/12/12 SCL v1.2.6
|
||||||
|
- Colorduino.h - fix C99 warning
|
||||||
|
|
||||||
|
2016/12/12 SCL v1.2.5
|
||||||
|
- merged sbouba PR#9 - limit check Get/Set functions
|
||||||
|
- change 0 to NULL
|
||||||
|
|
||||||
|
2012/07/12 SCL v1.2.4
|
||||||
|
fixed bug in Mega support introduced in 1.2.3 (thanks wiltwong!)
|
||||||
|
fixed a bug in close_lines() in Leonardo code (thanks Markus Lange)
|
||||||
|
|
||||||
|
2012/07/11 SCL v1.2.3
|
||||||
|
added Leonardo support (thanks to Markus Lange)
|
||||||
|
added ColorFill() to library
|
||||||
|
|
||||||
|
2012/07/07 SCL v1.2.2
|
||||||
|
added Mega support (merged from wiltwong)
|
||||||
|
|
||||||
|
2012/06/07 SCL v1.2.1
|
||||||
|
fix compilation errors for Arduino v1.x
|
||||||
|
|
||||||
|
2011/03/10 SCL lincomatic@hotmail.com v1.2
|
||||||
|
take out superfluous cli/sei in ISR
|
||||||
|
take out superfluous TCCR2A |= (1 << WGM21) | (1 << WGM20); in _T2C_Init()
|
||||||
|
lower screen refresh rate from 100Hz to 80Hz
|
||||||
|
|
||||||
|
2011/03/06 SCL lincomatic@hotmail.com v1.1
|
||||||
|
fixed bugs in coordinate system. origin (0,0) is bottom left corner
|
||||||
|
rearranged frame buffer for better performance
|
||||||
|
|
||||||
|
2011/03/04 SCL lincomatic@hotmail.com v1.0
|
||||||
|
Initial Release
|
||||||
+316
@@ -0,0 +1,316 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Colorduino Plasma</title>
|
||||||
|
<style>
|
||||||
|
:root { color-scheme: dark; }
|
||||||
|
* { box-sizing: border-box; }
|
||||||
|
body { margin: 0; background: #0b0b0d; color: #ddd; font: 14px/1.4 system-ui, sans-serif;
|
||||||
|
display: flex; flex-direction: column; height: 100vh; }
|
||||||
|
header { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; padding: 10px 14px;
|
||||||
|
background: #16161a; border-bottom: 1px solid #2a2a30; }
|
||||||
|
label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #9a9aa5; }
|
||||||
|
label.inline { flex-direction: row; align-items: center; gap: 6px; color: #ddd; font-size: 13px; }
|
||||||
|
input[type=number] { width: 78px; }
|
||||||
|
input, select, button { font: inherit; background: #222228; color: #eee; border: 1px solid #3a3a44;
|
||||||
|
border-radius: 6px; padding: 4px 8px; }
|
||||||
|
button { cursor: pointer; }
|
||||||
|
button:hover { background: #2d2d35; }
|
||||||
|
.group { display: flex; gap: 6px; align-items: end; }
|
||||||
|
#stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 12px; }
|
||||||
|
canvas { image-rendering: pixelated; }
|
||||||
|
footer { padding: 6px 14px; font-size: 12px; color: #777; background: #16161a; border-top: 1px solid #2a2a30;
|
||||||
|
display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
||||||
|
.val { color: #ccc; font-variant-numeric: tabular-nums; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="group">
|
||||||
|
<label>Preset
|
||||||
|
<select id="preset">
|
||||||
|
<option value="8,8,1">8×8 Colorduino</option>
|
||||||
|
<option value="8,8,32">8×8 area, 32× detail</option>
|
||||||
|
<option value="32,32,1">32×32</option>
|
||||||
|
<option value="64,64,1">64×64</option>
|
||||||
|
<option value="128,72,1">128×72</option>
|
||||||
|
<option value="256,256,1">256×256 field</option>
|
||||||
|
<option value="64,36,8">64×36, 8× detail</option>
|
||||||
|
<option value="">Custom</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<label>Width (px)<input id="w" type="number" min="1" max="1024" value="8"></label>
|
||||||
|
<label>Height (px)<input id="h" type="number" min="1" max="1024" value="8"></label>
|
||||||
|
<label>Detail
|
||||||
|
<select id="detail">
|
||||||
|
<option>1</option><option>2</option><option>4</option><option>8</option>
|
||||||
|
<option>16</option><option>32</option><option>64</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label>Speed (frames/s) <span class="val" id="fpsv"></span>
|
||||||
|
<input id="fps" type="range" min="1" max="60" value="12">
|
||||||
|
</label>
|
||||||
|
<label>Colour
|
||||||
|
<select id="cmode">
|
||||||
|
<option value="led">LED light (gamma table → screen)</option>
|
||||||
|
<option value="raw">Raw PWM values</option>
|
||||||
|
<option value="nogamma">Without gamma table</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label>Rotate
|
||||||
|
<select id="rot"><option>0</option><option>90</option><option>180</option><option>270</option></select>
|
||||||
|
</label>
|
||||||
|
<label class="inline"><input id="led" type="checkbox" checked> LED dots</label>
|
||||||
|
<label class="inline"><input id="outline" type="checkbox"> Mark 8×8 area</label>
|
||||||
|
<div class="group">
|
||||||
|
<button id="play">Pause</button>
|
||||||
|
<button id="step">Step</button>
|
||||||
|
<button id="reset">Reset</button>
|
||||||
|
<button id="fs">Fullscreen</button>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div id="stage"><canvas id="c"></canvas></div>
|
||||||
|
<footer>
|
||||||
|
<span>paletteShift <span class="val" id="shift"></span> · samples <span class="val" id="samples"></span> · render <span class="val" id="ms"></span></span>
|
||||||
|
<span>Space = pause · → = step · F = fullscreen</span>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
"use strict";
|
||||||
|
/* Port of ColorduinoPlasma (lincomatic Colorduino library), maths matched to
|
||||||
|
the ATmega328 build: 32-bit float everywhere (Math.fround), float->unsigned
|
||||||
|
char conversion wraps negatives (avr-libc __fixunssfsi), gamma8 table. */
|
||||||
|
|
||||||
|
const F = Math.fround;
|
||||||
|
const PlasmaScaling = F(10.0);
|
||||||
|
const START_SHIFT = 128000;
|
||||||
|
|
||||||
|
const gamma8 = [
|
||||||
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,5,5,5,
|
||||||
|
5,6,6,6,6,7,7,7,7,8,8,8,9,9,9,10,10,10,11,11,11,12,12,13,13,13,14,14,15,15,16,16,
|
||||||
|
17,17,18,18,19,19,20,20,21,21,22,22,23,24,24,25,25,26,27,27,28,29,29,30,31,32,32,33,34,35,35,36,
|
||||||
|
37,38,39,39,40,41,42,43,44,45,46,47,48,49,50,50,51,52,54,55,56,57,58,59,60,61,62,63,64,66,67,68,
|
||||||
|
69,70,72,73,74,75,77,78,79,81,82,83,85,86,87,89,90,92,93,95,96,98,99,101,102,104,105,107,109,110,112,114,
|
||||||
|
115,117,119,120,122,124,126,127,129,131,133,135,137,138,140,142,144,146,148,150,152,154,156,158,160,162,164,167,169,171,173,175,
|
||||||
|
177,180,182,184,186,189,191,193,196,198,200,203,205,208,210,213,215,218,220,223,225,228,231,233,236,239,241,244,247,249,252,255
|
||||||
|
];
|
||||||
|
|
||||||
|
/* HSVtoRGB from the sketch, s = v = 255. Returns pre-gamma 0..255 values. */
|
||||||
|
function hsvToRgb(hByte) {
|
||||||
|
let h = F(hByte / 256.0);
|
||||||
|
const s = F(255 / 256.0), v = F(255 / 256.0);
|
||||||
|
h = F(h * 6.0);
|
||||||
|
const i = Math.floor(h);
|
||||||
|
const f = F(h - i);
|
||||||
|
const p = F(v * F(1.0 - s));
|
||||||
|
const q = F(v * F(1.0 - F(s * f)));
|
||||||
|
const t = F(v * F(1.0 - F(s * F(1.0 - f))));
|
||||||
|
let r, g, b;
|
||||||
|
switch (i) {
|
||||||
|
case 0: r = v; g = t; b = p; break;
|
||||||
|
case 1: r = q; g = v; b = p; break;
|
||||||
|
case 2: r = p; g = v; b = t; break;
|
||||||
|
case 3: r = p; g = q; b = v; break;
|
||||||
|
case 4: r = t; g = p; b = v; break;
|
||||||
|
case 5: r = v; g = p; b = q; break;
|
||||||
|
default: r = g = b = 0;
|
||||||
|
}
|
||||||
|
return [Math.trunc(F(r * 255.0)), Math.trunc(F(g * 255.0)), Math.trunc(F(b * 255.0))];
|
||||||
|
}
|
||||||
|
|
||||||
|
function linToSrgb(l) {
|
||||||
|
const s = l <= 0.0031308 ? 12.92 * l : 1.055 * Math.pow(l, 1 / 2.4) - 0.055;
|
||||||
|
return Math.round(Math.min(1, Math.max(0, s)) * 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The colour depends only on the 8-bit hue, so build a 256-entry palette. */
|
||||||
|
const palettes = {};
|
||||||
|
for (const mode of ["led", "raw", "nogamma"]) {
|
||||||
|
const pal = new Uint32Array(256);
|
||||||
|
for (let hb = 0; hb < 256; hb++) {
|
||||||
|
let [r, g, b] = hsvToRgb(hb);
|
||||||
|
if (mode !== "nogamma") { r = gamma8[r]; g = gamma8[g]; b = gamma8[b]; }
|
||||||
|
if (mode === "led") { // LED light output is linear in PWM duty
|
||||||
|
r = linToSrgb(r / 255); g = linToSrgb(g / 255); b = linToSrgb(b / 255);
|
||||||
|
}
|
||||||
|
pal[hb] = (255 << 24) | (b << 16) | (g << 8) | r; // little-endian RGBA
|
||||||
|
}
|
||||||
|
palettes[mode] = pal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- state & caches ---------- */
|
||||||
|
const $ = id => document.getElementById(id);
|
||||||
|
const cv = $("c"), ctx = cv.getContext("2d");
|
||||||
|
const src = document.createElement("canvas"), sctx = src.getContext("2d");
|
||||||
|
let W = 8, H = 8, D = 1, SW = 8, SH = 8; // logical size, detail, sample grid
|
||||||
|
let xs, ys, sDist, img, buf32; // per-config caches
|
||||||
|
let shift = START_SHIFT, playing = true, lastT = 0, acc = 0;
|
||||||
|
let mask = null, cell = 1, rotation = 0;
|
||||||
|
|
||||||
|
function setup() {
|
||||||
|
W = clampInt($("w").value, 1, 1024);
|
||||||
|
H = clampInt($("h").value, 1, 1024);
|
||||||
|
D = clampInt($("detail").value, 1, 64);
|
||||||
|
// keep the sample count sane
|
||||||
|
while (W * D * H * D > 2_000_000 && D > 1) D >>= 1;
|
||||||
|
$("detail").value = String(D);
|
||||||
|
SW = W * D; SH = H * D;
|
||||||
|
xs = new Float32Array(SW); ys = new Float32Array(SH);
|
||||||
|
for (let i = 0; i < SW; i++) xs[i] = F(i / D);
|
||||||
|
for (let j = 0; j < SH; j++) ys[j] = F(j / D);
|
||||||
|
|
||||||
|
// static part: sin(dist(x,y,64,64)/10) and sin(dist(x,y,192,100)/10)
|
||||||
|
sDist = new Float32Array(SW * SH * 2);
|
||||||
|
for (let j = 0, k = 0; j < SH; j++) {
|
||||||
|
const y = ys[j];
|
||||||
|
for (let i = 0; i < SW; i++, k += 2) {
|
||||||
|
const x = xs[i];
|
||||||
|
sDist[k] = F(Math.sin(F(dist(x, y, 64.0, 64.0) / PlasmaScaling)));
|
||||||
|
sDist[k + 1] = F(Math.sin(F(dist(x, y, 192.0, 100.0) / PlasmaScaling)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
src.width = SW; src.height = SH;
|
||||||
|
img = sctx.createImageData(SW, SH);
|
||||||
|
buf32 = new Uint32Array(img.data.buffer);
|
||||||
|
$("samples").textContent = `${SW}×${SH}`;
|
||||||
|
layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
function dist(a, b, c, d) {
|
||||||
|
const dx = F(c - a), dy = F(d - b);
|
||||||
|
return F(Math.sqrt(F(F(dx * dx) + F(dy * dy))));
|
||||||
|
}
|
||||||
|
|
||||||
|
function clampInt(v, lo, hi) { v = parseInt(v, 10); return isNaN(v) ? lo : Math.max(lo, Math.min(hi, v)); }
|
||||||
|
|
||||||
|
/* ---------- plasma_morph() ---------- */
|
||||||
|
function computeFrame() {
|
||||||
|
const pal = palettes[$("cmode").value];
|
||||||
|
const s1 = new Float32Array(SW), s3 = new Float32Array(SH);
|
||||||
|
for (let i = 0; i < SW; i++) s1[i] = F(Math.sin(F(F(xs[i] + shift) / PlasmaScaling)));
|
||||||
|
const sh7 = F(shift / 7.0);
|
||||||
|
for (let j = 0; j < SH; j++) s3[j] = F(Math.sin(F(F(ys[j] + sh7) / PlasmaScaling)));
|
||||||
|
for (let j = 0, k = 0, p = 0; j < SH; j++) {
|
||||||
|
const c = s3[j];
|
||||||
|
for (let i = 0; i < SW; i++, k += 2, p++) {
|
||||||
|
const value = F(F(F(s1[i] + sDist[k]) + c) + sDist[k + 1]);
|
||||||
|
buf32[p] = pal[Math.trunc(F(value * 128)) & 0xff];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sctx.putImageData(img, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- display ---------- */
|
||||||
|
function layout() {
|
||||||
|
rotation = parseInt($("rot").value, 10);
|
||||||
|
const rotated = rotation === 90 || rotation === 270;
|
||||||
|
const lw = rotated ? H : W, lh = rotated ? W : H;
|
||||||
|
const st = $("stage");
|
||||||
|
const availW = st.clientWidth - 24, availH = st.clientHeight - 24;
|
||||||
|
const dpr = window.devicePixelRatio || 1;
|
||||||
|
// cell = device pixels per logical pixel
|
||||||
|
cell = Math.max(1, Math.floor(Math.min(availW / lw, availH / lh) * dpr));
|
||||||
|
if (D > 1) cell = Math.max(cell, D); // detail needs room
|
||||||
|
cv.width = lw * cell; cv.height = lh * cell;
|
||||||
|
cv.style.width = (cv.width / dpr) + "px";
|
||||||
|
cv.style.height = (cv.height / dpr) + "px";
|
||||||
|
buildMask(lw, lh);
|
||||||
|
draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* black sheet with round holes, overlaid when "LED dots" is on */
|
||||||
|
function buildMask(lw, lh) {
|
||||||
|
mask = null;
|
||||||
|
if (!$("led").checked || cell < 4) return;
|
||||||
|
mask = document.createElement("canvas");
|
||||||
|
mask.width = cv.width; mask.height = cv.height;
|
||||||
|
const m = mask.getContext("2d");
|
||||||
|
m.fillStyle = "#0b0b0d";
|
||||||
|
m.fillRect(0, 0, mask.width, mask.height);
|
||||||
|
m.globalCompositeOperation = "destination-out";
|
||||||
|
const r = cell * 0.40;
|
||||||
|
const tile = document.createElement("canvas");
|
||||||
|
tile.width = tile.height = cell;
|
||||||
|
const t = tile.getContext("2d");
|
||||||
|
t.beginPath(); t.arc(cell / 2, cell / 2, r, 0, Math.PI * 2); t.fill();
|
||||||
|
const pat = m.createPattern(tile, "repeat");
|
||||||
|
m.fillStyle = pat;
|
||||||
|
m.fillRect(0, 0, mask.width, mask.height);
|
||||||
|
}
|
||||||
|
|
||||||
|
function draw() {
|
||||||
|
if (!img) return;
|
||||||
|
ctx.save();
|
||||||
|
ctx.imageSmoothingEnabled = false;
|
||||||
|
ctx.fillStyle = "#000"; ctx.fillRect(0, 0, cv.width, cv.height);
|
||||||
|
ctx.translate(cv.width / 2, cv.height / 2);
|
||||||
|
ctx.rotate(rotation * Math.PI / 180);
|
||||||
|
const dw = W * cell, dh = H * cell;
|
||||||
|
ctx.drawImage(src, -dw / 2, -dh / 2, dw, dh);
|
||||||
|
if ($("outline").checked && (W > 8 || H > 8)) {
|
||||||
|
ctx.strokeStyle = "#fff"; ctx.lineWidth = Math.max(1, cell / 8);
|
||||||
|
ctx.setLineDash([cell / 2, cell / 3]);
|
||||||
|
ctx.strokeRect(-dw / 2, -dh / 2, Math.min(8, W) * cell, Math.min(8, H) * cell);
|
||||||
|
}
|
||||||
|
ctx.restore();
|
||||||
|
if (mask) ctx.drawImage(mask, 0, 0);
|
||||||
|
$("shift").textContent = shift;
|
||||||
|
}
|
||||||
|
|
||||||
|
function frame() {
|
||||||
|
const t0 = performance.now();
|
||||||
|
computeFrame();
|
||||||
|
draw();
|
||||||
|
$("ms").textContent = (performance.now() - t0).toFixed(1) + " ms";
|
||||||
|
shift++; // paletteShift++ after drawing, as in the sketch
|
||||||
|
}
|
||||||
|
|
||||||
|
function tick(t) {
|
||||||
|
const dt = Math.min(250, t - lastT); lastT = t;
|
||||||
|
if (playing) {
|
||||||
|
acc += dt;
|
||||||
|
const period = 1000 / parseInt($("fps").value, 10);
|
||||||
|
if (acc >= period) { acc %= period; frame(); }
|
||||||
|
}
|
||||||
|
requestAnimationFrame(tick);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- UI ---------- */
|
||||||
|
function applyPreset() {
|
||||||
|
const v = $("preset").value;
|
||||||
|
if (!v) return;
|
||||||
|
const [w, h, d] = v.split(",");
|
||||||
|
$("w").value = w; $("h").value = h; $("detail").value = d;
|
||||||
|
$("led").checked = (d === "1"); // dots only make sense one sample per LED
|
||||||
|
setup(); frame();
|
||||||
|
}
|
||||||
|
$("preset").onchange = applyPreset;
|
||||||
|
for (const id of ["w", "h", "detail"]) $(id).onchange = () => { $("preset").value = ""; setup(); frame(); };
|
||||||
|
$("cmode").onchange = () => { shift--; frame(); };
|
||||||
|
$("rot").onchange = layout;
|
||||||
|
$("led").onchange = layout;
|
||||||
|
$("outline").onchange = draw;
|
||||||
|
$("fps").oninput = () => $("fpsv").textContent = $("fps").value;
|
||||||
|
$("play").onclick = () => { playing = !playing; $("play").textContent = playing ? "Pause" : "Play"; };
|
||||||
|
$("step").onclick = () => { playing = false; $("play").textContent = "Play"; frame(); };
|
||||||
|
$("reset").onclick = () => { shift = START_SHIFT; frame(); };
|
||||||
|
$("fs").onclick = () => document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
||||||
|
window.addEventListener("resize", layout);
|
||||||
|
document.addEventListener("fullscreenchange", () => setTimeout(layout, 50));
|
||||||
|
document.addEventListener("keydown", e => {
|
||||||
|
if (e.target.tagName === "INPUT" || e.target.tagName === "SELECT") return;
|
||||||
|
if (e.code === "Space") { e.preventDefault(); $("play").click(); }
|
||||||
|
else if (e.code === "ArrowRight") $("step").click();
|
||||||
|
else if (e.key === "f" || e.key === "F") $("fs").click();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("fpsv").textContent = $("fps").value;
|
||||||
|
setup();
|
||||||
|
frame();
|
||||||
|
requestAnimationFrame(t => { lastT = t; tick(t); });
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in new issue
Block a user