Tested example sketch from Adafruit ADS1X15 library, uploaded to leonardo and tested in serial monitor. Runs fine.
Created a small sketch to get readings and set joystick axis's to values, doesn't upload. Seems to disconnect twice and then stay on uploading. After about 20 seconds, get "Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload" error.
Reuploaded the example sketch fine and tested, so the problem has to be with the sketch, or joystick lib. Messed around, disabling things, changing delay etc, nothing seems to make it upload.
Did try the setAxisRange on all three, but no change.
Technical Details
Arduino Leonardo
Windows 10
Arduino IDE 1.8.8
Sketch File that Reproduces Issue
#include <Joystick.h>
#include <Wire.h>
#include <Adafruit_ADS1015.h>
Joystick_ Joystick;
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
void setup()
{
// Initialize Joystick Library
Joystick.begin();
ads.begin();
}
void loop()
{
Joystick.setThrottle(ads.readADC_SingleEnded(0));
Joystick.setRxAxis(ads.readADC_SingleEnded(1));
Joystick.setRyAxis(ads.readADC_SingleEnded(2));
delay(100);
}
Wiring Details
Nothing relevant as example sketch runs fine and returns all three pot inputs in 16bit signed format (-32767 to 32767), although obviously, no negative values will be returned as VCC = 5V.
Description of Issue
Tested example sketch from Adafruit ADS1X15 library, uploaded to leonardo and tested in serial monitor. Runs fine.
Created a small sketch to get readings and set joystick axis's to values, doesn't upload. Seems to disconnect twice and then stay on uploading. After about 20 seconds, get "Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload" error.
Reuploaded the example sketch fine and tested, so the problem has to be with the sketch, or joystick lib. Messed around, disabling things, changing delay etc, nothing seems to make it upload.
Did try the setAxisRange on all three, but no change.
Technical Details
Sketch File that Reproduces Issue
Wiring Details
Nothing relevant as example sketch runs fine and returns all three pot inputs in 16bit signed format (-32767 to 32767), although obviously, no negative values will be returned as VCC = 5V.