Svetelektro.com

Svetelektro.com

Meno:
Heslo:
SVETELEKTRO • Bud├şk

Bud├şk

M├┤j v├Żrobok - MINI

Moderátori: psichac, Moderátori

Bud├şk

Odosla┼ąod seto » 31 Jan 2019, 12:37

Kto by chcel m├┤┼że si vyhotovi┼ą tak├ęhoto retro "Bastarda".D├ívam na pos├║denie.
Pr├şlohy
bud├şk.jpg
seto
St├íly ─Źlen
St├íly ─Źlen
Pr├şspevky: 442
Zalo┼żen├Ż: 20.01.2011
Bydlisko: Niekde pri Modre
Karma: 12

Re: Bud├şk

Odosla┼ąod 5ko » 31 Jan 2019, 16:43

Par├ída, teraz je to modern├ę, tak├ęto hybridy zo stariny, u┼ż tam ch├Żba iba to klad├şvko,to si mal dorie┼íi┼ą mechanicky a bolo by to super.
/dal by som tam vibra─Źn├Ż motor─Źek z mobilu a prevod na kladivko.../
:thumbup:
Lenivos┼ą je matka pokroku.Leniv├Ż ─Źlovek rozm├Ż┼íla,ako by si robotu u─żah─Źil a tak nie─Źo vyn├íjde.
Ku ka┼żd├ęmu ─Ź├şnskemu v├Żrobku by mali pribali┼ą jedn├ęho ─Ź├ş┼łana, aby som ho mohol nakopa┼ą do ....,ked sa to pokaz├ş.
5ko
Obr├ízok pou┼ż├şvate─ża
Power user
Power user
Pr├şspevky: 8397
Vek: 63.14
Zalo┼żen├Ż: 18.02.2010
Bydlisko: Banská Bystrica
Karma: 98

Re: Bud├şk

Odosla┼ąod zylo64 » 31 Jan 2019, 16:50

seto nap├şsal:Kto by chcel m├┤┼że si vyhotovi┼ą tak├ęhoto retro "Bastarda".D├ívam na pos├║denie.

Odkia─ż si zobral ten hodinov├Ż "stroj─Źek"? M├┤┼że┼í da┼ą nejak├ę info?
zylo64
St├íly ─Źlen
St├íly ─Źlen
Pr├şspevky: 315
Zalo┼żen├Ż: 21.04.2013
Bydlisko: Michalovce
Karma: 2

Re: Bud├şk

Odosla┼ąod KaRaQ94 » 31 Jan 2019, 17:38

┼żeby nie─Źo tak├ęto ?? https://www.ebay.com/itm/4-Bits-Digital-Clock-Kits-W-PCB-For-Soldering-Practice-Kit-Hobbies/283265973870?epid=2169640752&hash=item41f3f7be6e:g:SoQAAOSwMxJb8VaV

a ako "pozadie" by som pou┼żil plo┼í├ík z grafickej alebo z telev├şzora, proste ─Źo m├í "nahusto" s├║─Źiastky aby to dobre vyzeralo, presne tak ako to chalanisko spravil
Lep┼íie je by┼ą akt├şvny ako r├ídioakt├şvny.

V silnopr├║de sa chyba toleruje iba raz...

http://lmgtfy.com/

Inak volám sa Tomáš ...
KaRaQ94
Obr├ízok pou┼ż├şvate─ża
Zasl├║┼żil├Ż ─Źlen
Zasl├║┼żil├Ż ─Źlen
Pr├şspevky: 1030
Vek: 24.57
Zalo┼żen├Ż: 14.02.2010
Bydlisko: Bratislava
Karma: 2

Re: Bud├şk

Odosla┼ąod romiadam » 31 Jan 2019, 18:53

KaRaQ94,

No to je presne ono, z ebay...
Prep├í─Źte mi za diakritiku a preklepy - v├Ą─Ź┼íinou p├ş┼íem z mobilu a ENG klavesnice.
(v├Żroky nemenovan├ęho ─Źlena f├│ra:) ...z├íklady elektrotechniky ovl├ídam dokonale, tak napr. tak├Ż tyristor neviem ako presne funguje
romiadam
Obr├ízok pou┼ż├şvate─ża
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 2495
Zalo┼żen├Ż: 09.04.2008
Bydlisko: Wicklow, Irsko
Karma: 13

Re: Bud├şk

Odosla┼ąod pocitujlasku » 31 Jan 2019, 20:50

ja som si hodinky urobil z tohoto + esp8266-01 ktore vies skyt za ten modul a mas pekne digitalny synchronizovane s internetom :) Nic nevycnieva, a vies si to dodekorovat ako chces.
Pr├şlohy
predna strana.jpg
zadna strana.jpg
Intel, Nvidia, Ubuntu, Firefox, Asus, Nissan, Jelinek 52%, Metal
---------------------------------------------------------------------------------------------
Jedn├şm z nejv─Ťt┼í├şch projev┼» ned┼»v─Ťry v Boha je hromosvod na kostele.
pocitujlasku
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 4405
Vek: 36.04
Zalo┼żen├Ż: 20.07.2007
Bydlisko: Poprad
Karma: 18

Re: Bud├şk

Odosla┼ąod seto » 31 Jan 2019, 21:10

Stavebnicu hod├şn som k├║pil na https://www.izar.sk/stavebnice--diy/.
seto
St├íly ─Źlen
St├íly ─Źlen
Pr├şspevky: 442
Zalo┼żen├Ż: 20.01.2011
Bydlisko: Niekde pri Modre
Karma: 12

Re: Bud├şk

Odosla┼ąod deepspace » 31 Jan 2019, 21:45

Pekná práca :) ..
deepspace
St├íly ─Źlen
St├íly ─Źlen
Pr├şspevky: 375
Zalo┼żen├Ż: 18.05.2017
Bydlisko: Bratislava
Karma: 2

Re: Bud├şk

Odosla┼ąod amater63 » 31 Jan 2019, 22:18

Taky souhlas jak recilovat retro. :confused: .Ale za┼Öad├şm to zde.Hled├ím jek n─Ťjak├Ż p├ín postavil dital hodiny pouze z elektronek.M─Ťl to proracovan├ę ,no kr├ísn├ę pod├şv├ín├ş.J├í jsem to sem d├íval,ale nenajdu. (yotube ) D─Ťkuji
amater63
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 2193
Zalo┼żen├Ż: 02.05.2016
Bydlisko: Morava-─Ź.r.
Karma: 8

Re: Bud├şk

Odosla┼ąod Hop377 » 01 Feb 2019, 00:19

Hop377
Obr├ízok pou┼ż├şvate─ża
St├íly ─Źlen
St├íly ─Źlen
Pr├şspevky: 380
Vek: 4.99
Zalo┼żen├Ż: 13.12.2010

Re: Bud├şk

Odosla┼ąod fery66 » 01 Feb 2019, 07:54

seto nap├şsal:Kto by chcel m├┤┼że si vyhotovi┼ą tak├ęhoto retro "Bastarda".D├ívam na pos├║denie.

"Zav├í┼ła" to steampunkom. To m├┤┼żem! :thumbup: Ale chcelo by to e┼íte "doladi┼ą"...
fery66
Obr├ízok pou┼ż├şvate─ża
Pokro─Źil├Ż ─Źlen
Pokro─Źil├Ż ─Źlen
Pr├şspevky: 997
Zalo┼żen├Ż: 04.10.2009
Bydlisko: NR
Karma: 13

Re: Bud├şk

Odosla┼ąod alzo » 01 Feb 2019, 10:00

pocitujlasku:

M┼»┼że┼í d├ít k dispozici program a zapojen├ş pro tv├ę hodiny?
alzo
Obr├ízok pou┼ż├şvate─ża
Okoloid├║ci
Okoloid├║ci
Pr├şspevky: 22
Zalo┼żen├Ż: 07.11.2010
Karma: 0

Re: Bud├şk

Odosla┼ąod pocitujlasku » 01 Feb 2019, 11:14

mozem, ale je narychlo zbuchany a priznavam, ze nic noc kvalita. V principe sa pripojim na wifi, a vysle na ntp udp dotaz, spracuje odpoved - zosynchronizuje cas na arduine. a to robi raz za niekolko hodin.
+ mam tam vychytavky, ako jednoducha stranka s configom, ak sa nepodari pripojit na wifi, tak sa prepne na AP a caka na nastavenie a ciastocne prepojenie s mojim inteligentnym systemom. A teraz pozeram, ze tam mam aj ak najde wifi bez hesla, tak sa tam pripoji :)
na ovladanie displeja pouzivam kniznicu TM1637Display (inspiracia aj na tento stranke
K├│d: Vybra┼ą v┼íetko
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <TM1637Display.h>
#include <Ticker.h>
#include <TimeLib.h>
#include <ESP8266WebServer.h>
#include <EEPROM.h>

const int NTP_PACKET_SIZE = 64;
const uint8_t INIT[] = { SEG_A, SEG_A, SEG_A , SEG_A };
const uint8_t DONE[] = { SEG_D, SEG_D, SEG_D , SEG_D };
const uint8_t SCAN[] = { SEG_G, SEG_G, SEG_G , SEG_G };
const uint8_t SCAN2[] = { SEG_A | SEG_B | SEG_F, SEG_A | SEG_B | SEG_F, SEG_A | SEG_B | SEG_F, SEG_A | SEG_B | SEG_F };
const uint8_t DONE2[] = { SEG_C | SEG_D | SEG_E, SEG_C | SEG_D | SEG_E, SEG_C | SEG_D | SEG_E, SEG_C | SEG_D | SEG_E };
const uint8_t AP[] = { SEG_G, SEG_A | SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, SEG_A | SEG_B | SEG_E | SEG_F | SEG_G, SEG_G };

char hname[]="wificlock";

struct eConfig {
    char validConf[1];
    char ntpServer[50];
    char ssid[20];
    char pass[20];
    char ssid2[20];
    char rpass[20];
    int timeZone;
    bool dayLight;
    int brightness;
    int timeout;
    int syncInt;
};

eConfig Config;

WiFiUDP udp;
time_t lastSync=0;
String es="";
bool isAP;
bool sync=false;
int cnt=0;
String webPage="";
String webPageSave="";
TM1637Display disp(2, 0);
ESP8266WebServer server(80);

String AddLeadZero(int inp) {
  return ((inp<10)?"0":"")+(String)inp;
}

String formatDT(time_t dt) {
   return AddLeadZero(day(dt))+"."+AddLeadZero(month(dt))+"."+AddLeadZero(year(dt))+" "+AddLeadZero(hour(dt))+":"+AddLeadZero(minute(dt))+":"+AddLeadZero(second(dt)); 
}

void EEPROMdata(int act) {
  if (act==0) { //read from eeprom
    EEPROM.begin(512);
    EEPROM.get(0,Config);
    if (!Config.validConf=='X') {
      strcpy(Config.ntpServer,"0.europe.pool.ntp.org");
      strcpy(Config.ssid,"");
      strcpy(Config.pass,"");
      strcpy(Config.rpass,"");
      Config.timeZone=1;
      Config.dayLight=0;
      Config.brightness=15;
      Config.timeout=15;
      Config.syncInt=6;
      EEPROMdata(1);
      }
    } else if (act==1) { //save to eeprom
    EEPROM.begin(512);
    Config.validConf[0]='X';
    EEPROM.put(0,Config);
    EEPROM.commit();
    delay(100);
  }
}

unsigned long sendNTPpacket()
{
  byte data[NTP_PACKET_SIZE];
  IPAddress ntpServerIP;
  data[0] = 0b11100011;   // LI, Version, Mode
  data[1] = 0;     // Stratum, or type of clock
  data[2] = 6;     // Polling Interval
  data[3] = 0xEC;  // Peer Clock Precision
  data[12] = 49;
  data[13] = 0x4E;
  data[14] = 49;
  data[15] = 52;
  WiFi.hostByName(Config.ntpServer, ntpServerIP);
  udp.beginPacket(ntpServerIP, 123); //NTP requests are to port 123
  udp.write(data,NTP_PACKET_SIZE);
  udp.endPacket();
  delay(100);
}

bool connectWifi(char apname[20],char appass[20],int tm) {
    int cnt=0;
    WiFi.mode(WIFI_STA);
    WiFi.begin(apname, appass);
    while ((WiFi.status() != WL_CONNECTED)and(cnt<(10*tm))) { delay(100); cnt++; }
    return WiFi.status() == WL_CONNECTED;
}

bool wifiConnect(bool apmode) {
  bool ret=false;
  if (apmode==false) {
    disp.setSegments(SCAN);
    ret=connectWifi(Config.ssid, Config.pass,Config.timeout);
    if (ret==false) {
      delay(50);
      disp.setSegments(SCAN2);
      int n = WiFi.scanNetworks();
      int i=0;
      while (i<n) {
        if (WiFi.encryptionType(i) == ENC_TYPE_NONE) {
          char ssidcha[20];
          char passcha[20];
          WiFi.SSID(i).toCharArray(ssidcha,WiFi.SSID(i).length()+1);
          ret=connectWifi(ssidcha,passcha,Config.timeout);
          if (ret==true) { break;}
        }
        i++;
      }
      disp.setSegments(DONE2);
    } else  { disp.setSegments(DONE); }
  }

  if ((ret==false || apmode==true)) {
      disp.setSegments(AP);
      WiFi.softAP(hname,Config.rpass);
      ret=true;
  } else {
      udp.begin(2048);
      sync=false;
      ret=false;
  }
  return ret;
  delay(100);
}


void setup() {
  isAP=true;

  Serial.begin(9600);
  EEPROMdata(0);
  disp.setBrightness(Config.brightness);
  disp.setSegments(INIT);
  MDNS.begin(hname);
  MDNS.addService("http", "tcp", 80);
  isAP=wifiConnect(!Config.validConf=='X');
  delay(1000); //lebo inak to nejde
  server.on("/", [](){   
    webPage ="<!DOCTYPE html><html><head><meta charset='utf-8' /><title>Wifi Clock ver. 1.0</title>";
    webPage+="<style>table { border: 0px solid black;} th,td { border: 0px; padding: 0px;} th {text-align: right; } .title {text-align: left; color: green; padding: 15px;} input {border: 1px solid black; width: 200px;} .err {color: red; }</style>";
    webPage+="<script> var items = ['ct',1,60,'si',1,24,'br',8,16,'tz',-12,12]; function validate() {var res=true; var inputs = document.getElementsByTagName('input'); for (i=0;i<inputs.length;++i) {var p=items.indexOf(inputs[i].name); if (p>-1) { var e=document.getElementById(inputs[i].name+'v'); e.innerHTML=''; var v=parseInt(inputs[i].value); if (!((v>=items[p+1])&&(v<=items[p+2]))) { res=false; e.innerHTML='Only number from interval '+items[p+1].toString()+'..'+items[p+2].toString();} } } return res;}</script>";
    webPage+="</head><body><form action='/save' method='POST' onsubmit='return validate();'><table><tr><th colspan='3' class='title'>Wifi Client settings</th></tr>";
    webPage+="<tr><th>SSID: </th><td><input type='text' name='cssid' value='"+(String)Config.ssid+"' maxlength='20'></td></tr>";
    webPage+="<tr><th>Password: </th><td><input type='password' name='cpass' value='"+(String)Config.pass+"' maxlength='20'></td></tr>";
    webPage+="<tr><th>Password recovery: </th><td><input type='password' name='rpass' value='"+(String)Config.rpass+"' maxlength='20'></td></tr>";
    webPage+="<tr><th colspan='3' class='title'>General settings</th></tr>";
    webPage+="<tr><th>NTP server:</th><td><input type='text' name='ntp' value='"+(String)Config.ntpServer+"' maxlength='50'></td></tr>";
    webPage+="<tr><th>Connect timeout [second]: </th><td><input type='text' name='ct' value='"+(String)Config.timeout+"' maxlength='3'></td><td class='err' id='ctv'></td></tr>";
    webPage+="<tr><th>Sync interval [hour]: </th><td><input type='text' name='si' value='"+(String)Config.syncInt+"' maxlength='3'></td><td class='err' id='siv'></td></tr>";
    webPage+="<tr><th>TimeZone: </th><td><input type='text' name='tz' value='"+(String)Config.timeZone+"' maxlength='3'></td><td class='err' id='tzv'></td></tr>";
    webPage+="<tr><th>DayLight: </th><td><input type='checkbox' name='dl' value='1' "+(String)(Config.dayLight==1?"checked='checked'":"")+"></td></tr>";
    webPage+="<tr><th>Brightness [1..15]: </th><td><input type='text' name='br' value='"+(String)Config.brightness+"' maxlength='3'></td></tr>";
    webPage+="<tr><th>Last sync: </th><td>"+formatDT(lastSync)+"</td></tr>";
    webPage+="<tr><td></td><td><br><input type='submit' name='go' value='Save'></td></tr>";
    webPage+="</table></form></body></html>";
    server.send(200, "text/html", webPage);
    delay(100);
    });
  server.on("/save", [](){
    webPageSave = "<!DOCTYPE html><html><head><meta charset='utf-8' /><meta http-equiv='refresh' content='4; url=/'></head><body><h1>Saved... redirecting</h1></body></html>";
    server.send(200, "text/html", webPageSave);
    Config.dayLight=0;
    for (int i=0; i<server.args(); i++) {
      if (server.argName(i)=="cssid")                   { server.arg(i).toCharArray(Config.ssid,server.arg(i).length()+1); }
        else if (server.argName(i)=="cpass")            { server.arg(i).toCharArray(Config.pass,server.arg(i).length()+1); }
          else if (server.argName(i)=="rpass")          { server.arg(i).toCharArray(Config.rpass,server.arg(i).length()+1); }
            else if (server.argName(i)=="ntp")          { server.arg(i).toCharArray(Config.ntpServer,server.arg(i).length()+1); }
              else if (server.argName(i)=="ct")         { Config.timeout=server.arg(i).toInt(); }
                else if (server.argName(i)=="si")       { Config.syncInt=server.arg(i).toInt(); }
                  else if (server.argName(i)=="tz")     { Config.timeZone=server.arg(i).toInt(); }
                    else if (server.argName(i)=="dl")   { Config.dayLight=server.arg(i).toInt(); }
                      else if (server.argName(i)=="br") { Config.brightness=server.arg(i).toInt(); }
      delay(100);
    }
    EEPROMdata(1);   
    disp.setBrightness(0);
    delay(100);
    ESP.restart();
  });
  server.begin();
  delay(100);
}

void loop() {
  server.handleClient();
  int noBytes = udp.parsePacket();
  if (noBytes>0) {
    byte data[NTP_PACKET_SIZE];
    time_t datetime;
    unsigned long secsSince1900;
    udp.read(data,noBytes);
    secsSince1900 =  (unsigned long)data[40] << 24;
    secsSince1900 |= (unsigned long)data[41] << 16;
    secsSince1900 |= (unsigned long)data[42] << 8;
    secsSince1900 |= (unsigned long)data[43];
    datetime=secsSince1900 - 2208988800UL + ((Config.timeZone+Config.dayLight) * SECS_PER_HOUR);
    setTime(hour(datetime),minute(datetime),second(datetime),day(datetime),month(datetime),year(datetime));
    lastSync=now();
    sync=true;
  }
 
  if (isAP==false) {
    if ((lastSync+(3600*Config.syncInt)<(now()))||sync==false) {
      sendNTPpacket();
    }
    if (sync==true) {
      disp.setSegments( new byte[4] {disp.encodeDigit(hour()/10),disp.encodeDigit(hour()%10)+(second()%2==0?(WiFi.status()==WL_CONNECTED?128:0):0),disp.encodeDigit(minute()/10),disp.encodeDigit(minute()%10) } );
    }
  }
  delay(500);
}
Intel, Nvidia, Ubuntu, Firefox, Asus, Nissan, Jelinek 52%, Metal
---------------------------------------------------------------------------------------------
Jedn├şm z nejv─Ťt┼í├şch projev┼» ned┼»v─Ťry v Boha je hromosvod na kostele.
pocitujlasku
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 4405
Vek: 36.04
Zalo┼żen├Ż: 20.07.2007
Bydlisko: Poprad
Karma: 18

Re: Bud├şk

Odosla┼ąod alzo » 01 Feb 2019, 12:27

D├şky, ale tohle ned├ím :(
alzo
Obr├ízok pou┼ż├şvate─ża
Okoloid├║ci
Okoloid├║ci
Pr├şspevky: 22
Zalo┼żen├Ż: 07.11.2010
Karma: 0

Re: Bud├şk

Odosla┼ąod pocitujlasku » 01 Feb 2019, 13:03

klikni na ten odkaz, tam je ovladanie toho displeja. A k nemu si uz pozliepas ntp synchro (na nete je kopec navodou) a pripojenie na wifi.
Intel, Nvidia, Ubuntu, Firefox, Asus, Nissan, Jelinek 52%, Metal
---------------------------------------------------------------------------------------------
Jedn├şm z nejv─Ťt┼í├şch projev┼» ned┼»v─Ťry v Boha je hromosvod na kostele.
pocitujlasku
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 4405
Vek: 36.04
Zalo┼żen├Ż: 20.07.2007
Bydlisko: Poprad
Karma: 18


Nasp├Ą┼ą na M├┤j v├Żrobok - MINI

Kto je pr├ştomn├Ż

U┼ż├şvatelia prezeraj├║ci si toto f├│rum: kelso a 2 host├ş.

Forums ©
Autor str├ínky je Ondrej Z├ívodsk├Ż(zawin), o graficky design sa star├í ─Żubo┼í Fabo(BUFU).

TOPlist

Powered by Copyright © UNITED-NUKE CMS. All Rights Reserved.
─îas potrebn├Ż k spracovaniu str├ínky 0.64 sek├║nd