This is a library for the PCA9685 ported from the Adafruit Ardiuno library.

Files at this revision

API Documentation at this revision

Comitter:
rvasquez6089
Date:
Fri Feb 13 23:26:00 2015 +0000
Parent:
0:1ecf26e0cf3c
Child:
2:ec40a85eba51
Commit message:
testing documentation;

Changed in this revision

PCA9685Lib.h Show annotated file Show diff for this revision Revisions of this file
--- a/PCA9685Lib.h	Fri Feb 13 22:02:35 2015 +0000
+++ b/PCA9685Lib.h	Fri Feb 13 23:26:00 2015 +0000
@@ -43,9 +43,36 @@
 #define ALLLED_ON_H 0xFB
 #define ALLLED_OFF_L 0xFC
 #define ALLLED_OFF_H 0xFD
+
+
+
+ /** An analog input, used for reading the voltage on a pin
+ *
+ * Example:
+ * @code
+ * // Print messages when the AnalogIn is greater than 50%
+ *
+ * #include "mbed.h"
+ *
+ * AnalogIn temperature(p20);
+ *
+ * int main() {
+ *     while(1) {
+ *         if(temperature > 0.5) {
+ *             printf("Too hot! (%f)", temperature.read());
+ *         }
+ *     }
+ * }
+ * @endcode
+ */
 class PCA9685Lib; //Forward declaration
 struct LEDarr
 {
+     /** Create an PCA9685 object, pass in an I2C object and the PCA9685 device address
+     * The default address is 0x80
+     * @param i2cobj PCA9685Lib pin to connect to
+     * @param name (optional) A string to identify the object
+     */
     uint8_t LEDnum;
     PCA9685Lib* PCALib;
     void operator= (uint16_t duty);
@@ -53,6 +80,11 @@
 
 class PCA9685Lib {
  public:
+ /** Create an PCA9685 object, pass in an I2C object and the PCA9685 device address
+     * The default address is 0x80
+     * @param i2cobj PCA9685Lib pin to connect to
+     * @param name (optional) A string to identify the object
+     */
   PCA9685Lib(I2C i2cobj, int addr = 0x80); //0b 1_000000_(R/W) <- default slave adress
   void i2c_probe(void);
   void begin(void);