K KiloBravo Active Member Licensed User Longtime User Mar 15, 2020 #1 Has anyone wrapped a lib from that site ? If you did a link would be appreciated. If not I have been brushing up on my C++ and reading Erel's posts on the subject. Wrapping always seems to make sense to me. Then I go to wrap one and there always seems to be something different that I don't know how to handle. LOL. Anyway I think I will try and wrap the ADS115 as time permits. The site has a working Arduino Code example. If that proves to difficult I may look for an easier example on that Git Hub site to start with. I2C Device Library Usage | I2C Device Library ADS1115 16-bit A/D converter | I2C Device Library https://www.i2cdevlib.com/docs/html/class_a_d_s1115.html <<< This is cool. Kind of like the B4X Object Browser but online. i2cdevlib/Arduino at master · addicore/i2cdevlib I2C device library collection for AVR/Arduino or other C++-based MCUs - addicore/i2cdevlib github.com i2cdevlib/Arduino/ADS1115 at master · addicore/i2cdevlib I2C device library collection for AVR/Arduino or other C++-based MCUs - addicore/i2cdevlib github.com Seems like it was a great idea. I am not sure the site is still very active and being updated. A lot of features seem to be not fully implemeted or in a future dev state. But what is on there looks pretty good for Arduino and I2C.
Has anyone wrapped a lib from that site ? If you did a link would be appreciated. If not I have been brushing up on my C++ and reading Erel's posts on the subject. Wrapping always seems to make sense to me. Then I go to wrap one and there always seems to be something different that I don't know how to handle. LOL. Anyway I think I will try and wrap the ADS115 as time permits. The site has a working Arduino Code example. If that proves to difficult I may look for an easier example on that Git Hub site to start with. I2C Device Library Usage | I2C Device Library ADS1115 16-bit A/D converter | I2C Device Library https://www.i2cdevlib.com/docs/html/class_a_d_s1115.html <<< This is cool. Kind of like the B4X Object Browser but online. i2cdevlib/Arduino at master · addicore/i2cdevlib I2C device library collection for AVR/Arduino or other C++-based MCUs - addicore/i2cdevlib github.com i2cdevlib/Arduino/ADS1115 at master · addicore/i2cdevlib I2C device library collection for AVR/Arduino or other C++-based MCUs - addicore/i2cdevlib github.com Seems like it was a great idea. I am not sure the site is still very active and being updated. A lot of features seem to be not fully implemeted or in a future dev state. But what is on there looks pretty good for Arduino and I2C.
thetahsk Active Member Licensed User Longtime User Mar 15, 2020 #2 The work has already been implemented. Try to port the Adafruit lib to B4R. B4X: Copy #include <Wire.h> #include <Adafruit_ADS1015.h> Adafruit_ADS1115 ads; ..... Upvote 0
The work has already been implemented. Try to port the Adafruit lib to B4R. B4X: Copy #include <Wire.h> #include <Adafruit_ADS1015.h> Adafruit_ADS1115 ads; .....
K KiloBravo Active Member Licensed User Longtime User Mar 21, 2020 #3 I never got back to this, because I switched from an ESP8266 to an ESP32 for BlueTooth. The ADC on the ESP32 worked fine for reading the KY-023 Joystick values. Although those joysticks are not the best for fine control. They tend to jump high or low and also Max out at half the range of movement as others have noted. I was able to smooth out the motor control in my app by using a timer in the B4R code. I read the values directly and then only moved the motor power up or down slowly on each timer loop. Upvote 0
I never got back to this, because I switched from an ESP8266 to an ESP32 for BlueTooth. The ADC on the ESP32 worked fine for reading the KY-023 Joystick values. Although those joysticks are not the best for fine control. They tend to jump high or low and also Max out at half the range of movement as others have noted. I was able to smooth out the motor control in my app by using a timer in the B4R code. I read the values directly and then only moved the motor power up or down slowly on each timer loop.