2017年1月1日 星期日

ESP8266 ESP-12E Test Boards A0 ADC Test

0V-1V ==> 0-1024 10bit ADC 
ESP8266 ESP-12E Test Boards A0 ADC

ADC Specifications

When referring to the ESP ADC pin you will often hear these different terms interchangeably:
  • ADC (Analog-to-digital Converter)
  • TOUT
  • Pin6
  • A0
  • Analog Pin 0
All these terms refer to the same pin in the ESP8266 that is highlighted in the next section.
Currently, TOUT (Pin6) has a 10-bit precision and its input voltage range is 0 to 1.0 V when TOUT is connected to an external circuit.
參考 http://randomnerdtutorials.com/esp8266-adc-reading-analog-values-with-nodemcu/









//Tools -> Board -> Generic ESP8266 Module

//ESP8266 ESP-12E Test Boards A0 ADC Test Program
// The CDS (LDR is cutted off) on Active
//AO input Voltage Rabge 0-1V 
const int LDR = A0;

void setup() 
{
    Serial.begin(9600);
    pinMode(LDR, INPUT);
}

void loop()
{
    Serial.print("LDR: ");
    Serial.println(analogRead(LDR));   // 0V-1V ==> 0-1024 10bit ADC 
    delay(500);
}

沒有留言:

張貼留言

RFID TI 培訓影片系列

RFID TI 培訓影片系列  https://www.ti.com/zh-tw/video/series/rfid.html 培訓影片系列 RFID 隨著創新技術日益發展,RFID 和 RF 術語越來越容易讓人混淆。本訓練系列詳細介紹了使用案例、權衡技術優缺點,讓您清楚知道該選...