Skip to content
Permalink
Browse files

initial commit

  • Loading branch information...
fab4u
fab4u committed Jul 12, 2019
1 parent 24a3366 commit 678d4c20ab4583bb641fc26cf391fc7f117839dd
Showing with 7,420 additions and 0 deletions.
  1. +54 −0 HL_Hello_World/HL_Hello_World.ino
  2. +47 −0 HL_Hello_World/license.md
  3. +80 −0 HL_Hello_World2/HL_Hello_World2.ino
  4. +97 −0 Hacklace_Games/HL_AppRegistry.h
  5. +438 −0 Hacklace_Games/HL_FourWinsApp.h
  6. +258 −0 Hacklace_Games/HL_FroggerApp.h
  7. +223 −0 Hacklace_Games/HL_JumpApp.h
  8. +263 −0 Hacklace_Games/HL_SnakeApp.h
  9. +337 −0 Hacklace_Games/HL_TicTacToeApp.h
  10. +56 −0 Hacklace_Games/Hacklace_Games.ino
  11. +9 −0 Hacklace_Games/Hacklace_Games_Config.txt
  12. +12 −0 Hacklace_Games/Hacklace_Games_Config_without_TicTacToe.txt
  13. +11 −0 Hacklace_Games/ReadMe.txt
  14. +94 −0 Hacklace_Main/HL_AppRegistry.h
  15. +148 −0 Hacklace_Main/HL_ExampleApp.h
  16. +54 −0 Hacklace_Main/Hacklace_DefaultConfig.txt
  17. +57 −0 Hacklace_Main/Hacklace_Main.ino
  18. +47 −0 Hacklace_Main/license.md
  19. +24 −0 ReadMe.md
  20. BIN documentation/Hacklace2_Assembly.pdf
  21. BIN documentation/Hacklace2_Schematic.pdf
  22. BIN documentation/hacklace.pdf
  23. BIN documentation/hacklace_anwendungen.pdf
  24. BIN documentation/hacklace_applications_english.pdf
  25. BIN documentation/hacklace_english.pdf
  26. BIN documentation/hacklace_programmierung.pdf
  27. BIN documentation/hacklace_programming_english.pdf
  28. BIN documentation/hacklace_software.pdf
  29. BIN documentation/hacklace_software_english.pdf
  30. +1 −0 libraries/Hacklace/DecodeKeys.h
  31. +757 −0 libraries/Hacklace/Font.h
  32. +115 −0 libraries/Hacklace/HL_AnimationApp.h
  33. +156 −0 libraries/Hacklace/HL_BatteryMonitorApp.h
  34. +306 −0 libraries/Hacklace/HL_CodeLockApp.h
  35. +114 −0 libraries/Hacklace/HL_CounterApp.h
  36. +131 −0 libraries/Hacklace/HL_DisplayApp.h
  37. +138 −0 libraries/Hacklace/HL_DisplayTestApp.h
  38. +280 −0 libraries/Hacklace/HL_DownloadApp.h
  39. +119 −0 libraries/Hacklace/HL_FreqmeterApp.h
  40. +207 −0 libraries/Hacklace/HL_GameOfLifeApp.h
  41. +276 −0 libraries/Hacklace/HL_JukeboxApp.h
  42. +223 −0 libraries/Hacklace/HL_SpeedometerApp.h
  43. +129 −0 libraries/Hacklace/HL_SpiralApp.h
  44. +181 −0 libraries/Hacklace/HL_StopwatchApp.h
  45. +153 −0 libraries/Hacklace/HL_ThermometerApp.h
  46. +148 −0 libraries/Hacklace/HL_VoltmeterApp.h
  47. +791 −0 libraries/Hacklace/Hacklace.cpp
  48. +278 −0 libraries/Hacklace/Hacklace.h
  49. +52 −0 libraries/Hacklace/Hacklace_App.h
  50. +238 −0 libraries/Hacklace/Hacklace_AppEngine.cpp
  51. +110 −0 libraries/Hacklace/Hacklace_AppEngine.h
  52. +113 −0 libraries/Hacklace/keywords.txt
  53. +47 −0 libraries/Hacklace/license.md
  54. +1 −0 libraries/readme.txt
  55. +47 −0 license.md
@@ -0,0 +1,54 @@
/*
* HL_Hello_World.ino
*
*/

/**********************************************************************************
Description: A simple "Hello World" program for the Hacklace2
based on the Hacklace library.
Note: The Hacklace library uses Timer1.
Author: Frank Andre
Copyright 2015: Frank Andre
License: see "license.md"
Disclaimer: This software is provided by the copyright holder "as is" and any
express or implied warranties, including, but not limited to, the
implied warranties of merchantability and fitness for a particular
purpose are disclaimed. In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental,
special, exemplary, or consequential damages (including, but not
limited to, procurement of substitute goods or services; loss of
use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict
liability, or tort (including negligence or otherwise) arising
in any way out of the use of this software, even if advised of
the possibility of such damage.
**********************************************************************************/


#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include "Hacklace.h"

// global variables
Hacklace hacklace; // instantiate a Hacklace object


// the setup routine runs once when you press reset:
void setup() {
hacklace.initialize();
hacklace.clearDisplay();
hacklace.printString_P(PSTR(" Hello World "));
}


// the loop routine runs over and over again forever:
void loop() {
if (hacklace.sysTimerHasElapsed()) { // system timer elapses every 10 ms
hacklace.run(); // do the scrolling
}
hacklace.goToSleep(); // save battery power
}
@@ -0,0 +1,47 @@
HACKLACE SOFTWARE LICENSE
=========================

Copyright holder 2013 of the hacklace software is Frank Andre.


### License:
This software is distributed under a hardware-bound license as follows:

(1) This software, as a whole or in parts, as well as any work derived
from this software must only be executed on the original Hacklace2
printed circuit board with the fab4U logo on it.

(2) As long as (1) is not violated this software is licensed under the
following terms and conditions.

(a) You are allowed to copy and distribute the software.

(b) You are allowed to create and distribute derivative works.

(c) You are allowed to use this software or derivative works for
commercial purposes.

(d) If you distribute this software or any work derived from it you
must provide the name of the copyright holder of the original work.
In case of a derived work you also have to make clear that what you
distribute is a derived work.

(e) If you distribute this software you have to make sure that (1)
is never violated, e. g. by choosing approriate license provisions.


### Disclaimer:
This software is provided by the copyright holder "as is" and any
express or implied warranties, including, but not limited to, the
implied warranties of merchantability and fitness for a particular
purpose are disclaimed. In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental,
special, exemplary, or consequential damages (including, but not
limited to, procurement of substitute goods or services; loss of
use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict
liability, or tort (including negligence or otherwise) arising
in any way out of the use of this software, even if advised of
the possibility of such damage.


@@ -0,0 +1,80 @@
/*
* HL_Hello_World2.ino
*
*/

/**********************************************************************************
Description: A slightly more complex "Hello World" program for the Hacklace2
based on the Hacklace library.
Note: The Hacklace library uses Timer1.
Author: Frank Andre
Copyright 2015: Frank Andre
License: see "license.md"
Disclaimer: This software is provided by the copyright holder "as is" and any
express or implied warranties, including, but not limited to, the
implied warranties of merchantability and fitness for a particular
purpose are disclaimed. In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental,
special, exemplary, or consequential damages (including, but not
limited to, procurement of substitute goods or services; loss of
use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict
liability, or tort (including negligence or otherwise) arising
in any way out of the use of this software, even if advised of
the possibility of such damage.
**********************************************************************************/


#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include "Hacklace.h"

// global variables
Hacklace hacklace; // instantiate a Hacklace object
int toggle = 0;

// the setup routine runs once when you press reset:
void setup() {
hacklace.initialize();
hacklace.setScrollSpeed(8, 6); // scroll speed and duration of pause between two passes
hacklace.setScrollMode(FORWARD, 1); // direction = FORWARD, scroll by 1 column at a time
hacklace.clearDisplay();

// usage of special character codes
// here: degree character (= $B0)
hacklace.printString_P(PSTR(" temperature=27"));
hacklace.printChar(0xB0); // print a single degree character
hacklace.printChar(SPC1); // print a single column space
hacklace.printChar('C');
hacklace.printString_P(PSTR(" position=N12\xB0 34.567 ")); // \xB0 encodes the degree character
}


// the loop routine runs over and over again forever:
void loop() {
if (hacklace.sysTimerHasElapsed()) { // system timer elapses every 10 ms
hacklace.run(); // do the scrolling
}

if (hacklace.scrollSync()) { // wait until end of scrolling occurs
toggle ^= 1; // invert toggle
if (toggle == 1) {
hacklace.setScrollSpeed(8, 6);
hacklace.setScrollMode(FORWARD, 1); // direction = FORWARD, scroll by 1 column at a time
hacklace.clearDisplay();
hacklace.printString_P(PSTR(" an animation... "));
}
else {
hacklace.setScrollMode(FORWARD, 8); // direction = FORWARD, scroll by 8 columns (= 1 frame) at a time
hacklace.setScrollSpeed(5, 0);
hacklace.clearDisplay();
hacklace.printChar(128+15); // print animation 15 (dancer)
}
}

hacklace.goToSleep(); // save battery power
}
@@ -0,0 +1,97 @@
/*
* HL_AppRegistry.h
*
*/

/**********************************************************************************
Author: Frank Andre
Copyright 2013: Frank Andre
License: see "license.md"
Disclaimer: This software is provided by the copyright holder "as is" and any
express or implied warranties, including, but not limited to, the
implied warranties of merchantability and fitness for a particular
purpose are disclaimed. In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental,
special, exemplary, or consequential damages (including, but not
limited to, procurement of substitute goods or services; loss of
use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict
liability, or tort (including negligence or otherwise) arising
in any way out of the use of this software, even if advised of
the possibility of such damage.
**********************************************************************************/


#ifndef APP_REGISTRY_H_
#define APP_REGISTRY_H_

#include <avr/pgmspace.h>

#include "Hacklace_App.h"

// include Hacklace apps
#include "HL_AnimationApp.h"
#include "HL_SpiralApp.h"
#include "HL_CounterApp.h"
#include "HL_GameOfLifeApp.h"
//#include "HL_VoltmeterApp.h"
//#include "HL_BatteryMonitorApp.h"
//#include "HL_FreqmeterApp.h"
#include "HL_CodeLockApp.h"
//#include "HL_ThermometerApp.h"
//#include "HL_StopwatchApp.h"
//#include "HL_JukeboxApp.h"
//#include "HL_DisplayApp.h"
#include "HL_FourWinsApp.h"
#include "HL_SnakeApp.h"
#include "HL_JumpApp.h"
#include "HL_FroggerApp.h"
#include "HL_TicTacToeApp.h"
#include "HL_DownloadApp.h"
#include "HL_DisplayTestApp.h"

// make the app_registry globally available
extern const Hacklace_App* const app_registry[MAX_APPS];

// list of all apps
const Hacklace_App* const app_registry[MAX_APPS] PROGMEM = {
&AnimationApp, // app-ID 0
&SpiralApp, // app-ID 1
&CounterApp, // app-ID 2
&GameOfLifeApp, // app-ID 3
&AnimationApp, // app-ID 4
&AnimationApp, // app-ID 5
&AnimationApp, // app-ID 6
&AnimationApp, // app-ID 7
&AnimationApp, // app-ID 8
&AnimationApp, // app-ID 9
&AnimationApp, // app-ID 10
&AnimationApp, // app-ID 11
&AnimationApp, // app-ID 12
&FourWinsApp, // app-ID 13
&SnakeApp, // app-ID 14
&JumpApp, // app-ID 15
&FroggerApp, // app-ID 16
&TicTacToeApp, // app-ID 17
&AnimationApp, // app-ID 18
&AnimationApp, // app-ID 19
&CodeLockApp, // app-ID 20
&DisplayTestApp, // app-ID 21
&AnimationApp, // app-ID 22
&AnimationApp, // app-ID 23
&AnimationApp, // app-ID 24
&AnimationApp, // app-ID 25
&AnimationApp, // app-ID 26
&AnimationApp, // app-ID 27
&AnimationApp, // app-ID 28
&AnimationApp, // app-ID 29
&AnimationApp, // app-ID 30
// &DisplayApp // app-ID 31 ResetApp (using HL as serial display)
// &DisplayTestApp // app-ID 31 ResetApp (testing the dot-matrix display)
&DownloadApp // app-ID 31 ResetApp
// This app is called after a system reset (NULL -> no app is called)
};

#endif /* APP_REGISTRY_H_ */

0 comments on commit 678d4c2

Please sign in to comment.
You can’t perform that action at this time.