Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65bb58ca47 | ||
|
|
538a7fce2f |
No files matched your search
+10
-5
@@ -42,6 +42,7 @@ float lux = 1.00f;
|
|||||||
const int potPin = GPIO_NUM_6;
|
const int potPin = GPIO_NUM_6;
|
||||||
int adcResult = 0;
|
int adcResult = 0;
|
||||||
uint8_t targetBrightness = 255;
|
uint8_t targetBrightness = 255;
|
||||||
|
uint8_t currentBrightness = 255;
|
||||||
#define NUM_SAMPLES 64
|
#define NUM_SAMPLES 64
|
||||||
// Gang i don't know
|
// Gang i don't know
|
||||||
JPEGDEC jpeg;
|
JPEGDEC jpeg;
|
||||||
@@ -392,6 +393,12 @@ void refreshToken() {
|
|||||||
http.end();
|
http.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void adjustBrightness(){
|
||||||
|
if(targetBrightness != currentBrightness){
|
||||||
|
dma_display->setPanelBrightness(targetBrightness);
|
||||||
|
currentBrightness = targetBrightness;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String getTrack() {
|
String getTrack() {
|
||||||
HTTPClient http;
|
HTTPClient http;
|
||||||
@@ -460,7 +467,6 @@ void spotifyTask(void *parameter) {
|
|||||||
}
|
}
|
||||||
void panelTask(void *parameter) {
|
void panelTask(void *parameter) {
|
||||||
const TickType_t framePeriod = pdMS_TO_TICKS(33);
|
const TickType_t framePeriod = pdMS_TO_TICKS(33);
|
||||||
;
|
|
||||||
String time = ntp.formattedTime("%m%e");
|
String time = ntp.formattedTime("%m%e");
|
||||||
if (time == String("11 1")) {
|
if (time == String("11 1")) {
|
||||||
Serial.println("HAPPY BIRTHDAY");
|
Serial.println("HAPPY BIRTHDAY");
|
||||||
@@ -468,7 +474,6 @@ void panelTask(void *parameter) {
|
|||||||
int start = millis();
|
int start = millis();
|
||||||
Serial.printf("Successfully opened GIF; Canvas size = %d x %d\n", gif.getCanvasWidth(), gif.getCanvasHeight());
|
Serial.printf("Successfully opened GIF; Canvas size = %d x %d\n", gif.getCanvasWidth(), gif.getCanvasHeight());
|
||||||
while (millis() - start < 5000) {
|
while (millis() - start < 5000) {
|
||||||
dma_display->setBrightness(targetBrightness);
|
|
||||||
while (gif.playFrame(true, NULL)) {
|
while (gif.playFrame(true, NULL)) {
|
||||||
dma_display->clearScreen();
|
dma_display->clearScreen();
|
||||||
for (int y = 0; y < 64; y++) {
|
for (int y = 0; y < 64; y++) {
|
||||||
@@ -489,7 +494,7 @@ void panelTask(void *parameter) {
|
|||||||
float deltaTime = (now - previousFrame) * portTICK_PERIOD_MS / 1000.0f;
|
float deltaTime = (now - previousFrame) * portTICK_PERIOD_MS / 1000.0f;
|
||||||
previousFrame = now;
|
previousFrame = now;
|
||||||
if (lux > 0.00 || switchState) {
|
if (lux > 0.00 || switchState) {
|
||||||
dma_display->setBrightness(targetBrightness);
|
adjustBrightness();
|
||||||
if (!playing) {
|
if (!playing) {
|
||||||
Serial.println("Entering Idle.");
|
Serial.println("Entering Idle.");
|
||||||
if (gif.open((uint8_t *)idle_gif, sizeof(idle_gif), GIFDraw)) {
|
if (gif.open((uint8_t *)idle_gif, sizeof(idle_gif), GIFDraw)) {
|
||||||
@@ -498,7 +503,7 @@ void panelTask(void *parameter) {
|
|||||||
if (lux == 0.00 && !switchState) {
|
if (lux == 0.00 && !switchState) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dma_display->setBrightness(targetBrightness);
|
adjustBrightness();
|
||||||
while (gif.playFrame(true, NULL)) {
|
while (gif.playFrame(true, NULL)) {
|
||||||
dma_display->clearScreen();
|
dma_display->clearScreen();
|
||||||
for (int y = 0; y < 64; y++) {
|
for (int y = 0; y < 64; y++) {
|
||||||
@@ -588,7 +593,7 @@ void setup() {
|
|||||||
xTaskCreatePinnedToCore(
|
xTaskCreatePinnedToCore(
|
||||||
panelTask,
|
panelTask,
|
||||||
"panelTask",
|
"panelTask",
|
||||||
2048,
|
2560,
|
||||||
NULL,
|
NULL,
|
||||||
1,
|
1,
|
||||||
&taskPanelHandle,
|
&taskPanelHandle,
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Note:
|
||||||
|
# This file may be overwritten by LibrePCB when upgrading the project to a newer
|
||||||
|
# version. So, if you make any changes in this file, you should review/correct
|
||||||
|
# it after an upgrade. If you think that something is missing here, please open
|
||||||
|
# a new issue on our issue tracker: https://github.com/LibrePCB/LibrePCB/issues
|
||||||
|
|
||||||
|
# Disable automatic end-of-line conversion for all files. This is to prevent Git
|
||||||
|
# from (silently) modifying files which are read and written by LibrePCB. Do not
|
||||||
|
# remove this line (or file) as is could lead into annoying and wrong behavior!
|
||||||
|
* -text
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Note:
|
||||||
|
# This file may be overwritten by LibrePCB when upgrading the project to a newer
|
||||||
|
# version. So, if you make any changes in this file, you should review/correct
|
||||||
|
# it after an upgrade. If you think that something is missing here, please open
|
||||||
|
# a new issue on our issue tracker: https://github.com/LibrePCB/LibrePCB/issues
|
||||||
|
|
||||||
|
# LibrePCB files
|
||||||
|
.autosave/
|
||||||
|
.backup/
|
||||||
|
user/
|
||||||
|
*.user.lp
|
||||||
|
.lock
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Files created by operating systems or file managers
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Files created by other applications
|
||||||
|
*.autosave
|
||||||
|
*.swp
|
||||||
|
*.tmp
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
LIBREPCB-PROJECT
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# MultiMatrix
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This is a [LibrePCB](https://librepcb.org) project!
|
||||||
|
Just edit this file to add a description about it.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
No license set.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
(librepcb_boards
|
||||||
|
(board "boards/default/board.lp")
|
||||||
|
)
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
(librepcb_board 84d70b10-5f98-4118-af4e-531d1c36ea8e
|
||||||
|
(name "default")
|
||||||
|
(default_font "newstroke.bene")
|
||||||
|
(grid (interval 0.635) (unit millimeters))
|
||||||
|
(layers (inner 0))
|
||||||
|
(thickness 1.6)
|
||||||
|
(solder_resist green)
|
||||||
|
(silkscreen white)
|
||||||
|
(silkscreen_layers_top top_legend top_names)
|
||||||
|
(silkscreen_layers_bot bot_legend bot_names)
|
||||||
|
(design_rules
|
||||||
|
(default_trace_width 0.5)
|
||||||
|
(default_via_drill_diameter 0.3)
|
||||||
|
(stopmask_max_via_drill_diameter 0.3)
|
||||||
|
(stopmask_clearance (ratio 0.0) (min 0.1) (max 0.1))
|
||||||
|
(solderpaste_clearance (ratio 0.1) (min 0.0) (max 1.0))
|
||||||
|
(pad_annular_ring (outer full) (inner auto) (ratio 0.25) (min 0.25) (max 2.0))
|
||||||
|
(via_annular_ring (ratio 0.25) (min 0.2) (max 2.0))
|
||||||
|
)
|
||||||
|
(design_rule_check
|
||||||
|
(min_pcb_size 0.0 0.0)
|
||||||
|
(max_pcb_size (double_sided 0.0 0.0) (multilayer 0.0 0.0))
|
||||||
|
(pcb_thickness)
|
||||||
|
(max_layers 0)
|
||||||
|
(solder_resist)
|
||||||
|
(silkscreen)
|
||||||
|
(min_copper_copper_clearance 0.2)
|
||||||
|
(min_copper_board_clearance 0.3)
|
||||||
|
(min_copper_npth_clearance 0.25)
|
||||||
|
(min_drill_drill_clearance 0.35)
|
||||||
|
(min_drill_board_clearance 0.5)
|
||||||
|
(min_silkscreen_stopmask_clearance 0.127)
|
||||||
|
(min_copper_width 0.2)
|
||||||
|
(min_annular_ring 0.2)
|
||||||
|
(min_npth_drill_diameter 0.5)
|
||||||
|
(min_pth_drill_diameter 0.3)
|
||||||
|
(min_npth_slot_width 1.0)
|
||||||
|
(min_pth_slot_width 0.7)
|
||||||
|
(max_tented_via_drill_diameter 3.0)
|
||||||
|
(min_silkscreen_width 0.15)
|
||||||
|
(min_silkscreen_text_height 0.8)
|
||||||
|
(min_outline_tool_diameter 2.0)
|
||||||
|
(blind_vias_allowed false)
|
||||||
|
(buried_vias_allowed false)
|
||||||
|
(allowed_npth_slots single_segment_straight)
|
||||||
|
(allowed_pth_slots single_segment_straight)
|
||||||
|
(approvals_version "2")
|
||||||
|
)
|
||||||
|
(fabrication_output_settings
|
||||||
|
(base_path "./output/{{VERSION}}/gerber/{{PROJECT}}")
|
||||||
|
(outlines (suffix "_OUTLINES.gbr"))
|
||||||
|
(copper_top (suffix "_COPPER-TOP.gbr"))
|
||||||
|
(copper_inner (suffix "_COPPER-IN{{CU_LAYER}}.gbr"))
|
||||||
|
(copper_bot (suffix "_COPPER-BOTTOM.gbr"))
|
||||||
|
(soldermask_top (suffix "_SOLDERMASK-TOP.gbr"))
|
||||||
|
(soldermask_bot (suffix "_SOLDERMASK-BOTTOM.gbr"))
|
||||||
|
(silkscreen_top (suffix "_SILKSCREEN-TOP.gbr"))
|
||||||
|
(silkscreen_bot (suffix "_SILKSCREEN-BOTTOM.gbr"))
|
||||||
|
(drills (merge false)
|
||||||
|
(suffix_pth "_DRILLS-PTH.drl")
|
||||||
|
(suffix_npth "_DRILLS-NPTH.drl")
|
||||||
|
(suffix_merged "_DRILLS.drl")
|
||||||
|
(suffix_buried "_DRILLS-PLATED-{{START_LAYER}}-{{END_LAYER}}.drl")
|
||||||
|
(g85_slots false)
|
||||||
|
)
|
||||||
|
(solderpaste_top (create true) (suffix "_SOLDERPASTE-TOP.gbr"))
|
||||||
|
(solderpaste_bot (create true) (suffix "_SOLDERPASTE-BOTTOM.gbr"))
|
||||||
|
)
|
||||||
|
(preferred_footprint_tags
|
||||||
|
(tht_top)
|
||||||
|
(tht_bot)
|
||||||
|
(smt_top)
|
||||||
|
(smt_bot)
|
||||||
|
(common)
|
||||||
|
)
|
||||||
|
(polygon 0a825dd4-5bf0-4980-8de6-71f31f17a9d0 (layer brd_outlines)
|
||||||
|
(width 0.0) (fill false) (grab_area false) (lock false)
|
||||||
|
(vertex (position 0.0 0.0) (angle 0.0))
|
||||||
|
(vertex (position 100.0 0.0) (angle 0.0))
|
||||||
|
(vertex (position 100.0 80.0) (angle 0.0))
|
||||||
|
(vertex (position 0.0 80.0) (angle 0.0))
|
||||||
|
(vertex (position 0.0 0.0) (angle 0.0))
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
(librepcb_circuit
|
||||||
|
(variant 4cc2e302-8fb8-4bc3-bfe4-0bdd0a4672b4 (name "Std")
|
||||||
|
(description "Standard assembly")
|
||||||
|
)
|
||||||
|
(netclass 70e58aa7-f128-437a-a205-ab9c714a3174 (name "default")
|
||||||
|
(default_trace_width inherit)
|
||||||
|
(default_via_drill_diameter inherit)
|
||||||
|
(min_copper_copper_clearance 0.0)
|
||||||
|
(min_copper_width 0.0)
|
||||||
|
(min_via_drill_diameter 0.0)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(librepcb_erc
|
||||||
|
)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(librepcb_jobs
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
(librepcb_project_metadata 5d45c892-9ddd-4651-9961-eba8b77c30cc
|
||||||
|
(name "MultiMatrix")
|
||||||
|
(author "carl")
|
||||||
|
(version "v1")
|
||||||
|
(created 2026-11-14T18:30:51Z)
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
(librepcb_project_settings
|
||||||
|
(library_locale_order
|
||||||
|
)
|
||||||
|
(library_norm_order
|
||||||
|
(norm "IEC 60617")
|
||||||
|
)
|
||||||
|
(custom_bom_attributes
|
||||||
|
)
|
||||||
|
(default_lock_component_assembly false)
|
||||||
|
)
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,4 @@
|
|||||||
|
(librepcb_schematic 99fec15c-676c-4e47-a76b-c4ae04c4a3bc
|
||||||
|
(name "Main")
|
||||||
|
(grid (interval 2.54) (unit millimeters))
|
||||||
|
)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
(librepcb_schematics
|
||||||
|
(schematic "schematics/main/schematic.lp")
|
||||||
|
)
|
||||||
Reference in new issue
Block a user