author
1Instructables1,258Views15CommentsJoined January 28th, 2010

Tell us about yourself!

Complete Your Profile
  • jmaxado commented on JON-A-TRON's instructable Perpetual Clock With Arduino1 year ago
    Perpetual Clock With Arduino

    Hello, Can you explain what you mean by nifty solution ? JMaxado

    View Instructable »
  • jmaxado commented on JON-A-TRON's instructable Perpetual Clock With Arduino1 year ago
    Perpetual Clock With Arduino

    I never got it to work with the NTP, so I found this way of doing it. I try to access some fake page on google, that will return 404 not found, and I extract the date and time from the reply HTML header. This will be UTC time, you can adjust them to your own time zone I believe the code is clear, but I am available to assist: #define SSID "Mama Dina" #define PASS "********" // My luggage has the same combination! #define DEST_HOST "google.com" #define DEST_IP "216.58.210.228" #define TIMEOUT 10000 // mS #define CONTINUE false #define HALT true #include SoftwareSerial Serial1 = SoftwareSerial(3, 2); char lf=10; //line feed character String readString, readString1; int x=0; //for counting line feeds // ******** SETUP ******** void setup() { Se...

    see more »

    I never got it to work with the NTP, so I found this way of doing it. I try to access some fake page on google, that will return 404 not found, and I extract the date and time from the reply HTML header. This will be UTC time, you can adjust them to your own time zone I believe the code is clear, but I am available to assist: #define SSID "Mama Dina" #define PASS "********" // My luggage has the same combination! #define DEST_HOST "google.com" #define DEST_IP "216.58.210.228" #define TIMEOUT 10000 // mS #define CONTINUE false #define HALT true #include SoftwareSerial Serial1 = SoftwareSerial(3, 2); char lf=10; //line feed character String readString, readString1; int x=0; //for counting line feeds // ******** SETUP ******** void setup() { Serial.begin(9600); // Communication with PC monitor via USB Serial1. begin(9600); // Communication with ESP8266 via 5V/3.3V level shifter // Serial1.setTimeout(TIMEOUT); Serial.println("ESP8266 Demo"); delay(2000); Serial.println("AT+RST"); Serial1.println("AT+RST"); show(); Serial1.println("AT+GMR"); show(); Serial1.println("AT+CWMODE=1"); show(); Serial1.println("AT+CIPMUX=0"); show(); String cmd="AT+CWJAP=\""; cmd+=SSID; cmd+="\",\""; cmd+=PASS; cmd+="\""; Serial1.println(cmd); show(); Serial.println("Finished!!!"); Serial1.println("AT+CIFSR"); show(); cmd = "AT+CIPSTART=\"TCP\",\""; cmd += DEST_IP; cmd += "\",80"; Serial1.println(cmd); show(); cmd = "GET /1.txt"; // this is the fake page that does not exist in Google cmd += DEST_HOST; cmd += "\r\n\r\n"; Serial1.print("AT+CIPSEND="); Serial1.println(cmd.length()); show(); Serial1.println(cmd); show(); } void loop(){ } //Shows the output from the ESP directly to the serial monitor. This is helpful for debugging void show(){      String keyword="Date:"; //this is the keyword we are searching on the response HTML header      byte current_char = 0;      byte keyword_length = keyword.length();      long deadline = millis() + TIMEOUT;      int temp=0;        readString="";        while(millis() < deadline){             if (Serial1.available()) {                   char ch = Serial1.read();                   Serial.write(ch);                   if (temp<200){                        temp++; readString += ch; }                   if (ch == keyword[current_char])                   if (++current_char == keyword_length) {                         Serial.println("Found it");                        Serial.println(current_char);                    }              }      }      int aux = readString.indexOf("Date: ");//Find the position of the word "Date:"      /*translations:      dia=day      Mes=month        Ano=year       Hora=hour      minuto=minutes      segundo=second      */      if (aux>0){             String dia=readString.substring(aux+11,(aux+13));             String mes=readString.substring(aux+14,(aux+17));             String ano=readString.substring(aux+18,(aux+22));             String hora=readString.substring(aux+23,(aux+25));             String minuto=readString.substring(aux+26,(aux+28));             String segundo=readString.substring(aux+28,(aux+31));             Serial.print("Dia:");             Serial.println(dia);             Serial.print("Mes:");             Serial.println(mes);             Serial.print("Ano:");             Serial.println(ano);             Serial.print("Hora:");             Serial.println(hora);            Serial.print("Minuto:");            Serial.println(minuto);            Serial.print("segundo:");            Serial.println(segundo);       } } //___________________________________________________________________________________________________ // Read characters from WiFi module and echo to serial until keyword occurs or timeout. boolean echoFind(String keyword) {      byte current_char = 0;      byte keyword_length = keyword.length(); // Fail if the target string has not been sent by deadline.      long deadline = millis() + TIMEOUT;      while(millis() < deadline) {            if (Serial1.available()) {                 char ch = Serial1.read();                 Serial.write(ch);                 if (ch == keyword[current_char])                 if (++current_char == keyword_length) {                        Serial.println(); return true;                  }             }       }       return false; // Timed out }

    View Instructable »
  • jmaxado commented on JON-A-TRON's instructable Perpetual Clock With Arduino1 year ago
    Perpetual Clock With Arduino

    Just a suggestion. I recently made a nixie tube clock, and I added a ESP8266 and my clock gets the time directly from the web. when it starts and every 5 hours, just in case it misses some minutes. Quite simple code, I can provide it in case you need. great work Jose Machado

    View Instructable »
  • jmaxado commented on chr's instructable LED Cube 8x8x83 years ago
    LED Cube 8x8x8

    Hello, Now I got it. The idea to use the ULN2803 is to avoid using transistors correct ?What do you mean that I need to set the fuse for the ATMEGA32 ?I will be using arduino board, either Nano or mega. Thanks for your reply Jose

    View Instructable »
  • jmaxado commented on chr's instructable LED Cube 8x8x83 years ago
    LED Cube 8x8x8

    Hello DongP1, Can you share a more clear schematic how did you used the ULN2803 and explain what changes have you done to the code ?Thanks

    View Instructable »