From 8706e6dbb51a4ff3dd3e8e8e01b9181661d0d1a9 Mon Sep 17 00:00:00 2001 From: enny Date: Fri, 13 Dec 2019 23:10:20 +0100 Subject: [PATCH] zwei Panels synchron angesteuert --- LED-Board.ino | 12 ++++++++---- gedoens-excel.xlsx | Bin 9927 -> 9375 bytes src/panel.cpp | 41 ++++++++++++++++++++++------------------- src/panel.hpp | 4 ++++ 4 files changed, 34 insertions(+), 23 deletions(-) diff --git a/LED-Board.ino b/LED-Board.ino index 5769b2d..1640752 100644 --- a/LED-Board.ino +++ b/LED-Board.ino @@ -16,7 +16,8 @@ IPAddress subnet(255, 255, 254, 0); WebSocketsServer webSocket = WebSocketsServer(81); Image image; -Panel panel; +Panel panel1(22, 24, 23); //data, clock, load +Panel panel2(28, 29, 31); ProtocolDL protocol = ProtocolDL(image); unsigned long last_activity = 0; @@ -73,7 +74,8 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t length if(protocol.isComplete()) { Serial.println("complete"); - panel.send_image(&image); + panel1.send_image(&image); + panel2.send_image(&image); } break; @@ -106,7 +108,8 @@ void setup() { webSocket.begin(); webSocket.onEvent(webSocketEvent); - panel.init(); + panel1.init(); + panel2.init(); Serial.println("setup done"); } @@ -139,6 +142,7 @@ void loop() { if (someOneIsConnected == false) { default_image(&image); - panel.send_image(&image); + panel1.send_image(&image); + panel2.send_image(&image); } } diff --git a/gedoens-excel.xlsx b/gedoens-excel.xlsx index 8300692dc0efb7e0c77c3a6f1eb5105242556271..e9bb1f3a0f174b13db119fe31d685e435dacdddf 100644 GIT binary patch literal 9375 zcmeHNgU?>PF5sZFh!2m)^=_U#$(mu-*{EkpEGop6U zY>MDJjl(D8*yzNGlCwWI_(ht;gz&-FK_hh~xs9m-DM4(;}jql8SJ>y*QNPsPq1sh>Zky-0Wy zfG{M?Y2Wi@IxpQ zxe>aqYvNLJ@@D-WV3w{7dYOYGIO@46VTDpUzF6{3d{izB?=))~YxtJZ95(007Xy{E zM=+lYr9#Yv?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kRM=z(1fEeV_Sv%MPT*#a7%q?r zZ!PSEy}L=-%I@aP9NIaz5fOlk#K`tdhNAzI$Mf-XLRA`!2Pt9x5YC@@(Adf8e=G>& zy??a~aHqq<&vGWhC06KBbcO?6sEDRYKG0jc2JqV3(u|MjnOtZ$=|GmH<2W&+eO}4O z!#dzV_RaSQaFgJt=lg8WfNwxa@AS=f6pG7*2~4#7nr|p;B~}@oI!!@}Dcu$K*P`|& zJFMWIgqjeg5UcQ}#DoEkSux$}1Dz6ayFi|36q3Dp(iZHk#+ORp_(mP6pQ8DOOlf#< z5yY>T7CmrQ1d&{it9k7`)-G$VbeRU6GGF9zvgIqQU844SKPnk$dy2_Nvuz*A``Ich zuONOTF{8-Fwqq?#YKK%`jAjLW56)P71=&ts_o8lZOgUVqw%s#uhH^o?3$7eTPy#*c zv6EFgn9bebL-8^6DRV)q&v%8lDl$iD32YhUDSek84c}vu>2qNr<71*HXB5zc?Mk%< zN8jCt=)QY%Z$;!W_|O`+v{V$@aApH$29P9wq83-YyR%R!@)Dd z()Is*Wa!`f_wVr^4iG8J{guF94>$Z9_;XB#3CW+1I{XU!Yr*%=z!q3c@&A{9f2H$l z74Q#A$FNgTztjYO1^-&Z_yg>K@f-MW6^&mh{F;CNgTgs19{{`kui5xt3H+Kt_=A88 z;qQ;|pM1iv&|d?vKcJ4VcC ZFAb?IhXmVQ0N@eq69D5$HtL_>{traQqJsbc diff --git a/src/panel.cpp b/src/panel.cpp index c19a58d..91f7ac5 100644 --- a/src/panel.cpp +++ b/src/panel.cpp @@ -1,14 +1,17 @@ #include "panel.hpp" -#define LOAD 7 -#define DATA 8 -#define CLOCK 9 +Panel::Panel(uint8_t pData, uint8_t pClock, uint8_t pLoad) +{ + pinData = pData; + pinLoad = pLoad; + pinClock = pClock; +} void Panel::init() { - pinMode(DATA, OUTPUT); - pinMode(CLOCK, OUTPUT); - pinMode(LOAD, OUTPUT); + pinMode(pinData, OUTPUT); + pinMode(pinClock, OUTPUT); + pinMode(pinLoad, OUTPUT); } void Panel::send_image(Image* img) { @@ -23,17 +26,17 @@ void Panel::send_image(Image* img) { void Panel::clock() { - PORTH |= (1 << PH6); - PORTH &= ~(1 << PH6); - //digitalWrite(CLOCK, HIGH); - //digitalWrite(CLOCK, LOW); + //PORTA |= (1 << PA2); + //PORTA &= ~(1 << PA2); + digitalWrite(pinClock, HIGH); + digitalWrite(pinClock, LOW); } void Panel::load() { - PORTH |= (1 << PH4); - PORTH &= ~(1 << PH4); - //digitalWrite(LOAD, HIGH); - //digitalWrite(LOAD, LOW); + //PORTB |= (1 << PB0); + //PORTB &= ~(1 << PB0); + digitalWrite(pinLoad, HIGH); + digitalWrite(pinLoad, LOW); } @@ -79,16 +82,16 @@ void Panel::send_block(Image* p, int x, int y) { byte pixel = p->get_pixel(x + x_offset, y + y_offset); - if(pixel) + /*if(pixel) { - PORTH |= (1 << PH5); + PORTB |= (1 << PB2); } else { - PORTH &= ~(1 << PH5); - } + PORTB &= ~(1 << PB2); + }*/ - //digitalWrite(DATA, pixel); + digitalWrite(pinData, pixel); clock(); } diff --git a/src/panel.hpp b/src/panel.hpp index be854d3..b02198a 100644 --- a/src/panel.hpp +++ b/src/panel.hpp @@ -6,6 +6,7 @@ class Panel { public: + Panel(uint8_t pData, uint8_t pClock, uint8_t pLoad); void init(); void send_image(Image* img); @@ -13,6 +14,9 @@ class Panel void clock(); void load(); void send_block(Image* p, int x, int y); + uint8_t pinData; + uint8_t pinClock; + uint8_t pinLoad; }; #endif \ No newline at end of file