How to upload a Zip library with workbench

I am new to the particle ecosystem (I’ve really only used arduino before this).

I’m trying to hook up a Gravity Analog TDS sensor to a Particle Boron and I’m having trouble importing the library for it. It doesn’t seem to be in the Particle Libraries list, so I tried downloading the library from GitHub and putting the file in the src folder in the Particle workbench IDE.

Here’s the link to the GitHub library.

You’ll need to rearrange some files and create some folders within the lib directory in your Workbench project. It’s described here.

You’ll probably also need to comment out #include <EEPROM.h> which is needed for Arduino but does not work on Particle.


You will also need to change the aref voltage value from 5.0 (volts) to 3.3 using this library function:

void setAref(float value);  //reference voltage on ADC, default 5.0V on Arduino UNO

Thanks for the reply. Would you be able to explain why? I hello world-ed the sensor with an uno and used 5V.

@hparris3980, the ATMega328 used in the Uno is a 5v processor whereas the nrf52840 used in the Boron is a 3.3v part. So, you will need to power the sensor using 3.3v (for which it is rated) and define the reference voltage for the analog-to-digital (A/D) converter as 3.3v. This value is used to convert the A/D digital value into an equivalent voltage in the library.

Thanks so much!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.