2016年1月10日 星期日

esp8266 韌體更新

http://bbs.ai-thinker.com/forum.php?mod=viewthread&tid=984&extra=&highlight=%C4%C3%B5%BD&page=1

http://dominicm.com/flash-esp8266-wi-fi-module-firmware/

vcc 3.3v  使用arduino 供電進行韌體更新,須注意購買的esp8266版本
用 SSCOM 連線後 下AT COMMAND (AT COMMAND 必須為大寫!)

AT+RST

2nd boot version : 1.2
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size : 4Mbit
jump to run user1

SPI FLASH SIZE  : 4Mbit (512K)不可燒錄版本大於1.0的,會有問提!



GPIO15 , GPIO0  接 GND  , CH_PD 接 VCC 開啟燒錄程式後, 再接ESP8266電源,再按DOWNLOAD!




更新好韌體後,拔除電源, GPIO0 移除, 重新接電後即下AT COMMAND (SPEED:115200)
AT+GMR

AT version:0.21.0.0
SDK version:0.9.5

OK
不要更改 連線速率,改成9600 ESP8266 就不聽使喚了... (重新燒韌體即可還原)

2016年1月3日 星期日

blynk arduino record

/**************************************************************
 * Blynk is a platform with iOS and Android apps to control
 * Arduino, Raspberry Pi and the likes over the Internet.
 * You can easily build graphic interfaces for all your
 * projects by simply dragging and dropping widgets.
 *
 *   Downloads, docs, tutorials: http://www.blynk.cc
 *   Blynk community:            http://community.blynk.cc
 *   Social networks:            http://www.fb.com/blynkapp
 *                               http://twitter.com/blynk_app
 *
 * Blynk library is licensed under MIT license
 * This example code is in public domain.
 *
 **************************************************************
 *
 * This example shows how to use Arduino Ethernet shield (W5100)
 * to connect your project to Blynk.
 * Feel free to apply it to any other example. It's simple!
 *
 **************************************************************/

//#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include
#include
#include
#include
#include
#define dht_dpin 12
dht DHT;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
SimpleTimer timer;
void setup()
{
  Serial.begin(9600);
  //Blynk.begin(auth);
  // You can also specify server.
  // For more options, see BoardsAndShields/Arduino_Ethernet_Manual example
  Blynk.begin(auth, "192.168.1.252", 8442);
  //Blynk.begin(auth, IPAddress(192,168,1,100), 8888);
  //sensors.begin();

  timer.setInterval(1000,readTemp);
  digitalWrite(3, HIGH);
  digitalWrite(2, HIGH);
}

// Keep this flag not to re-sync on every reconnection
bool isFirstConnect = true;

// This function will run every time Blynk connection is established
BLYNK_CONNECTED() {
  if (isFirstConnect) {
    Blynk.syncAll();
    isFirstConnect = false;
  }
}
void loop()
{
  Blynk.run();
  timer.run();
 // sensors.requestTemperatures();
 // Serial.println(sensors.getTempCByIndex(0));
 // delay(2000);
}
void readTemp()
{
  // sensors.requestTemperatures();
  // float floatTempC = sensors.getTempCByIndex(0);
    //Serial.println(floatTempC);
   //char t_buffer[15];
   //dtostrf(floatTempC,8,9,t_buffer);
   DHT.read11(dht_dpin);
   Blynk.virtualWrite(0,String(DHT.temperature).substring(0,4)+"℃"); //dht11
   Blynk.virtualWrite(1,String(DHT.humidity).substring(0,2)+"%"); //dht11
   Blynk.virtualWrite(2,DHT.temperature);
  // Blynk.virtualWrite(3,DHT.humidity); //dht11
   //Blynk.virtualWrite(6,t_buffer);  //ds18b20
   //Serial.println (t_buffer);

}
缺少的地方登入後編輯文件, use html 即可看到

2015年5月7日 星期四

用vb script 取得 電腦名稱,ip,電腦廠牌型號序號

strComputer = "."
str_pcmodel = ""
str_serialnumber=""
str_hostname=""
str_outstring=""
str_username=""
str_regread=""
dim objshell
str_username = "username: " & CreateObject("WScript.Network").UserName & vbCrlf

Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_BIOS")
For each objBIOS in colBIOS
 
str_serialnumber = "PC SERIAL NUMBER: " & objBIOS.SerialNumber &vbCrlf
 
Next


Set colSettings = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
     str_pcmodel = "PC MODEL: " & objComputer.Model &vbCrlf
    str_hostname = "Host NAME: " & objComputer.Name &vbCrlf
   
 
 
Next

str_outstring = str_username & str_pcmodel & str_serialnumber & str_hostname

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
For Each IPConfig in IPConfigSet
  If Not IsNull(IPConfig.IPAddress) Then
  For Each strAddress in IPConfig.IPAddress
    str_outstring = str_outstring & "IP: " & strAddress &vbCrlf
  Next
  End If
Next

str_regread="HKEY_LOCAL_MACHINE\SOFTWARE\ATI\ACE\Apps\EEU\FILE"

Set objShell = WScript.CreateObject("WScript.Shell")

str_regread = "Owner: " & objShell.RegRead(str_regread) &vbCrlf

str_outstring = str_outstring & str_regread

'Wscript.Echo str_outstring
MsgBox str_outstring , vbOKOnly ,str_hostname

2012年12月15日 星期六

安裝FreeBSD 8.3 時出現 Unable to find node for /dev/ad4s1b in /dev 錯誤訊息

Unable to find device node for /dev/ad4s1b in /dev!
The creation of filesystems will be aborted.

這好像是GPT的問題! 可以用FreeBSD 9.0 的 memstick 開機進 life cd, 然後

# gpart show
應該可以看到 該硬碟 id  ex : ad0

# gpart destroy -F ad0

之後再用 gpart show 看,該硬碟應該就不見了! 再去重新安裝FreeBSD 應該就會成功了!
(在安裝FreeBSD之中有一個步驟==> 把硬碟磁區磁柱那邊,選no 讓freebsd 建立一般分割區,不建立GPT)

memo at 2012.12.15

2012年8月14日 星期二

WIN7 POWERPOINT 2012 沒有回應,WORD 滑鼠游標不停閃爍

解決方式:
               先用這個試試!
                 一點通 - 如何解決 Office 2007 / 2010 效能異常問題
                       http://support.microsoft.com/kb/2488238/zh-tw

再不行就用這個:
http://answers.microsoft.com/zh-hant/office/forum/office_2010-word/%E9%96%8B%E5%95%9Fword2010/84960bbd-c9b3-4bf0-a715-5c9513feceec?msgId=f7cb3931-decf-4958-b503-524aaba380e8


把印表機全部移除後測試POWERPOINT AND WORD 若正常,再將印表機一一裝回即可!