Relative Content

Daily Archives: 2018年9月13日

Arduino NANO (7) ADS1115 for A/D

経緯 ADS1115を購入して、生体信号のAD変換に利用するつもりだが、うまくいかない( WeMos (b9) ADS1115 for A/D 参考)、正しい電圧が表示されない。 そこで、Arduino NANOのチュートリアルを探して、検証することに。 ハードウェア ADS1115とArduino NANOはI2Cで接続。 ソフトウェア 「参考1」コードそのまま。 #include <Wire.h> #include <Adafruit_ADS1015.h> Adafruit_ADS1115 ads; // Declare an instance of the ADS1115 int16_t rawADCvalue; // The is where we store the value we receive from the ADS1115 float scalefactor = 0.1875F; // This is the scale factor for the default +/- […]