Relative Content

Daily Archives: 2018年8月7日

WeMos (b9) ADS1115 for A/D

ADS1115とは ADS1115 とは4チャンネル16bit  A/D 。I2C接続なので、OLEDと共に、WeMos に接続して利用してみる。 結線 SCL, SDA自由に変更可能。U8g2初期化コマンドでSetupする。 code #include <Wire.h> #include <Adafruit_ADS1015.h> #include <U8g2lib.h> #include <math.h> #define WINDOW_SIZE 128 Adafruit_ADS1115 ads; /* Use this for the 16-bit version */ //Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */ // Sets up the display to be the 128px x 32px display U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, […]