Skip to content

Commit

Permalink
TM1650 7 seg display driver v1.0.2 - updated to comply with arduino l…
Browse files Browse the repository at this point in the history
…ib manager std.

 * created library.properties file
 * moved sorce code to src/ folder
 * added keywords
  • Loading branch information
arkhipenko committed Oct 16, 2015
1 parent 9c8c78f commit 5a191d0
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 66 deletions.
11 changes: 8 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Copyright (c) 2015 Anatoli Arkhipenko

Changelog:
2015-02-24 - Initial release
2015-04-27 - Added support of program memery (PROGMEM) to store the ASCII to Segment Code table
2015-08-08 - Added check if panel is connected during init. All calls will be disabled is panel was not connected during init.
v1.0.0:
2015-02-24 - Initial release

v1.0.1:
2015-04-27 - Added support of program memery (PROGMEM) to store the ASCII to Segment Code table

v1.0.2
2015-08-08 - Added check if panel is connected during init. All calls will be disabled is panel was not connected during init.
33 changes: 33 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#######################################
# Syntax Coloring Map For TaskManager
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

TM1650 KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

init KEYWORD2
clear KEYWORD2
displayOn KEYWORD2
displayOff KEYWORD2
displayState KEYWORD2
displayString KEYWORD2
displayRunning KEYWORD2
displayRunningShift KEYWORD2
setBrightness KEYWORD2
controlPosition KEYWORD2
setPosition KEYWORD2
setDot KEYWORD2
getPosition KEYWORD2
getNumPositions KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################

9 changes: 9 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=TM1650
version=1.0.2
author=Anatoli Arkhipenko <[email protected]>
maintainer=Anatoli Arkhipenko <[email protected]>
sentence=7 segment display driver for JY-MCU module based on TM1650 chip.
paragraph=Allows control of JY-MCU 7 segment display modules based on TM1650 chip.
category=Device Control
url=https://github.com/arkhipenko/TM1650.git
architectures=*
52 changes: 22 additions & 30 deletions TM1650.cpp → src/TM1650.cpp
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
// 7 segment display driver for JY-MCU module based on TM1650 chip
// Copyright (c) 2015 Anatoli Arkhipenko
//
// Changelog:
// 2015-02-24 - Initial release
// 2015-04-27 - Added support of program memery (PROGMEM) to store the ASCII to Segment Code table

/* ============================================
7 segment display driver for JY-MCU module based on TM1650 chip
Copyright (c) 2015 Anatoli Arkhipenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===============================================
*/
/** ============================================
* 7 segment display driver for JY-MCU module based on TM1650 chip
* Copyright (c) 2015 Anatoli Arkhipenko
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* ===============================================*/

#include "TM1650.h"

Expand Down
70 changes: 37 additions & 33 deletions TM1650.h → src/TM1650.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
// 7 segment display driver for JY-MCU module based on TM1650 chip
// Copyright (c) 2015 Anatoli Arkhipenko
//
// Changelog:
// 2015-02-24 - Initial release
// 2015-04-27 - Added support of program memery (PROGMEM) to store the ASCII to Segment Code table
// 2015-08-08 - Added check if panel is connected during init. All calls will be disabled is panel was not connected during init.

/* ============================================
7 segment display driver for JY-MCU module based on TM1650 chip
Copyright (c) 2015 Anatoli Arkhipenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===============================================
*/
/** ============================================
* 7 segment display driver for JY-MCU module based on TM1650 chip
* Copyright (c) 2015 Anatoli Arkhipenko
*
*
* Changelog:
* v1.0.0:
* 2015-02-24 - Initial release
*
* v1.0.1:
* 2015-04-27 - Added support of program memery (PROGMEM) to store the ASCII to Segment Code table
*
* v1.0.2
* 2015-08-08 - Added check if panel is connected during init. All calls will be disabled is panel was not connected during init.
*
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* ===============================================*/

#include <Arduino.h>
#include <Wire.h>
Expand Down Expand Up @@ -91,7 +95,7 @@ class TM1650 {
void displayOn();
void displayOff();
void displayState(bool aState);
void displayString(char *aString);
void displayString(char *aString);
int displayRunning(char *aString);
int displayRunningShift();
void setBrightness(int aValue);
Expand All @@ -103,7 +107,7 @@ class TM1650 {
int getNumPositions() { return iNumDigits; };

private:
char *iPosition;
char *iPosition;
bool iActive;
int iNumDigits;
char iString[TM1650_MAX_STRING+1];
Expand Down

0 comments on commit 5a191d0

Please sign in to comment.