ArduinoJoystickLibrary icon indicating copy to clipboard operation
ArduinoJoystickLibrary copied to clipboard

ADS1115 ADC Issues

Open cartman-sp69 opened this issue 4 years ago • 0 comments

Description of Issue

I have hooked up an ADS1115 ADC to try and get 15 to 16 bit input resolution, however when I run the test only the last portion of the pot is read.

Technical Details

  • Pro Micro
  • Windows 10
  • 1.8.3

Sketch File that Reproduces Issue

#include <Wire.h> #include <Adafruit_ADS1X15.h> #include <Joystick.h>

Adafruit_ADS1115 ads;

Joystick_ Joystick(0x12, JOYSTICK_TYPE_JOYSTICK, 0, 0,false,false,false,true,true,true,false,false,false,false,false);

const bool initAutoSendState = true;

int16_t rx_, ry_, rz_;

void setup() {

Joystick.begin();

ads.begin(0x48); }

void loop() {

rx_ = ads.readADC_SingleEnded(0); Joystick.setRxAxis(rx_);

ry_ = ads.readADC_SingleEnded(1); Joystick.setRyAxis(ry_);

rz_ = ads.readADC_SingleEnded(2); Joystick.setRzAxis(rz_); delay(50);

Do you have any suggestions as to what I can do to fix this?

Thanks

cartman-sp69 avatar Apr 30 '21 06:04 cartman-sp69