Arduino C TM structure

struct tm *ptm = gmtime ((time_t *)&epochTime);
int monthDay = ptm->tm_mday;
sprintf(cdmy,” %02d-%02d-%02d “,ptm->tm_mday,ptm->tm_mon+1,ptm->tm_year+2443);
sprintf(chm,”%02d%02d”,ptm->tm_hour,ptm->tm_min);

MemberTypeMeaningRange
tm_secintseconds after the minute0-61*
tm_minintminutes after the hour0-59
tm_hourinthours since midnight0-23
tm_mdayintday of the month1-31
tm_monintmonths since January0-11
tm_yearintyears since 1900
tm_wdayintdays since Sunday0-6
tm_ydayintdays since January 10-365
tm_isdstintDaylight Saving Time flag

ESP8266 NODEMCU TM1637 NTP

#include <NTPClient.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <TM1637Display.h> //

#define CLK D2 // Define the connections pins:
#define DIO D3

TM1637Display display = TM1637Display(CLK, DIO); // Create display object of type TM1637Display:

const char *ssid = “XXXX”;
const char *password = “xxxxx”;

//const long utcOffsetInSeconds = 19802;
const long utcOffsetInSeconds = 25200;

// Define NTP Client to get time
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, “1.th.pool.ntp.org”, utcOffsetInSeconds);

void setup(){
Serial.begin(9600);
Serial.println();
// Begin serial communication at a baud rate of 9600:

WiFi.begin(ssid, password);

while ( WiFi.status() != WL_CONNECTED ) {
delay ( 500 );
Serial.print ( “.” );
}

timeClient.begin();
}

void loop() {
int A,B;
display.setBrightness(7); // Set the brightness:

timeClient.update();
unsigned long epochTime = timeClient.getEpochTime(); //get date
Serial.print(“Epoch Time: “);
Serial.println(epochTime);

int currentHour = timeClient.getHours();
Serial.print(“Hour: “);
Serial.println(currentHour);

int currentMinute = timeClient.getMinutes();
Serial.print(“Minutes: “);
Serial.println(currentMinute);
//Get a time structure

struct tm *ptm = gmtime ((time_t *)&epochTime);
int monthDay = ptm->tm_mday;
Serial.print(“Month day: “);
Serial.print(monthDay);
display.showNumberDec(monthDay, false, 2, 1);
delay(3000);
display.clear();
int currentMonth = ptm->tm_mon+1;
Serial.print(” Month: “);
Serial.print(currentMonth);
display.showNumberDec(currentMonth, true, 2, 1);
delay(3000);
display.clear();

//int currentYear = ptm->tm_year+1900;
int currentYear = ptm->tm_year+2443;
Serial.print(” Year: “);
Serial.println(currentYear);
display.showNumberDec(currentYear, false, 4, 0);
delay(3000);
display.clear();

A = timeClient.getHours() * 100 + timeClient.getMinutes();
B = timeClient.getSeconds();

if((B % 2) == 0)
{
display.showNumberDecEx(A, 0b01000000 , false, 4, 0);
}
else
{
display.showNumberDecEx(A, 0b00000000 , false, 4, 0);
}

delay (3000);
display.clear();

}

.

NODEMCU 4DIGIT TM1637 DHT11

#include <NTPClient.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <TM1637Display.h> //
#include <DHT.h>

#define CLK D2 // Define the connections pins:
#define DIO D3
#define DHTPIN D5 // Pin sensor is connected to

// Create degree Celsius symbol:
const uint8_t celsius[] = {
// SEG_A | SEG_B | SEG_F | SEG_G, // Circle
SEG_G | SEG_E | SEG_D // c
};
const uint8_t hum[] = {
// SEG_A | SEG_B | SEG_F | SEG_G, // Circle
SEG_F | SEG_E | SEG_G | SEG_C // h
};

// Set DHT type, uncomment whatever type you’re using!
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)

float temp_c = 0.0;
float humi = 0.0;
TM1637Display display = TM1637Display(CLK, DIO); // Create display object of type TM1637Display:
DHT dht = DHT(DHTPIN, DHTTYPE);

const char *ssid = “xxxx”;
const char *password = “yyyyyy”;

//const long utcOffsetInSeconds = 19802;
const long utcOffsetInSeconds = 25200;

// Define NTP Client to get time
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, “1.th.pool.ntp.org”, utcOffsetInSeconds);

void setup(){
Serial.begin(9600);
Serial.println();
Serial.println(“DHTxx test!”);
dht.begin();
// Begin serial communication at a baud rate of 9600:

WiFi.begin(ssid, password);

while ( WiFi.status() != WL_CONNECTED ) {
delay ( 500 );
Serial.print ( “.” );
}

timeClient.begin();
}

void loop() {
int A,B;

// Read the temperature as Celsius and Fahrenheit:
temp_c = dht.readTemperature();
humi = dht.readHumidity();

// print both to serial console
Serial.printf(“%2.2fC %2.2f%%\n”, temp_c, humi);

timeClient.update();
display.setBrightness(7); // Set the brightness:

A = timeClient.getHours() * 100 + timeClient.getMinutes();
B = timeClient.getSeconds();

if((B % 2) == 0)
{
display.showNumberDecEx(A, 0b01000000 , false, 4, 0);
}
else
{
display.showNumberDecEx(A, 0b00000000 , false, 4, 0);
}

delay (3000);
display.clear();
display.showNumberDecEx(static_cast<int>(temp_c * 100), 0x40);
display.setSegments(celsius, 1, 3);
delay (30000);
display.clear();
display.showNumberDecEx(static_cast<int>(humi * 100), 0x40);
display.setSegments(hum, 1, 3);
delay (30000);
display.clear();

}

ESPEasy ESP8266 ESP12E DS18B20

เมื่อตั้งค่า Sensor  GPIO <- TX ถูกต้องแล้ว

ให้ดู log ว่าแสดง DS: อะไรหรือไม่

ที่พบคือเมื่อต่อขาถูกต้องแล้ว Enable พบว่าแสดงเป็น

DS : Cannot set Resloution 

และ Device Address ไม่แสดงอะไร

ผมลองปรับ Device Resolution bit ไปที่ 12 แล้ว submit

พบว่า Device Address  แสดง Address ออกมา เมื่อเลือกแล้ว submit จะแสดงอุณหภูมิออกมาได้



Windows Version From File

Windows 7 / 8 / 8.1 / 10 C:\Windows\System32\license.rtf
ดูที่ Last updated
เช่น Last updated June 2018

Windows XP – C:\Windows\System32\eula.txt

10.0.19041.746

[10.0.19041.746]
LocalOnlyPatch.x64=1
LocalOnlyOffset.x64=88F31
LocalOnlyCode.x64=jmpshort
SingleUserPatch.x64=1
SingleUserOffset.x64=0CB22
SingleUserCode.x64=Zero
DefPolicyPatch.x64=1
DefPolicyOffset.x64=18A15
DefPolicyCode.x64=CDefPolicy_Query_eax_rcx
SLInitHook.x64=1
SLInitOffset.x64=1D5BC
SLInitFunc.x64=New_CSLQuery_Initialize

[10.0.19041.746-SLInit]
bInitialized.x64 =106028
bServerSku.x64 =10602C
lMaxUserSessions.x64 =106030
bAppServerAllowed.x64 =106038
bRemoteConnAllowed.x64=106040
bMultimonAllowed.x64 =106044
ulMaxDebugSessions.x64=106048
bFUSEnabled.x64 =10604C

EXE info

ใช้ว่า EXE สร้างโดยโปรแกรมอะไร

กด แฟ้มเลือกไฟล์ที่ต้องการทราบ

จากรูป ไฟล์ Finance.exe สร้างจาก Visual C++ 7.0 ต้องใช้ library ดังกล่าวจึงจะทำงานได้ download ได้ที่

https://github.com/ExeinfoASL/ASL/raw/master/exeinfope.zip

Ref:http://exeinfo.byethost18.com/?i=1