-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c88ebe
commit fe71689
Showing
13 changed files
with
149 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; PlatformIO Project Configuration File | ||
|
||
[env:ATmega328P] | ||
platform = atmelavr ; Platform to build for | ||
board = ATmega328P ; Supported board | ||
framework = arduino ; What framework we're using | ||
|
||
lib_deps = ; External libraries | ||
SPI | ||
../../ | ||
|
||
# Monitor Settings | ||
monitor_speed = 115200 | ||
monitor_rts = 0 | ||
monitor_dtr = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "shiftDisplay", | ||
"version": "1.0.0", | ||
"description": "A super simple library to interface specifically with my shift boards.", | ||
"keywords": "kitsunescientific, shift segment", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Kitsune-Robotics/SegmentTestBoard.git" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Joe", | ||
"email": "[email protected]", | ||
"maintainer": true | ||
} | ||
], | ||
"license": "BSD", | ||
"homepage": "https://www.helloworld.org/", | ||
"dependencies": {}, | ||
"frameworks": "*", | ||
"platforms": "*" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @brief Implementations for shiftDisplay | ||
* | ||
*/ | ||
|
||
#include "shiftDisplay.h" | ||
|
||
shiftDisplay::shiftDisplay(uint8_t _datPin, uint8_t _clkPin) | ||
{ | ||
datPin = _datPin; | ||
clkPin = _clkPin; | ||
} | ||
|
||
void shiftDisplay::setDigit(uint8_t digit) | ||
{ | ||
; // Implement me later lol! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* @file shiftDisplay.h | ||
* @author Joe | ||
* @brief Library for ShiftSegmentBoard | ||
*/ | ||
|
||
// Libs | ||
#include <Arduino.h> | ||
|
||
class shiftDisplay | ||
{ | ||
private: | ||
uint8_t datPin; | ||
uint8_t clkPin; | ||
|
||
// Segments | ||
enum Seg | ||
{ | ||
s_A = 0b00000001, | ||
s_B = 0b00000010, | ||
s_C = 0b00000100, | ||
s_D = 0b00001000, | ||
s_E = 0b00010000, | ||
s_F = 0b00100000, | ||
s_G = 0b01000000, | ||
s_DP = 0b10000000, | ||
}; | ||
|
||
// Segment Lookup table | ||
const uint8_t segmentLookup[37] = { | ||
s_A | s_B | s_C | s_D | s_E | s_F, // 0 | ||
s_B | s_C, // 1 | ||
s_A | s_B | s_D | s_E | s_G, // 2 | ||
s_A | s_B | s_C | s_D | s_G, // 3 | ||
s_B | s_C | s_F | s_G, // 4 | ||
s_A | s_C | s_D | s_F | s_G, // 5 | ||
s_A | s_C | s_D | s_E | s_F | s_G, // 6 | ||
s_A | s_B | s_C, // 7 | ||
s_A | s_B | s_C | s_D | s_E | s_F | s_G, // 8 | ||
s_A | s_B | s_C | s_D | s_F | s_G, // 9 | ||
0, // null | ||
s_A | s_B | s_C | s_E | s_F | s_G, // A | ||
s_C | s_D | s_E | s_F | s_G, // b | ||
s_A | s_D | s_E | s_F, // C | ||
s_B | s_C | s_D | s_E | s_G, // d | ||
s_A | s_D | s_E | s_F | s_G, // E | ||
s_A | s_E | s_F | s_G, // F | ||
s_A | s_C | s_D | s_E | s_F, // G | ||
s_C | s_E | s_F | s_G, // h | ||
s_B | s_C, // i | ||
s_B | s_C | s_D, // j | ||
s_A | s_C | s_E | s_F | s_G, // k | ||
s_D | s_E | s_F, // L | ||
s_A | s_C | s_E, // M | ||
s_A | s_B | s_C | s_E | s_F, // N | ||
s_A | s_B | s_C | s_D | s_E | s_F, // O | ||
s_A | s_B | s_E | s_F | s_G, // p | ||
s_A | s_B | s_C | s_F | s_G, // q | ||
s_E | s_G, // r | ||
s_A | s_C | s_D | s_F | s_G, // s | ||
s_D | s_E | s_F | s_G, // t | ||
s_B | s_C | s_D | s_E | s_F, // U | ||
s_B | s_C | s_D | s_F, // V | ||
s_B | s_D | s_F, // W | ||
s_B | s_C | s_E | s_F | s_G, // X | ||
s_B | s_C | s_D | s_F | s_G, // Y | ||
s_A | s_B | s_D | s_G, // Z | ||
}; | ||
|
||
public: | ||
shiftDisplay(uint8_t _datPin, uint8_t _clkPin); | ||
|
||
/** | ||
* @brief Set the current digit | ||
* | ||
* @param digit A number or char corrsponding to the lookup chart. | ||
*/ | ||
void setDigit(uint8_t digit); | ||
}; |
This file was deleted.
Oops, something went wrong.