Industriële fabricage
Industrieel internet der dingen | Industriële materialen | Onderhoud en reparatie van apparatuur | Industriële programmering |
home  MfgRobots >> Industriële fabricage >  >> Manufacturing Technology >> Productieproces

RGB HexMatrix | IoT-klok

Componenten en benodigdheden

Arduino UNO
× 1
NodeMCU ESP8266 Breakout Board
× 1
NeoPixel WS2811 LED's
× 1
Digilent 5V 2.5A schakelende voeding
× 1

Benodigde gereedschappen en machines

Soldeerbout (algemeen)
Soldeerdraad, loodvrij
Soldeervloeistof, solderen
Kabelsnijder, 143 mm

Apps en online services

Arduino IDE

Over dit project


HexMatrix is ​​de LED-matrix met veel driehoekige pixels. Zes pixels combineren maakt een zeshoek. Er zijn veel verschillende animaties die kunnen worden getoond op de matrix van FastLED-bibliotheek. Ook heb ik cijfers van 0 tot 9 ontworpen met 10 segmenten voor elk cijfer in de matrix en een IoT-klok gemaakt.

Benodigdheden:

  • ESP8266 of Arduino (Uno/Nano)
  • WS2811 LED (96 LED's)
  • 5V/2A-voeding
  • 3D-printen

Stap 1:3D-printen:

  • Print alle gegeven 3D-modellen in 3D:klik hier voor STL-bestanden en codes
  • Druk de schermlaag af in wit PLA.

Stap 2:Circuitverbindingen:

  • Maak alle aansluitingen zoals aangegeven in het schakelschema.
  • GND~-Ve
  • Vin~5V~+Ve
  • DataIn ~ Pin 2
  • Verleng ook de voedingsdraden tot de laatste LED en sluit deze aan om spanningsverlies over de LED's te voorkomen.

Stap 3:Opmerking:

  • Als je een Arduino-bord gebruikt, kun je alleen animaties weergeven, je kunt geen tijd weergeven.
  • Als je ESP8266-bord gebruikt, kunnen we tijd en andere animaties op de matrix weergeven.

Stap 4:Montage:

  • Plaats alle LED's in slangenvolgorde.
  • Zet alles in elkaar.
  • Soldeer de connector op het Microcontroller-bord, de connector is afkomstig van het andere uiteinde van de LED-lijn.

Stap 5:Coderen:

  • Klik hier voor codes
  • Voor deze matrix heb ik drie codes HexMatrix.ino, clock1.ino en clock2.ino gemaakt.
  • HexMatrix-code is de code voor het weergeven van animaties op de matrix, deze kan op elk Microcontroller-bord worden uitgevoerd.
  • Klok- en klok2-code werkt alleen op ESP8266-borden.

HexMatrix.ino:

  • Open de code gegeven in Arduino IDE.
  • Installeer de FastLED-bibliotheek in Arduino IDE.
  • Selecteer het bordtype, de poort en upload de code.

Klok1- en Klok2-codes:

  • Open de code in Arduino IDE.
  • In deze code kunnen we deze waarden wijzigen volgens onze kleurvereiste
//Digit-kleurwaarden in RGBint r=255;
int g=255;
int b=255;
//Achtergrondkleurwaarden in RGB
int br=0;
int bg=20;
int bb=10;
  • Voer de wifi-naam en het wachtwoord in
const char* ssid ="Wifi_Name";
const char* wachtwoord ="Wachtwoord";
  • Voer de tijdzone van uw land in (India 5:30=5,5 voer op dezelfde manier uw tijdzone in)
//Uw tijdzone
int timezone =-5.5 * 3600;
  • Selecteer het bordtype als ESP8266, selecteer de poort en upload de code.
  • Afgezien hiervan hebben we ook veel andere animaties in de FastLED-voorbeelden.

Code

  • klok1
  • klok2
clock1Arduino
#include #include #include #define LED_PIN 2#define NUM_LEDS 96#define BRIGHTNESS 255#define LED_TYPE WS2811#define COLOR_ORDER RGBCRGB leds[NUM_LEDS];/ /Digit kleurwaarden in RGBint r=255;int g=255;int b=255;//Achtergrondkleurwaarden in RGBint br=0;int bg=20;int bb=10;const char* ESP_HOST_NAME ="esp-" + ESP.getFlashChipId();//Uw wifi-infoconst char* ssid ="Wifi_Name";const char* wachtwoord ="Password";//Uw tijdzoneint timezone =-5.5 * 3600;int dst =0; WiFiClient wifiClient; ongeldig connectWifi () { WiFi.begin (ssid, wachtwoord); Serial.print("Verbinding maken met "); Serieel.println(ssid); while (WiFi.status() !=WL_CONNECTED) { delay(500); Serieel.print("."); } Serieel.println(""); Serial.println("WiFi verbonden!"); Serial.println(WiFi.localIP()); Serial.println();}void setup() { Serial.begin(115200); vertraging (500); verbindenWifi(); Serieel.println(); Serial.println("\n\nVolgende Loop-Step:" + String(millis()) + ":"); configTime(tijdzone, dst, "pool.ntp.org", "time.nist.gov"); FastLED.addLeds(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); FastLED.setBrightness(HELDERHEID);}void loop(){ time_t now =time(nullptr); struct tm* p_tm =lokale tijd(&nu); Serial.print("--------------------------------------------- ----\N"); Serial.print("Datum &Tijd:"); Serial.print(p_tm->tm_mday); Serieel.print("/"); Serial.print(p_tm->tm_mon + 1); Serieel.print("/"); Serial.print(p_tm->tm_year + 1900); Serieel.print(" "); int uur=p_tm->tm_uur; int minuut=p_tm->tm_min; if(uur>12) { uur=uur-12; } Serial.print(uur); Serial.print(":"); Seriële.afdruk (minuut); Serial.print(":"); Serial.println(p_tm->tm_sec); achtergrond(); if(uur==0||uur==12) { uur12(); } if(uur==1) { uur1(); } if(uur==2) { uur2(); } if(uur==3) { uur3(); } if(uur==4) { uur4(); } if(uur==5) { uur5(); } if(uur==6) { uur6(); } if(uur==7) { uur7(); } if(uur==8) { uur8(); } if(uur==9) { uur9(); } if(uur==10) { uur10(); } if(hour==11) { hour11(); } if(minuut==0) { min0(); } if(minuut==1) { min1(); } if(minuut==2) { min2(); } if(minuut==3) { min3(); } if(minuut==4) { min4(); } if(minuut==5) { min5(); } if(minuut==6) { min6(); } if(minuut==7) { min7(); } if(minuut==8) { min8(); } if(minuut==9) { min9(); } if(minuut==10) { min10(); } if(minuut==11) { min11(); } if(minuut==12) { min12(); } if(minuut==13) { min13(); } if(minuut==14) { min14(); } if(minuut==15) { min15(); } if(minuut==16) { min16(); } if(minuut==17) { min17(); } if(minuut==18) { min18(); } if(minuut==19) { min19(); } if(minuut==20) { min20(); } if(minuut==21) { min21(); } if(minuut==22) { min22(); } if(minuut==23) { min23(); } if(minuut==24) { min24(); } if(minuut==25) { min25(); } if(minuut==26) { min26(); } if(minuut==27) { min27(); } if(minuut==28) { min28(); } if(minuut==29) { min29(); } if(minuut==30) { min30(); } if(minuut==31) { min31(); } if(minuut==32) { min32(); } if(minuut==33) { min33(); } if(minuut==34) { min34(); } if(minuut==35) { min35(); } if(minuut==36) { min36(); } if(minuut==37) { min37(); } if(minuut==38) { min38(); } if(minuut==39) { min39(); } if(minuut==40) { min40(); } if(minuut==41) { min41(); } if(minuut==42) { min42(); } if(minuut==43) { min43(); } if(minuut==44) { min44(); } if(minuut==45) { min45(); } if(minuut==46) { min46(); } if(minuut==47) { min47(); } if(minuut==48) { min48(); } if(minuut==49) { min49(); } if(minuut==50) { min50(); } if(minuut==51) { min51(); } if(minuut==52) { min52(); } if(minuut==53) { min53(); } if(minuut==54) { min54(); } if(minuut==55) { min55(); } if(minuut==56) { min56(); } if(minuut==57) { min57(); } if(minuut==58) { min58(); } if(minuut==59) { min59(); } if(minuut==60) { min60(); } FastLED.show(); FastLED.clear(); FastLED.show();}void background(){ leds[0] =CRGB(br,bg,bb); leds [1] =CRGB(br,bg,bb); leds [2] =CRGB(br,bg,bb); leds [3] =CRGB(br,bg,bb); leds[4] =CRGB(br,bg,bb); leds [5] =CRGB(br,bg,bb); leds[6] =CRGB(br,bg,bb); leds[7] =CRGB(br,bg,bb); leds[8] =CRGB(br,bg,bb); leds[9] =CRGB(br,bg,bb); leds[10] =CRGB(br,bg,bb); leds[11] =CRGB(br,bg,bb); leds[12] =CRGB(br,bg,bb); leds[13] =CRGB(br,bg,bb); leds[14] =CRGB(br,bg,bb); leds[15] =CRGB(br,bg,bb); leds[16] =CRGB(br,bg,bb); leds[17] =CRGB(br,bg,bb); leds[18] =CRGB(br,bg,bb); leds[19] =CRGB(br,bg,bb); leds[20] =CRGB(br,bg,bb); leds[21] =CRGB(br,bg,bb); leds[22] =CRGB(br,bg,bb); leds[23] =CRGB(br,bg,bb); leds [24] =CRGB(br,bg,bb); leds [25] =CRGB(br,bg,bb); leds[26] =CRGB(br,bg,bb); leds[27] =CRGB(br,bg,bb); leds [28] =CRGB(br,bg,bb); leds [29] =CRGB(br,bg,bb); leds[30] =CRGB(br,bg,bb); leds[31] =CRGB(br,bg,bb); leds[32] =CRGB(br,bg,bb); leds[33] =CRGB(br,bg,bb); leds[34] =CRGB(br,bg,bb); leds[35] =CRGB(br,bg,bb); leds[36] =CRGB(br,bg,bb); leds[37] =CRGB(br,bg,bb); leds [38] =CRGB(br,bg,bb); leds[39] =CRGB(br,bg,bb); leds [40] =CRGB(br,bg,bb); leds[41] =CRGB(br,bg,bb); leds [42] =CRGB(br,bg,bb); leds[43] =CRGB(br,bg,bb); leds [44] =CRGB(br,bg,bb); leds[45] =CRGB(br,bg,bb); leds[46] =CRGB(br,bg,bb); leds[47] =CRGB(br,bg,bb); leds [48] =CRGB(br,bg,bb); leds [49] =CRGB(br,bg,bb); leds [50] =CRGB(br,bg,bb); leds [51] =CRGB(br,bg,bb); leds[52] =CRGB(br,bg,bb); leds[53] =CRGB(br,bg,bb); leds [54] =CRGB(br,bg,bb); leds[55] =CRGB(br,bg,bb); leds[56] =CRGB(br,bg,bb); leds[57] =CRGB(br,bg,bb); leds[58] =CRGB(br,bg,bb); leds[59] =CRGB(br,bg,bb); leds[60] =CRGB(br,bg,bb); leds[61] =CRGB(br,bg,bb); leds[62] =CRGB(br,bg,bb); leds[63] =CRGB(br,bg,bb); leds [64] =CRGB(br,bg,bb); leds [65] =CRGB(br,bg,bb); leds[66] =CRGB(br,bg,bb); leds [67] =CRGB(br,bg,bb); leds [68] =CRGB(br,bg,bb); leds [69] =CRGB(br,bg,bb); leds [70] =CRGB(br,bg,bb); leds[71] =CRGB(br,bg,bb); leds[72] =CRGB(br,bg,bb); leds[73] =CRGB(br,bg,bb); leds [74] =CRGB(br,bg,bb); leds[75] =CRGB(br,bg,bb); leds[76] =CRGB(br,bg,bb); leds[77] =CRGB(br,bg,bb); leds[78] =CRGB(br,bg,bb); leds[79] =CRGB(br,bg,bb); leds [80] =CRGB(br,bg,bb); leds[81] =CRGB(br,bg,bb); leds [82] =CRGB(br,bg,bb); leds[83] =CRGB(br,bg,bb); leds [84] =CRGB(br,bg,bb); leds[85] =CRGB(br,bg,bb); leds[86] =CRGB(br,bg,bb); leds[87] =CRGB(br,bg,bb); leds[88] =CRGB(br,bg,bb); leds[89] =CRGB(br,bg,bb); leds[90] =CRGB(br,bg,bb); leds[91] =CRGB(br,bg,bb); leds[92] =CRGB(br,bg,bb); leds[93] =CRGB(br,bg,bb); leds[94] =CRGB(br,bg,bb); leds [95] =CRGB(br,bg,bb);}/*--------------------------------- ---Uur-LED's ------------------------------------*/void hour12(){ leds[ 2] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds [5] =CRGB(r,g,b); leds[7] =CRGB(r,g,b); leds[10] =CRGB(r,g,b); leds[14] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[17] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[25] =CRGB(r,g,b); leds [30] =CRGB(r,g,b); leds[32] =CRGB(r,g,b); leds[33] =CRGB(r,g,b);}void hour1(){ leds[3] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[15] =CRGB(r,g,b); leds [24] =CRGB(r,g,b); leds[31] =CRGB(r,g,b);}void hour2(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[15] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[24] =CRGB(r,g,b);}void hour3(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[24] =CRGB(r,g,b);}void hour4(){ leds[3] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b);}void hour5(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds [3] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[24] =CRGB(r,g,b);}void hour6(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds [3] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[15] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[24] =CRGB(r,g,b);}void hour7(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds [3] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b);}void hour8(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds [3] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[15] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[24] =CRGB(r,g,b);}void hour9(){ leds[0] =CRGB(r,g,b); leds [1] =CRGB(r,g,b); leds [3] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[9] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[24] =CRGB(r,g,b);}void hour10(){ leds[2] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds [5] =CRGB(r,g,b); leds[7] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[10] =CRGB(r,g,b); leds[14] =CRGB(r,g,b); leds[22] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[25] =CRGB(r,g,b); leds [30] =CRGB(r,g,b); leds[32] =CRGB(r,g,b); leds[33] =CRGB(r,g,b);}void hour11(){ leds[2] =CRGB(r,g,b); leds[4] =CRGB(r,g,b); leds[8] =CRGB(r,g,b); leds[10] =CRGB(r,g,b); leds[14] =CRGB(r,g,b); leds[16] =CRGB(r,g,b); leds[23] =CRGB(r,g,b); leds[25] =CRGB(r,g,b); leds [30] =CRGB(r,g,b); leds[32] =CRGB(r,g,b);}/*---------------------------- Minuten LEDs--- -------------------------*/void min0(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[91] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min1(){ leds[56] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min2(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min3(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min4(){ leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b);}void min5(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min6(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min7(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b);}void min8(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min9(){ leds[55] =CRGB(r,g,b); leds[56] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[87] =CRGB(r,g,b);}void min10(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min11(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b);}void min12(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min13(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min14(){ leds[62] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min15(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min16(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min17(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min18(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min19(){ leds[62] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[73] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min20(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[91] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min21(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[91] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min22(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[86] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[91] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min23(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[91] =CRGB(r,g,b); leds[92] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min24(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [70] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds [80] =CRGB(r,g,b); leds[81] =CRGB(r,g,b); leds[85] =CRGB(r,g,b); leds[88] =CRGB(r,g,b); leds[90] =CRGB(r,g,b); leds[91] =CRGB(r,g,b); leds[93] =CRGB(r,g,b);}void min25(){ leds[62] =CRGB(r,g,b); leds[63] =CRGB(r,g,b); leds [64] =CRGB(r,g,b); leds [65] =CRGB(r,g,b); leds[71] =CRGB(r,g,b); leds[72] =CRGB(r,g,b); leds [78] =CRGB(r,g,b); leds [79] =CRGB(r,g,b); leds[80] =CRGB(r,g,b);...Dit bestand is afgekapt, download het om de volledige inhoud te zien.
clock2Arduino
#include #include #include "FastLED.h"#if FASTLED_VERSION <3001000#error "Vereist FastLED 3.1 of hoger; controleer github voor de laatste code."#endif#define DATA_PIN 2#define LED_TYPE WS2811#define COLOR_ORDER RGB#define NUM_LEDS 96#define BRIGHTNESS 255CRGB leds[NUM_LEDS];//Cijfers kleurwaarden in RGBint r=255;int g=255;int b=255;const char* ESP_HOST_NAME ="esp -" + ESP.getFlashChipId();//Uw wifi-infoconst char* ssid ="Wifi_Name";const char* wachtwoord ="Password";//Uw tijdzoneint timezone =-5.5 * 3600;int dst =0; WiFiClient wifiClient; ongeldig connectWifi () { WiFi.begin (ssid, wachtwoord); Serial.print("Verbinding maken met "); Serieel.println(ssid); while (WiFi.status() !=WL_CONNECTED) { delay(500); Serieel.print("."); } Serieel.println(""); Serial.println("WiFi verbonden!"); Serial.println(WiFi.localIP()); Serial.println();}void setup() { Serial.begin(115200); vertraging (500); verbindenWifi(); Serieel.println(); Serial.println("\n\nVolgende Loop-Step:" + String(millis()) + ":"); configTime(tijdzone, dst, "pool.ntp.org", "time.nist.gov"); FastLED.addLeds(leds, NUM_LEDS) .setCorrection(TypicalLEDStrip) .setDither(HELDERHEID <255); FastLED.setBrightness(HELDERHEID);}void loop(){ time_t now =time(nullptr); struct tm* p_tm =lokale tijd(&nu); Serial.print("--------------------------------------------- ----\N"); Serial.print("Datum &Tijd:"); Serial.print(p_tm->tm_mday); Serieel.print("/"); Serial.print(p_tm->tm_mon + 1); Serieel.print("/"); Serial.print(p_tm->tm_year + 1900); Serieel.print(" "); int uur=p_tm->tm_uur; int minuut=p_tm->tm_min; if(uur>12) { uur=uur-12; } Serial.print(uur); Serial.print(":"); Seriële.afdruk (minuut); Serial.print(":"); Serial.println(p_tm->tm_sec); trots(); if(uur==0||uur==12) { uur12(); } if(uur==1) { uur1(); } if(uur==2) { uur2(); } if(uur==3) { uur3(); } if(uur==4) { uur4(); } if(uur==5) { uur5(); } if(uur==6) { uur6(); } if(uur==7) { uur7(); } if(uur==8) { uur8(); } if(uur==9) { uur9(); } if(uur==10) { uur10(); } if(hour==11) { hour11(); } if(minuut==0) { min0(); } if(minuut==1) { min1(); } if(minuut==2) { min2(); } if(minuut==3) { min3(); } if(minuut==4) { min4(); } if(minuut==5) { min5(); } if(minuut==6) { min6(); } if(minuut==7) { min7(); } if(minuut==8) { min8(); } if(minuut==9) { min9(); } if(minuut==10) { min10(); } if(minuut==11) { min11(); } if(minuut==12) { min12(); } if(minuut==13) { min13(); } if(minuut==14) { min14(); } if(minuut==15) { min15(); } if(minuut==16) { min16(); } if(minuut==17) { min17(); } if(minuut==18) { min18(); } if(minuut==19) { min19(); } if(minuut==20) { min20(); } if(minuut==21) { min21(); } if(minuut==22) { min22(); } if(minuut==23) { min23(); } if(minuut==24) { min24(); } if(minuut==25) { min25(); } if(minuut==26) { min26(); } if(minuut==27) { min27(); } if(minuut==28) { min28(); } if(minuut==29) { min29(); } if(minuut==30) { min30(); } if(minuut==31) { min31(); } if(minuut==32) { min32(); } if(minuut==33) { min33(); } if(minuut==34) { min34(); } if(minuut==35) { min35(); } if(minuut==36) { min36(); } if(minuut==37) { min37(); } if(minuut==38) { min38(); } if(minuut==39) { min39(); } if(minuut==40) { min40(); } if(minuut==41) { min41(); } if(minuut==42) { min42(); } if(minuut==43) { min43(); } if(minuut==44) { min44(); } if(minuut==45) { min45(); } if(minuut==46) { min46(); } if(minuut==47) { min47(); } if(minuut==48) { min48(); } if(minuut==49) { min49(); } if(minuut==50) { min50(); } if(minuut==51) { min51(); } if(minuut==52) { min52(); } if(minuut==53) { min53(); } if(minuut==54) { min54(); } if(minuut==55) { min55(); } if(minuut==56) { min56(); } if(minuut==57) { min57(); } if(minuut==58) { min58(); } if(minuut==59) { min59(); } if(minuut==60) { min60(); } FastLED.show(); FastLED.clear(); FastLED.show(); }void pride() { static uint16_t sPseudotime =0; statisch uint16_t sLastMillis =0; statisch uint16_t sHue16 =0; uint8_t sat8 =beatsin88 (87, 220, 250); uint8_t heldere diepte =beatsin88 (341, 96, 224); uint16_t helderheidthetainc16 =beatsin88( 203, (25 * 256), (40 * 256)); uint8_t msmultiplier =beatsin88(147, 23, 60); uint16_t hue16 =sHue16;//gHue * 256; uint16_t hueinc16 =beatsin88(113, 1, 3000); uint16_t ms =millis(); uint16_t deltams =ms - sLastMillis; sLastMillis =ms; sPseudotime +=deltams * msmultiplier; sHue16 +=deltams * beatsin88( 400, 5,9); uint16_t helderheidtheta16 =sPseudotime; for (uint16_t ik =0; ik   

Schema's


Productieproces

  1. Koekoeksklok
  2. Bewegingsgestuurde AWS IoT-knop
  3. GoPiGo v2 met Windows IoT
  4. Arduino pov vision-klok
  5. Kennis is kracht:koudsoldeerverbindingen zijn een puinhoop!
  6. Smart Plant IoT
  7. Infinity spiegelklok
  8. Wat is solderen? - Soorten en hoe te solderen?
  9. Gids voor golfsoldeerproblemen voor PCB's
  10. Soldeerproces begrijpen
  11. PCB-soldeerproces:verschillende soorten en essentiële bronnen besproken