pixy2 smart camera library www.pixycam.com

Pixy2 Library project (using UART interface)

Revision:
8:c93e1d706c0e
Parent:
7:1163b9c3274b
Child:
9:764075b514bf
--- a/pixy2.h	Mon Mar 11 17:36:00 2019 +0000
+++ b/pixy2.h	Tue Mar 12 09:50:51 2019 +0000
@@ -75,12 +75,12 @@
  *  \param PIXY2_MISC_ERROR :       Unknown error
  *  \param PIXY2_BUSY :             Pixy hasn't finish yet
  *  \param PIXY2_BAD_CHECKSUM :     Checksum is wrong
- *  \param PIXY2_TYPE_ERROR :       unexpected type message
+ *  \param PIXY2_TYPE_ERROR :       Unexpected message type
  *  @note More documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:general_api#error-codes
  */
 typedef int             Pixy2ErrorCode;
 
-#define PIXY2_OK            0
+#define PIXY2_OK             0
 #define PIXY2_MISC_ERROR    -1
 #define PIXY2_BUSY          -2
 #define PIXY2_BAD_CHECKSUM  -3
@@ -404,7 +404,7 @@
 Pixy2ErrorCode pixy2_setCameraBrightness (Byte brightness);
 
 /**
- * sets the servo positions of servos plugged into Pixy2's two RC servo connectors. 
+ * Sets the servo positions of servos plugged into Pixy2's two RC servo connectors. 
  * @note Frame Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide
  * @note Function Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:general_api
  * @param s0 (Word - passed by value) : value between 0 and 511 
@@ -412,8 +412,40 @@
  * @return Pixy2ErrorCode : error code.
  */
 Pixy2ErrorCode pixy2_setServos (Word s0, Word s1); 
+
+/**
+ * Sets Pixy2's RGB LED value. The three arguments sets the brightness of the red, green and blue sections of the LED.
+ * @note It will override Pixy2's own setting of the RGB LED. 
+ * @note Frame Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide
+ * @note Function Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:general_api
+ * @param red (Byte - passed by value) : Red component value (between 0 and 255) 
+ * @param green (Byte - passed by value) : Green component value (between 0 and 255) 
+ * @param blue (Byte - passed by value) : Blue component value (between 0 and 255) 
+ * @return Pixy2ErrorCode : error code.
+ */
 Pixy2ErrorCode pixy2_setLED (Byte red, Byte green, Byte blue);
+
+/**
+ * Turns on/off Pixy2's integrated light source.
+ * @note The upper argument controls the two white LEDs along the top edge of Pixy2's PCB. The lower argument sets the RGB LED, causing it to turn on all three color channels at full brightness, resulting in white light.
+ * @note It will override Pixy2's own setting of the RGB LED. 
+ * @note Frame Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide
+ * @note Function Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:general_api
+ * @param upper (Byte - passed by value) : binary, zero or non-zero 
+ * @param lower (Byte - passed by value) : binary, zero or non-zero 
+ * @return Pixy2ErrorCode : error code.
+ */
 Pixy2ErrorCode pixy2_setLamp (Byte upper, Byte lower);
+
+/**
+ * Gets Pixy2's framerate.
+ * The framerate can range between 2 and 62 frames per second depending on the amount of light in the environment and the min frames per second setting in the Camera configuration tab.
+ * @note This function can also serve as a simple indicator of the amount of light in the environment. That is, low framerates necessarily imply lower lighting levels
+ * @note Frame Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide
+ * @note Function Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:general_api
+ * @param framerate (T_pixy2returnCode - passed by reference) : acknoledge 
+ * @return Pixy2ErrorCode : error code.
+ */
 Pixy2ErrorCode pixy2_getFPS (T_pixy2returnCode *framerate);
 Pixy2ErrorCode pixy2_getBlocks (Byte sigmap, Byte maxBloc);
 Pixy2ErrorCode pixy2_getMainFeature (Byte type, Byte features);