From 210eb9495afb41c0abf9c90ed1c9bf931eb27bbc Mon Sep 17 00:00:00 2001 From: James Date: Tue, 9 Aug 2022 21:04:02 +1200 Subject: [PATCH 1/9] Update Diablo_Serial_4DLib.cpp Added fix for SAM/SAMD architectures, and removed 2x flush() calls which could cause issues with SAM/SAMD processors. --- src/Diablo_Serial_4DLib.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Diablo_Serial_4DLib.cpp b/src/Diablo_Serial_4DLib.cpp index c8e963c..e48d3bc 100644 --- a/src/Diablo_Serial_4DLib.cpp +++ b/src/Diablo_Serial_4DLib.cpp @@ -220,7 +220,10 @@ word Diablo_Serial_4DLib::GetAckResData(t4DByteArray OutData, word size) void Diablo_Serial_4DLib::SetThisBaudrate(int Newrate) { int br ; + #if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) + //Only done for non-SAMD/SAM architectures _virtualPort->flush() ; + #endif // _virtualPort->end() ; switch(Newrate) { @@ -267,7 +270,11 @@ void Diablo_Serial_4DLib::SetThisBaudrate(int Newrate) } // _virtualPort->begin(br) ; delay(50) ; // Display sleeps for 100 + + #if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) + //Only done for non-SAMD/SAM architectures _virtualPort->flush() ; + #endif } //*********************************************************************************************// From 6bc932a45edb19a5adc74b1cad4c31d94c0f3487 Mon Sep 17 00:00:00 2001 From: 4D Systems Date: Tue, 9 Aug 2022 21:06:05 +1200 Subject: [PATCH 2/9] Update library.properties --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 7939d8a..7f4d25d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Diablo16-Serial-Arduino-Library -version=1.0.2 +version=1.0.3 author=4D Systems maintainer=4D Systems sentence=Provides library access to communicate with the 4D Systems Diablo16 processor, when configured in Serial/SPE mode From 843e0f84f37b47ef9226ea6d082be9d6f9a6a5d6 Mon Sep 17 00:00:00 2001 From: 4D Systems Date: Mon, 29 Aug 2022 14:36:11 +1200 Subject: [PATCH 3/9] Create LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. From 49450696977c367484f3e53901f5462243667496 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Tue, 30 Aug 2022 14:34:21 +0800 Subject: [PATCH 4/9] Fixed setbaudWait function --- src/Diablo_Serial_4DLib.cpp | 208 +++++++++++++++++++++++++----------- src/Diablo_Serial_4DLib.h | 33 +++++- 2 files changed, 174 insertions(+), 67 deletions(-) diff --git a/src/Diablo_Serial_4DLib.cpp b/src/Diablo_Serial_4DLib.cpp index e48d3bc..f9e5102 100644 --- a/src/Diablo_Serial_4DLib.cpp +++ b/src/Diablo_Serial_4DLib.cpp @@ -10,14 +10,48 @@ #include "WProgram.h" // for Arduino 23 #endif -Diablo_Serial_4DLib::Diablo_Serial_4DLib(Stream * virtualPort) { +Diablo_Serial_4DLib::Diablo_Serial_4DLib(Stream * virtualPort, void (*setBaudRateHndl)(unsigned long)) { _virtualPort = virtualPort; + setBaudRateExternal = setBaudRateHndl; + setBaudRateInternal = &Diablo_Serial_4DLib::exSetBaudRateHndl; + unknownSerial = true; #if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) //Only done for non-SAMD/SAM architectures _virtualPort->flush(); #endif } +Diablo_Serial_4DLib::Diablo_Serial_4DLib(HardwareSerial * serial) { + _virtualPort = (Stream *)serial; + setBaudRateInternal = &Diablo_Serial_4DLib::hwSetBaudRateHndl; +#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) + //Only done for non-SAMD/SAM architectures + _virtualPort->flush(); +#endif +} + +#ifdef SoftwareSerial_h +Diablo_Serial_4DLib::Diablo_Serial_4DLib(SoftwareSerial * serial) { + _virtualPort = (Stream *)serial; + setBaudRateInternal = &Diablo_Serial_4DLib::swSetBaudRateHndl; +#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) + //Only done for non-SAMD/SAM architectures + _virtualPort->flush(); +#endif +} +#endif + +#ifdef AltSoftSerial_h +Diablo_Serial_4DLib::Diablo_Serial_4DLib(AltSoftSerial * serial) { + _virtualPort = (Stream *)serial; + setBaudRateInternal = &Diablo_Serial_4DLib::alSetBaudRateHndl; +#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) + //Only done for non-SAMD/SAM architectures + _virtualPort->flush(); +#endif +} +#endif + //*********************************************************************************************// //**********************************Intrinsic 4D Routines**************************************// //*********************************************************************************************// @@ -217,66 +251,6 @@ word Diablo_Serial_4DLib::GetAckResData(t4DByteArray OutData, word size) return Result ; } -void Diablo_Serial_4DLib::SetThisBaudrate(int Newrate) -{ - int br ; - #if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) - //Only done for non-SAMD/SAM architectures - _virtualPort->flush() ; - #endif -// _virtualPort->end() ; - switch(Newrate) - { - /* case BAUD_110 : br = 110 ; - break ; - case BAUD_300 : br = 300 ; - break ; - case BAUD_600 : br = 600 ; - break ; - case BAUD_1200 : br = 1200 ; - break ; - case BAUD_2400 : br = 2400 ; - break ; - case BAUD_4800 : br = 4800 ; - break ;*/ - case BAUD_9600 : br = 9600 ; - break ; -// case BAUD_14400 : br = 14400 ; -// break ; - case BAUD_19200 : br = 19200 ; - break ; - /* case BAUD_31250 : br = 31250 ; - break ; - case BAUD_38400 : br = 38400 ; - break ; - case BAUD_56000 : br = 56000 ; - break ; - case BAUD_57600 : br = 57600 ; - break ; - case BAUD_115200 : br = 115200 ; - break ; - case BAUD_128000 : br = 133928 ; // actual rate is not 128000 ; - break ; - case BAUD_256000 : br = 281250 ; // actual rate is not 256000 ; - break ; - case BAUD_300000 : br = 312500 ; // actual rate is not 300000 ; - break ; - case BAUD_375000 : br = 401785 ; // actual rate is not 375000 ; - break ; - case BAUD_500000 : br = 562500 ; // actual rate is not 500000 ; - break ; - case BAUD_600000 : br = 703125 ; // actual rate is not 600000 ; - break ;*/ - } -// _virtualPort->begin(br) ; - delay(50) ; // Display sleeps for 100 - - #if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) - //Only done for non-SAMD/SAM architectures - _virtualPort->flush() ; - #endif -} - //*********************************************************************************************// //**********************************Compound 4D Routines***************************************// //*********************************************************************************************// @@ -2016,12 +1990,120 @@ word Diablo_Serial_4DLib::file_FindNextRet(char * StringIn) return GetAckResStr(StringIn) ; } -void Diablo_Serial_4DLib::setbaudWait(word Newrate) +unsigned long Diablo_Serial_4DLib::GetBaudRate(word Newrate) { + unsigned long br ; + switch(Newrate) + { + case BAUD_110: + br = 110l ; + break ; + case BAUD_300: + br = 300l ; + break ; + case BAUD_600: + br = 600l ; + break ; + case BAUD_1200: + br = 1200l ; + break ; + case BAUD_2400: + br = 2400l ; + break ; + case BAUD_4800: + br = 4800l ; + break ; + case BAUD_9600: + br = 9600l ; + break ; + case BAUD_14400: + br = 14400l ; + break ; + case BAUD_19200: + br = 19200l ; + break ; + case BAUD_31250: + br = 31250l ; + break ; + case BAUD_38400: + br = 38400l ; + break ; + case BAUD_56000: + br = 56000l ; + break ; + case BAUD_57600: + br = 57600l ; + break ; + case BAUD_115200: + br = 115200l ; + break ; + case BAUD_128000: + br = 133928l ; // actual rate is not 128000 ; + break ; + case BAUD_256000: + br = 281250l ; // actual rate is not 256000 ; + break ; + case BAUD_300000: + br = 312500l ; // actual rate is not 300000 ; + break ; + case BAUD_375000: + br = 401785l ; // actual rate is not 375000 ; + break ; + case BAUD_500000: + br = 562500l ; // actual rate is not 500000 ; + break ; + case BAUD_600000: + br = 703125l ; // actual rate is not 600000 ; + break ; + default: + br = 0; + break; + } + return br; +} + +bool Diablo_Serial_4DLib::setbaudWait(word Newrate) +{ + if (unknownSerial && (setBaudRateExternal == NULL)) return false; + unsigned long baudrate = GetBaudRate(Newrate); + if (baudrate == 0) return false; _virtualPort->print((char)(F_setbaudWait >> 8)); _virtualPort->print((char)(F_setbaudWait)); _virtualPort->print((char)(Newrate >> 8)); _virtualPort->print((char)(Newrate)); - SetThisBaudrate(Newrate); // change this systems baud rate to match new display rate, ACK is 100ms away + (this->*setBaudRateInternal)(baudrate); // change this systems baud rate to match new display rate, ACK is 100ms away GetAck() ; + return true; +} + +void Diablo_Serial_4DLib::exSetBaudRateHndl(unsigned long newRate) { + setBaudRateExternal(newRate); +} + +void Diablo_Serial_4DLib::hwSetBaudRateHndl(unsigned long newRate) { + ((HardwareSerial *)_virtualPort)->flush(); + ((HardwareSerial *)_virtualPort)->end(); + ((HardwareSerial *)_virtualPort)->begin(newRate); + delay(50) ; // Display sleeps for 100 + ((HardwareSerial *)_virtualPort)->flush(); +} + +#ifdef SoftwareSerial_h +void Diablo_Serial_4DLib::swSetBaudRateHndl(unsigned long newRate) { + ((SoftwareSerial *)_virtualPort)->flush(); + ((SoftwareSerial *)_virtualPort)->end(); + ((SoftwareSerial *)_virtualPort)->begin(newRate); + delay(50) ; // Display sleeps for 100 + ((SoftwareSerial *)_virtualPort)->flush(); +} +#endif + +#ifdef AltSoftSerial_h +void Diablo_Serial_4DLib::alSetBaudRateHndl(unsigned long newRate) { + ((AltSoftSerial *)_virtualPort)->flush(); + ((AltSoftSerial *)_virtualPort)->end(); + ((AltSoftSerial *)_virtualPort)->begin(newRate); + delay(50) ; // Display sleeps for 100 + ((AltSoftSerial *)_virtualPort)->flush(); } +#endif diff --git a/src/Diablo_Serial_4DLib.h b/src/Diablo_Serial_4DLib.h index dd1b451..6245195 100644 --- a/src/Diablo_Serial_4DLib.h +++ b/src/Diablo_Serial_4DLib.h @@ -16,12 +16,24 @@ #include +#ifdef AVR +#include // uncomment this line to add direct support for SoftwareSerial +// #include // uncomment this line to add direct support for AltSoftSerial (Note: AltSoftSerial needs to be installed in Arduino IDE) +#endif + typedef void (*Tcallback4D)(int, unsigned char); class Diablo_Serial_4DLib { public: - Diablo_Serial_4DLib(Stream * virtualPort); + Diablo_Serial_4DLib(Stream * virtualPort, void (*setBaudRateHndl)(unsigned long) = NULL); + Diablo_Serial_4DLib(HardwareSerial * serial); +#ifdef SoftwareSerial_h + Diablo_Serial_4DLib(SoftwareSerial * serial); +#endif +#ifdef AltSoftSerial_h + Diablo_Serial_4DLib(AltSoftSerial * serial); +#endif Tcallback4D Callback4D ; //Compound 4D Routines @@ -193,7 +205,7 @@ class Diablo_Serial_4DLib void blitComtoDisplay(word X, word Y, word Width, word Height, t4DByteArray Pixels); word file_FindFirstRet(char * Filename, char * StringIn); word file_FindNextRet(char * StringIn); - void setbaudWait(word Newrate); + bool setbaudWait(word Newrate); void GetAck(void); //4D Global Variables Used @@ -206,7 +218,20 @@ class Diablo_Serial_4DLib // or indeterminate (eg file_exec, file_run, file_callFunction) commands private: - Stream * _virtualPort; + bool unknownSerial = false; + Stream * _virtualPort; + unsigned long GetBaudRate(word Newrate); + void (*setBaudRateExternal)(unsigned long newRate); + void (Diablo_Serial_4DLib::*setBaudRateInternal)(unsigned long newRate); + + void exSetBaudRateHndl(unsigned long newRate); + void hwSetBaudRateHndl(unsigned long newRate); +#ifdef SoftwareSerial_h + void swSetBaudRateHndl(unsigned long newRate); +#endif +#ifdef AltSoftSerial_h + void alSetBaudRateHndl(unsigned long newRate); +#endif //Intrinsic 4D Routines void WriteChars(char * charsout); @@ -221,10 +246,10 @@ class Diablo_Serial_4DLib word GetAckResSector(t4DSector Sector); word GetAckResStr(char * OutStr); word GetAckResData(t4DByteArray OutData, word size); - void SetThisBaudrate(int Newrate); void printNumber(unsigned long, uint8_t); void printFloat(double number, uint8_t digits); + }; #endif From 654ba7b0ff2387b6503459d53a4c0e27399f4435 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Tue, 30 Aug 2022 14:34:38 +0800 Subject: [PATCH 5/9] Applied fixed setbaudWait function --- examples/BigDemo/BigDemo.ino | 105 ++++++----------------------------- 1 file changed, 18 insertions(+), 87 deletions(-) diff --git a/examples/BigDemo/BigDemo.ino b/examples/BigDemo/BigDemo.ino index e30427a..3db77bb 100644 --- a/examples/BigDemo/BigDemo.ino +++ b/examples/BigDemo/BigDemo.ino @@ -18,7 +18,7 @@ /* */ /* Define the serial port to use here, if using software serial set it to */ /* something like SerialS. */ - #define DisplaySerial Serial +#define DisplaySerial Serial /* */ /* To use SoftwareSerial uncomment the following and set the pins you are */ /* using correctly */ @@ -34,18 +34,14 @@ /* occurs. If you want to do your own handling set Callback4D to NULL */ /* otherwise set it to the address of the error routine */ /* */ -/* Baud rate change Because the stream class used within the library does not support */ -/* .end, or .begin the setbaudWait and SetThisBaudrate functions are */ -/* coded within this demo */ -/* */ /* Sketch Size! If you are logging messages, then you may exceed the maximum sketch */ /* size for some of the smaller boards, you can comment out TEST_USD to */ /* exclude tests that require a uSD card to run and/or TEST_OTHER to */ /* exclude tests that do not require a uSD card to run. */ +/* */ #define TEST_USD #define TEST_OTHER /* */ -/* */ /* The following files are needed on the uSD to complete all tests. Their */ /* relative location (from C:\Users\Public\Documents\4D Labs) is shown */ /* gfx2demo.gci resources\GC Files */ @@ -67,8 +63,20 @@ #include "BigDemo.h" #include "Diablo_Const4D.h" +// Use this if using HardwareSerial or SoftwareSerial Diablo_Serial_4DLib Display(&DisplaySerial); +// Use this block if using a different Serial class +// +// void customSetBaudRate(unsigned long newRate) { +// DisplaySerial.flush(); +// DisplaySerial.end(); +// DisplaySerial.begin(newRate); +// delay(50) ; // Display sleeps for 100 +// DisplaySerial.flush(); +// } +// Diablo_Serial_4DLib Display(&DisplaySerial, customSetBaudRate); + const char *atoz = {"abcdefghijklmnopqrstuvwxyz"} ; // globals for this sketch @@ -843,69 +851,6 @@ void mycallback(int ErrCode, unsigned char Errorbyte) #endif } -void SetThisBaudrate(int Newrate) -{ - int br ; - DisplaySerial.flush() ; - DisplaySerial.end() ; - switch(Newrate) - { - case BAUD_110 : br = 110 ; - break ; - case BAUD_300 : br = 300 ; - break ; - case BAUD_600 : br = 600 ; - break ; - case BAUD_1200 : br = 1200 ; - break ; - case BAUD_2400 : br = 2400 ; - break ; - case BAUD_4800 : br = 4800 ; - break ; - case BAUD_9600 : br = 9600 ; - break ; - case BAUD_14400 : br = 14400 ; - break ; - case BAUD_19200 : br = 19200 ; - break ; - case BAUD_31250 : br = 31250 ; - break ; - case BAUD_38400 : br = 38400 ; - break ; - case BAUD_56000 : br = 56000 ; - break ; - case BAUD_57600 : br = 57600 ; - break ; - case BAUD_115200 : br = 115200 ; - break ; - case BAUD_128000 : br = 133928 ; // actual rate is not 128000 ; - break ; - case BAUD_256000 : br = 281250 ; // actual rate is not 256000 ; - break ; - case BAUD_300000 : br = 312500 ; // actual rate is not 300000 ; - break ; - case BAUD_375000 : br = 401785 ; // actual rate is not 375000 ; - break ; - case BAUD_500000 : br = 562500 ; // actual rate is not 500000 ; - break ; - case BAUD_600000 : br = 703125 ; // actual rate is not 600000 ; - break ; - } - DisplaySerial.begin(br) ; - delay(50) ; // Display sleeps for 100 - DisplaySerial.flush() ; -} - -void setbaudWait(word Newrate) -{ - DisplaySerial.print((char)(F_setbaudWait >> 8)); - DisplaySerial.print((char)(F_setbaudWait)); - DisplaySerial.print((char)(Newrate >> 8)); - DisplaySerial.print((char)(Newrate)); - SetThisBaudrate(Newrate); // change this systems baud rate to match new display rate, ACK is 100ms away - Display.GetAck() ; -} - #define RESETLINE 4 void setup() @@ -1078,24 +1023,10 @@ void loop() delay(5000) ; } - setbaudWait(BAUD_19200) ; - Display.putstr("Hello at 19200\n") ; - setbaudWait(BAUD_9600) ; - Display.putstr("Back to 9600\n") ; + Display.setbaudWait(BAUD_19200); + Display.putstr("Hello at 19200\n"); + Display.setbaudWait(BAUD_9600); + Display.putstr("Back to 9600\n"); delay(5000) ; #endif } - - - - - - - - - - - - - - From fe1a347eb6ddccc053bfd9f1b7a6c2c6974cbf27 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Tue, 30 Aug 2022 14:35:47 +0800 Subject: [PATCH 6/9] Increased library version to 1.0.4 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 7f4d25d..f169430 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Diablo16-Serial-Arduino-Library -version=1.0.3 +version=1.0.4 author=4D Systems maintainer=4D Systems sentence=Provides library access to communicate with the 4D Systems Diablo16 processor, when configured in Serial/SPE mode From f0c098ce859fafddf300cefef1a960be09424d34 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Wed, 31 Aug 2022 14:45:38 +0800 Subject: [PATCH 7/9] Removed flush calls in constructors --- src/Diablo_Serial_4DLib.cpp | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/src/Diablo_Serial_4DLib.cpp b/src/Diablo_Serial_4DLib.cpp index f9e5102..c04e240 100644 --- a/src/Diablo_Serial_4DLib.cpp +++ b/src/Diablo_Serial_4DLib.cpp @@ -11,44 +11,28 @@ #endif Diablo_Serial_4DLib::Diablo_Serial_4DLib(Stream * virtualPort, void (*setBaudRateHndl)(unsigned long)) { - _virtualPort = virtualPort; - setBaudRateExternal = setBaudRateHndl; - setBaudRateInternal = &Diablo_Serial_4DLib::exSetBaudRateHndl; - unknownSerial = true; -#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) - //Only done for non-SAMD/SAM architectures - _virtualPort->flush(); -#endif + _virtualPort = virtualPort; + setBaudRateExternal = setBaudRateHndl; + setBaudRateInternal = &Diablo_Serial_4DLib::exSetBaudRateHndl; + unknownSerial = true; } Diablo_Serial_4DLib::Diablo_Serial_4DLib(HardwareSerial * serial) { - _virtualPort = (Stream *)serial; - setBaudRateInternal = &Diablo_Serial_4DLib::hwSetBaudRateHndl; -#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) - //Only done for non-SAMD/SAM architectures - _virtualPort->flush(); -#endif + _virtualPort = (Stream *)serial; + setBaudRateInternal = &Diablo_Serial_4DLib::hwSetBaudRateHndl; } #ifdef SoftwareSerial_h Diablo_Serial_4DLib::Diablo_Serial_4DLib(SoftwareSerial * serial) { - _virtualPort = (Stream *)serial; - setBaudRateInternal = &Diablo_Serial_4DLib::swSetBaudRateHndl; -#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) - //Only done for non-SAMD/SAM architectures - _virtualPort->flush(); -#endif + _virtualPort = (Stream *)serial; + setBaudRateInternal = &Diablo_Serial_4DLib::swSetBaudRateHndl; } #endif #ifdef AltSoftSerial_h Diablo_Serial_4DLib::Diablo_Serial_4DLib(AltSoftSerial * serial) { - _virtualPort = (Stream *)serial; - setBaudRateInternal = &Diablo_Serial_4DLib::alSetBaudRateHndl; -#if !defined(ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_SAM) - //Only done for non-SAMD/SAM architectures - _virtualPort->flush(); -#endif + _virtualPort = (Stream *)serial; + setBaudRateInternal = &Diablo_Serial_4DLib::alSetBaudRateHndl; } #endif From 65b48aada2e09789161ba6fa3e2357aaea70bd86 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Thu, 20 Apr 2023 17:14:58 +0800 Subject: [PATCH 8/9] Copied supporting H and CPP files from Workshop4 --- library.properties | 2 +- src/Diablo_ColourRoutines.cpp | 126 +++++++++++++++++++++++++ src/Diablo_ColourRoutines.h | 28 ++++++ src/Diablo_KBRoutines.cpp | 131 ++++++++++++++++++++++++++ src/Diablo_KBRoutines.h | 30 ++++++ src/Diablo_LedDigitsDisplay.cpp | 35 +++++++ src/Diablo_LedDigitsDisplay.h | 8 ++ src/Diablo_LedDigitsDisplaySigned.cpp | 48 ++++++++++ src/Diablo_LedDigitsDisplaySigned.h | 9 ++ src/Diablo_PrintDisk.cpp | 39 ++++++++ src/Diablo_PrintDisk.h | 5 + src/Diablo_XYposToDegree.cpp | 71 ++++++++++++++ src/Diablo_XYposToDegree.h | 1 + 13 files changed, 532 insertions(+), 1 deletion(-) create mode 100644 src/Diablo_ColourRoutines.cpp create mode 100644 src/Diablo_ColourRoutines.h create mode 100644 src/Diablo_KBRoutines.cpp create mode 100644 src/Diablo_KBRoutines.h create mode 100644 src/Diablo_LedDigitsDisplay.cpp create mode 100644 src/Diablo_LedDigitsDisplay.h create mode 100644 src/Diablo_LedDigitsDisplaySigned.cpp create mode 100644 src/Diablo_LedDigitsDisplaySigned.h create mode 100644 src/Diablo_PrintDisk.cpp create mode 100644 src/Diablo_PrintDisk.h create mode 100644 src/Diablo_XYposToDegree.cpp create mode 100644 src/Diablo_XYposToDegree.h diff --git a/library.properties b/library.properties index f169430..af74098 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Diablo16-Serial-Arduino-Library -version=1.0.4 +version=1.0.5 author=4D Systems maintainer=4D Systems sentence=Provides library access to communicate with the 4D Systems Diablo16 processor, when configured in Serial/SPE mode diff --git a/src/Diablo_ColourRoutines.cpp b/src/Diablo_ColourRoutines.cpp new file mode 100644 index 0000000..dca3249 --- /dev/null +++ b/src/Diablo_ColourRoutines.cpp @@ -0,0 +1,126 @@ +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +//#include "Picaso_Serial_4DLib.h" +//#include "Picaso_Const4D.h" + +#define HLSMAX 127 // HLS vary over 0-HLSMAX +#define HLSMAXm2d3 (HLSMAX* 2 / 3 ) +#define HLSMAXd12 (HLSMAX / 12 ) +#define HLSMAXd6 (HLSMAX / 6 ) +#define HLSMAXd2 (HLSMAX / 2 ) +#define HLSMAXd3 (HLSMAX / 3 ) +#define RGBMAX 127 // R,G, and B vary over 0-RGBMAX +#define RGBMAXm2 (RGBMAX*2) +// HLSMAX BEST IF DIVISIBLE BY 6 +// RGBMAX, HLSMAX must each fit in a byte. + +// Hue is undefined if Saturation is 0 (grey-scale) * +// This value determines where the Hue scrollbar is +// initially set for achromatic colors +#define UNDEFINED (127 * 2 / 3 ) + +// color conversion routines seem to be based on http://support.microsoft.com/kb/29240 +// My copy seem to have been around since the MSDOS days, I don't know if it came from another source + +uint16_t RGBs2COL(int16_t r, int16_t g, int16_t b) +{ + return (b >> 2) | (g & 0x7E) << 4 | (r & 0x7c) << 9 ; +} + +void c565toRGBs(int16_t i565, int16_t * red, int16_t * green, int16_t * blue) +{ + *red = (i565 & 0xF800) >> 9 ; + *green = (i565 & 0x07E0) >> 4 ; + *blue = (i565 & 0x001F) << 2 ; +} + +void RGB2HLS(int16_t red, int16_t green, int16_t blue, int16_t * h, int16_t * l, int16_t * s) +{ + int16_t cMax, cMin, Rdelta, Gdelta, Bdelta, cMpM, cMmM ; + // calculate lightness + cMax = max( max(red,green), blue); + cMin = min( min(red,green), blue); + cMpM = cMax+cMin ; + cMmM = cMax-cMin ; + + *l = ( (cMpM*HLSMAX) + RGBMAX ) / RGBMAXm2; + + if (cMax == cMin) // r=g=b --> achromatic case + { + *s = 0; + *h = UNDEFINED; + } + else // chromatic case + { + // saturation + if (*l <= (HLSMAX/2)) + *s = ( (cMmM*HLSMAX) + (cMpM / 2) ) / cMpM ; + else + *s = ( (cMmM*HLSMAX) + ((RGBMAXm2-cMpM) / 2) ) / (RGBMAXm2-cMpM); + + // hue + Rdelta = ( ((cMax-red)* HLSMAXd6) + (cMmM / 2) ) / cMmM; + Gdelta = ( ((cMax-green)* HLSMAXd6) + (cMmM / 2) ) / cMmM; + Bdelta = ( ((cMax-blue)* HLSMAXd6) + (cMmM / 2) ) / cMmM; + + if (red == cMax) + *h = Bdelta - Gdelta ; + else if (green == cMax) + *h = HLSMAXd3 + Rdelta - Bdelta ; + else + *h = HLSMAXm2d3 + Gdelta - Rdelta; + + if (*h < 0) *h += HLSMAX; + if (*h > HLSMAX) *h -= HLSMAX; + } +} + +int16_t hue_RGB(int16_t Hin, int16_t M1, int16_t M2) +{ + int16_t Value ; + if (Hin < 0) + Hin += HLSMAX ; + else if (Hin > HLSMAX) + Hin -= HLSMAX ; + + if (Hin < HLSMAXd6) + Value = M1 + ( (M2 - M1) * Hin + HLSMAXd12 ) / HLSMAXd6 ; + else if (Hin < HLSMAXd2 ) + Value = M2 ; + else if (Hin < HLSMAXm2d3) + Value = M1 + ( (M2 - M1) * (HLSMAXm2d3 - Hin) + HLSMAXd12) / HLSMAXd6 ; + else + Value = M1 ; + return Value ; +} + +void HLS2RGB(int16_t H, int16_t L, int16_t S, int16_t * red, int16_t * green, int16_t * blue) +{ + int16_t M1, M2 ; + + if (S == 0) + { + *red = L ; + *green = L ; + *blue = L ; + } + else + { + if (L <= HLSMAXd2) + M2 = (L * (HLSMAX + S) + HLSMAXd2) / HLSMAX ; + else + M2 = L + S - ((L * S + HLSMAXd2) / HLSMAX) ; + + M1 = 2 * L - M2 ; + // Determine levels of primary colours. + if ((H > HLSMAX ) || (H < 0)) H = 0 ; + *red = hue_RGB( H+HLSMAXd3, M1, M2 ) ; + *green = hue_RGB( H, M1, M2 ) ; + *blue = hue_RGB( H-HLSMAXd3, M1, M2 ) ; + } + + } diff --git a/src/Diablo_ColourRoutines.h b/src/Diablo_ColourRoutines.h new file mode 100644 index 0000000..6fe3aa7 --- /dev/null +++ b/src/Diablo_ColourRoutines.h @@ -0,0 +1,28 @@ +// color conversion routines seem to be based on http://support.microsoft.com/kb/29240 +// My copy seem to have been around since the MSDOS days, I don't know if it came from another source +#define HLSMAX 127 // HLS vary over 0-HLSMAX +#define HLSMAXm2d3 HLSMAX* 2 / 3 +#define HLSMAXd12 HLSMAX / 12 +#define HLSMAXd6 HLSMAX / 6 +#define HLSMAXd2 HLSMAX / 2 +#define HLSMAXd3 HLSMAX / 3 +#define RGBMAX 127 // R,G, and B vary over 0-RGBMAX +#define RGBMAXm2 RGBMAX*2 +// HLSMAX BEST IF DIVISIBLE BY 6 +// RGBMAX, HLSMAX must each fit in a byte. + +// Hue is undefined if Saturation is 0 (grey-scale) * +// This value determines where the Hue scrollbar is +// initially set for achromatic colors +#define UNDEFINED 127 * 2 / 3 + +uint16_t RGBs2COL(int16_t r, int16_t g, int16_t b) ; + +void c565toRGBs(int16_t i565, int16_t * red, int16_t * green, int16_t * blue); + +void RGB2HLS(int16_t red, int16_t green, int16_t blue, int16_t * h, int16_t * l, int16_t * s) ; + +uint16_t hue_RGB(int16_t Hin, int16_t M1, int16_t M2) ; + +void HLS2RGB(int16_t H, int16_t L, int16_t S, int16_t * r, int16_t * g, int16_t * b); + diff --git a/src/Diablo_KBRoutines.cpp b/src/Diablo_KBRoutines.cpp new file mode 100644 index 0000000..53265ac --- /dev/null +++ b/src/Diablo_KBRoutines.cpp @@ -0,0 +1,131 @@ +#include "Diablo_Serial_4DLib.h" +#include "Diablo_Const4D.h" + +#include "Diablo_KBRoutines.h" + +#define KbShiftBit 01 +#define KbCapsBit 02 +#define KbShiftCapsBits 03 +#define KbCtrlBit 04 + +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +void refreshstate(Diablo_Serial_4DLib Display, word hndl, int8_t iKB, int8_t * oKB) +{ + int8_t shifted ; + shifted = oKB[KbState] & KbShiftCapsBits ; + if (!shifted || (shifted == KbShiftCapsBits)) + { + shifted = 0 ; + oKB[KbCaps] = 0 ; + } + else + { + shifted = 1 ; + oKB[KbCaps] = 2 ; + } + setkeystate(Display, hndl, iKB, shifted) ; + if (oKB[KbState] & KbCapsBit) + setkeystate(Display, hndl, iKB + oKB[KbLock],1) ; + if ((oKB[KbState] & KbShiftBit) && (shifted)) + { + setkeystate(Display, hndl, iKB + oKB[KbShift1],1) ; + setkeystate(Display, hndl, iKB + oKB[KbShift2],1) ; + } + if (oKB[KbState] & KbCtrlBit) + { + setkeystate(Display, hndl, iKB +oKB[KbCtrl1],1) ; + setkeystate(Display, hndl, iKB + oKB[KbCtrl2],1) ; + } +} + + +void kbDown(Diablo_Serial_4DLib Display, word hndl, int8_t iKB, int8_t * oKB, uint8_t * KBKeys, int8_t key, Callback handler) +{ + int8_t keyval ; + oKB[KbMvt] = 1 ; + oKB[KbIgn] = 0 ; + if ((key == oKB[KbShift1]) || (key == oKB[KbShift2])) + { + if (oKB[KbState] & KbShiftBit) + { + oKB[KbState] &= ~KbShiftBit ; + oKB[KbMvt] = 0 ; + } + else + oKB[KbState] |= KbShiftBit ; + refreshstate(Display, hndl, iKB, oKB) ; + oKB[KbIgn] = 1 ; + } + else if ((key == oKB[KbCtrl1]) || (key == oKB[KbCtrl2])) + { + if (oKB[KbState] & KbCtrlBit) + { + oKB[KbState] &= ~KbCtrlBit ; + oKB[KbMvt] = 0 ; + } + else + oKB[KbState] |= KbCtrlBit ; + setkeystate(Display, hndl, iKB + oKB[KbCtrl1],oKB[KbMvt]) ; + key = oKB[KbCtrl2] ; + oKB[KbIgn] = 1 ; + } + else if (key == oKB[KbLock]) + { + if (oKB[KbState] & KbCapsBit) + { + oKB[KbState] &= ~KbCapsBit ; + oKB[KbMvt] = 0 ; + } + else + oKB[KbState] |= KbCapsBit ; + refreshstate(Display, hndl, iKB, oKB) ; + oKB[KbIgn] = 1 ; + } + + if (!oKB[KbIgn]) + { + if (oKB[KbShiftCaps]) + keyval = (oKB[KbState] & KbShiftCapsBits) * oKB[KbButtons] - 1 ; + else if (((oKB[KbState] & KbShiftCapsBits) == 0) || ((oKB[KbState] & KbShiftCapsBits) == KbShiftCapsBits)) + keyval = - 1 ; + else + keyval = oKB[KbButtons] - 1 ; + keyval = KBKeys[key+keyval] ; + if (oKB[KbState] & KbCtrlBit) keyval &= 0x9F ; + handler(keyval & 0xFF) ; + setkeystate(Display, hndl, iKB + key,oKB[KbMvt]+oKB[KbCaps]) ; + } + oKB[KbDown] = key ; +} + +void setkeystate(Diablo_Serial_4DLib Display, word hndl, int8_t key, int8_t idx) +{ + Display.img_SetWord(hndl, key,IMAGE_INDEX, idx); + Display.img_Show(hndl,key) ; +} + +void kbUp(Diablo_Serial_4DLib Display, word hndl, int8_t iKB, int8_t * oKB) +{ + if (!oKB[KbIgn]) + { + setkeystate(Display, hndl, iKB + oKB[KbDown], oKB[KbCaps]) ; + if (oKB[KbState] & KbShiftBit) + { + oKB[KbState] &= ~KbShiftBit ; + refreshstate(Display, hndl, iKB, oKB) ; + } + if (oKB[KbState] & KbCtrlBit) + { + oKB[KbState] &= ~KbCtrlBit ; + setkeystate(Display, hndl, iKB + oKB[KbCtrl1],0) ; + setkeystate(Display, hndl, iKB + oKB[KbCtrl2],0) ; + } + oKB[KbDown] = -1 ; + } +} + diff --git a/src/Diablo_KBRoutines.h b/src/Diablo_KBRoutines.h new file mode 100644 index 0000000..1d2aa75 --- /dev/null +++ b/src/Diablo_KBRoutines.h @@ -0,0 +1,30 @@ +#if defined(ARDUINO) && ARDUINO >= 100 + #include "Arduino.h" +#else + #include "WProgram.h" +#endif + +#define KbDown 0 +#define KbMvt 1 +#define KbState 2 +#define KbIgn 3 +#define KbCaps 4 +#define KbShift1 5 +#define KbShift2 6 +#define KbCtrl1 7 +#define KbCtrl2 8 +#define KbLock 9 +#define KbButtons 10 +#define KbShiftCaps 11 + +typedef void (*Callback) (int); + +void refreshstate(Diablo_Serial_4DLib Display, word hndl, int8_t iKB, int8_t * oKB) ; + +void kbDown(Diablo_Serial_4DLib Display, word hndl, int8_t iKB, int8_t * oKB, uint8_t * KBKeys, int8_t key, Callback handler) ; + +void kbUp(Diablo_Serial_4DLib Display, word hndl, int8_t iKB, int8_t * oKB) ; + +void setkeystate(Diablo_Serial_4DLib Display, word hndl, int8_t key, int8_t idx) ; + + diff --git a/src/Diablo_LedDigitsDisplay.cpp b/src/Diablo_LedDigitsDisplay.cpp new file mode 100644 index 0000000..dd9385d --- /dev/null +++ b/src/Diablo_LedDigitsDisplay.cpp @@ -0,0 +1,35 @@ +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +#include "Diablo_Serial_4DLib.h" +#include "Diablo_Const4D.h" + +// WARNING, this code will crash if newval exceeds maximum displayable number +void LedDigitsDisplay(Diablo_Serial_4DLib Display, word hndl, word newval, word index, word left, word Digits, word MinDigits, word WidthDigit, word LeadingBlanks) +{ + word i, k, l, lb ; + l = 1 ; + for (i = 1; i < Digits; i++) + l *= 10 ; + lb = LeadingBlanks ; + for (i = 0; i < Digits; i++) + { + k = newval / l ; + newval -= k * l ; + if ( lb && (i < Digits - MinDigits) ) + { + if (k == 0) + k = 10 ; + else + lb = 0 ; + } + l /= 10 ; + Display.img_SetWord(hndl, index, IMAGE_INDEX, k); + Display.img_SetWord(hndl, index, IMAGE_XPOS, left+i*WidthDigit) ; + Display.img_Show(hndl, index); + } +} + diff --git a/src/Diablo_LedDigitsDisplay.h b/src/Diablo_LedDigitsDisplay.h new file mode 100644 index 0000000..0ad3214 --- /dev/null +++ b/src/Diablo_LedDigitsDisplay.h @@ -0,0 +1,8 @@ +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +// WARNING, this code will crash if newval exceeds maximum displayable number +void LedDigitsDisplay(Diablo_Serial_4DLib Display, word hndl, word newval, word index, word left, word Digits, word MinDigits, word WidthDigit, word LeadingBlanks) ; diff --git a/src/Diablo_LedDigitsDisplaySigned.cpp b/src/Diablo_LedDigitsDisplaySigned.cpp new file mode 100644 index 0000000..3dcc6cc --- /dev/null +++ b/src/Diablo_LedDigitsDisplaySigned.cpp @@ -0,0 +1,48 @@ +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +#include "Diablo_Serial_4DLib.h" +#include "Diablo_Const4D.h" + +// Warning, ensure correct number of digits are specified, especially if -ve numbers are required as minus sign +// will overlay most significant digit if there are not enough digits. +void LedDigitsDisplaySigned(Diablo_Serial_4DLib Display, word hndl, int16_t newval, word index, word left, word Digits, word MinDigits, word WidthDigit, word LeadingBlanks) +{ + int16_t i, m, lstb, nv; + + left = left + WidthDigit * (Digits-1) ; + nv = newval ; + lstb = 1 ; + for (i = Digits; i > 0; i--) + { + m = nv % 10 ; + if ( LeadingBlanks && (i <= Digits - MinDigits) ) + { + if (nv == 0) + { + m = 10 ; + if (lstb == 1) + lstb = i ; + } + } + + + Display.img_SetWord(hndl, index, IMAGE_INDEX, abs(m)); + Display.img_SetWord(hndl, index, IMAGE_XPOS, left) ; + Display.img_Show(hndl, index); + nv /= 10 ; + + left -= WidthDigit ; + } + if (newval < 0) + { + left += lstb * WidthDigit ; + Display.img_SetWord(hndl, index, IMAGE_INDEX, 11); + Display.img_SetWord(hndl, index, IMAGE_XPOS, left) ; + Display.img_Show(hndl, index); + } + +} \ No newline at end of file diff --git a/src/Diablo_LedDigitsDisplaySigned.h b/src/Diablo_LedDigitsDisplaySigned.h new file mode 100644 index 0000000..1f98f74 --- /dev/null +++ b/src/Diablo_LedDigitsDisplaySigned.h @@ -0,0 +1,9 @@ +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +// Warning, ensure correct number of digits are specified, especially if -ve numbers are required as minus sign +// will overlay most significant digit if there are not enough digits. +void LedDigitsDisplaySigned(Diablo_Serial_4DLib Display, word hndl, int16_t newval, word index, word left, word Digits, word MinDigits, word WidthDigit, word LeadingBlanks) ; diff --git a/src/Diablo_PrintDisk.cpp b/src/Diablo_PrintDisk.cpp new file mode 100644 index 0000000..a4f93a7 --- /dev/null +++ b/src/Diablo_PrintDisk.cpp @@ -0,0 +1,39 @@ +#if (ARDUINO >= 100) + #include "Arduino.h" // for Arduino 1.0 +#else + #include "WProgram.h" // for Arduino 23 +#endif + +#include "Diablo_Serial_4DLib.h" +#include "Diablo_Const4D.h" + +void PrintDisk(Diablo_Serial_4DLib Display, word hndl, long offset, word msglen, word msgid) +{ + char ch ; + long res ; + res = (long)msglen * msgid ; + res += offset ; + Display.file_Seek(hndl, res >> 16, res & 0xffff); + do + { + ch = Display.file_GetC(hndl) ; + Display.putCH(ch) ; + } + while (ch != 0) ; +} + +void PrintDiskUnicode(Diablo_Serial_4DLib Display, word hndl, long offset, word msglen, word msgid) +{ + word ch ; + long res ; + res = (long)msglen * msgid ; + res += offset ; + Display.file_Seek(hndl, res >> 16, res & 0xffff); + do + { + ch = Display.file_GetW(hndl) ; + Display.putCH(ch) ; + } + while (ch != 0) ; +} + diff --git a/src/Diablo_PrintDisk.h b/src/Diablo_PrintDisk.h new file mode 100644 index 0000000..a694ba6 --- /dev/null +++ b/src/Diablo_PrintDisk.h @@ -0,0 +1,5 @@ + +void PrintDisk(Diablo_Serial_4DLib Display, word hndl, long offset, word msglen, word msgid); + +void PrintDiskUnicode(Diablo_Serial_4DLib Display, word hndl, long offset, word msglen, word msgid); + diff --git a/src/Diablo_XYposToDegree.cpp b/src/Diablo_XYposToDegree.cpp new file mode 100644 index 0000000..b2f4190 --- /dev/null +++ b/src/Diablo_XYposToDegree.cpp @@ -0,0 +1,71 @@ +#if defined(ARDUINO) && ARDUINO >= 100 + #include "Arduino.h" +#else + #include "WProgram.h" +#endif +// +// Routine to convert X/Y (Relative to 0,0) position into Degrees +// 0 Degrees is straight down to suit rotary objects +// + +const uint8_t arctan[] = {0, 1, 1, 2, 2, 3, 3, 4, 5, 5, + 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, + 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, + 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, + 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, + 27, 27, 27, 28, 28, 29, 29, 30, 30, 31, + 31, 31, 32, 32, 33, 33, 33, 34, 34, 35, + 35, 35, 36, 36, 37, 37, 37, 38, 38, 38, + 39, 39, 39, 40, 40, 40, 41, 41, 41, 42, + 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45} ; + +int16_t XYposToDegree(int16_t curX, int16_t curY) +{ + int16_t delta, deg, adj ; + if (curY < 0) + { + if (curX < 0) + { + adj = 1 ; + deg = 90 ; + } + else + { + adj = 2 ; + deg = 180 ; + } + } + else + { + if (curX < 0) + { + deg = 0 ; + adj = 2 ; + } + else + { + deg = 270 ; + adj = 1 ; + } + } + + curX = abs(curX) ; + curY = abs(curY) ; + if (curX < curY) + adj &= 1 ; + else + { + adj &= 2 ; + delta = curX ; + curX = curY ; + curY = delta ; + } + delta = arctan[(curX * 100) / curY] ; + if (adj) + deg += 90 - delta ; + else + deg += delta ; + + return deg ; +} + diff --git a/src/Diablo_XYposToDegree.h b/src/Diablo_XYposToDegree.h new file mode 100644 index 0000000..86753d8 --- /dev/null +++ b/src/Diablo_XYposToDegree.h @@ -0,0 +1 @@ +int16_t XYposToDegree(int16_t curX, int16_t curY) ; From 21a73bc57f98f4b14955074159253ec28a4cbfc2 Mon Sep 17 00:00:00 2001 From: Juniel Cruz Date: Thu, 20 Apr 2023 18:04:17 +0800 Subject: [PATCH 9/9] Updated installation instruction Also added image locally to fix broken image issue --- README.md | 13 ++++++++----- logo.jpg | Bin 0 -> 23317 bytes 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 logo.jpg diff --git a/README.md b/README.md index 03a63b2..9ce55a6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![image](http://www.4dsystems.com.au/downloads/4DLogo.png) +![4D Logo](./logo.jpg) Diablo16-Serial-Arduino-Library ============================= @@ -7,15 +7,18 @@ Arduino Library for 4D Systems Serial Environment for Diablo16 based modules ## Information -This library is provided with the installation of Workshop 4 from 4D Systems, however can be downloaded here for people who do not run Windows. This library provides high level functions for the Arduino, to ease communication with Diablo16 based modules when using the module configured for Serial. -Please refer to the 4D Systems website, namingly the Workshop 4 Product Page, for documentation regarding Workshop 4, and its environments. +Please refer to the 4D Systems website, namingly the Workshop4 Product Page, for documentation regarding Workshop4, and its environments. ## Installation -Library should be placed in the C:\Users\(User name)\My Documents\Arduino\Libraries\ folder, or equivalent. (restart the IDE if already open) +It is advisable to simply use the Arduino IDE's library manager to search and install Picaso Serial Arduino Library. + +For more information on the installation, please refer to the following documentation from Arduino: + +- Arduino 1.x: [Installing Libraries](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries) +- Arduino 2.x: [Installing Libraries](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library) -For more information on the installation, please refer to [Installing Additional Arduino Libraries] (http://arduino.cc/en/Guide/Libraries) ## Example Sketch diff --git a/logo.jpg b/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3e658319de20fa039ee4af7b49e409b106eab40f GIT binary patch literal 23317 zcmd431z41A+b;SHgA64l-NMiv3J3@WEh!)=QqtWaGXf&rAxH{Hi?o6?lF|**-3>zx z>+ya6_uJoE>p0flYajdn*B%9AhMBpa>%Ok@I?waI@Mhv>9w1VbRgeWB7!cqU_y@Q_ z10>I69zE4mRekoH(Or>9sAb;I}|F}UgpqRI?VAwdgcn|>k_haDazaRa#2Z;a- z2o#Ee3B7d-6BB%yH{fFcCh;wjy8@4}?x-8Xn4Cxj-^OHNGe0hCCes+)hYOiF`{Uq} zQ&3V-v#_$Ub8rgZyDuUt_Tb4=8Cf}b1;yu@TG}skboETl%wJnrT3Nfey19FJdU*!~ zz6*LE91Yo}tb!h`}XeU}8csVSknk!SDb-pv0KB?h0U$JW_`lJKbRt ze2Y!`I3}yC8HZU&W1q~#c@UQzF1)~U@Mq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