From 80626ae5a9029b9ebc52f98537c30d06173bb6fc Mon Sep 17 00:00:00 2001 From: Morris Johns Date: Tue, 15 Apr 2014 01:12:12 +1200 Subject: [PATCH 1/2] Update README.md Edited to improve English. --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 12b6e7b..7302794 100644 --- a/README.md +++ b/README.md @@ -5,57 +5,57 @@ test 1410 Written by Loovee, distributed under LGPL, for more information, please visit http://www.seeedstudio.com -This library is written for manage Xadow, include : +This library is written to manage Xadow. It includes functions to: -* user led -* charge state read -* battery voltage read -* sleep mode operation +* control the LEDs +* read the charge state +* read the battery voltage +* put the xadow to sleep FUNCTION ------------------------------------------------------------------------------------------------------------------- -you can use the folowing function, it's useful in some way. +It contains the following functions: ### Initialization void init(); -### Get Voltage of battery +### Get the voltage of the battery float getBatVol(); -### Get Charge State +### Get the charge state unsigned char getChrgState(); -it'll return the folowing value: +getChrgState() will return one of the following values: #define NOCHARGE 0 #define CHARGING 1 #define CHARGDONE 2 -### User Led -there'are two user led that you can use, a green one and a read one. +### User LED +there'are two user LEDs that you can use, a green one and a red one. - void greenLed(unsigned char state); // green Led drive - void redLed(unsigned char state); // red led drive + void greenLed(unsigned char state); // green LED drive + void redLed(unsigned char state); // red LED drive -about the input value, you can use: +To control the LED state, you use: - #define LEDON 1 // led on - #define LEDOFF 2 // led off - #define LEDCHG 3 // change led state + #define LEDON 1 // turn the LED on + #define LEDOFF 2 // turn the LED off + #define LEDCHG 3 // toggle the LED state -### Power Manage -of curse, sometimes you want your xadow goto sleep to save some power, then you can use this function: +### Power Management +Sometimes you may want to put your xadow to sleep to save power. Use: - void pwrDown(unsigned long tSleep); // power down, tSleep ms + void pwrDown(unsigned long tSleep); // power down, tSleep milliSeconds to sleep for -it'll let your xadow goto sleep for sSleep ms, then it'll wake, you shourld use the folowing function to awake it: +It will put your xadow to sleep for sSleep ms, then it will wake. You should use the following function to wake it up: void wakeUp(); // wake up APPLICATION ------------------------------------------------------------------------------------------------------------------- -there'are some application here, for more applicaton you can refer to examples +Here are some application examples: ### POWER DOWN MODE @@ -80,7 +80,7 @@ there'are some application here, for more applicaton you can refer to examples Xadow.pwrDown(1000); // sleep for 1000ms Xadow.wakeUp(); // wake up cout << "wake up" << endl; - delay(500); // delay 500 ms + delay(500); // delay 500ms } @@ -121,7 +121,7 @@ there'are some application here, for more applicaton you can refer to examples void loop() { - Xadow.greenLed(LEDON); // green led on + Xadow.greenLed(LEDON); // green led on Xadow.redLed(LEDOFF); // red led off delay(200); Xadow.redLed(LEDON); // red led on @@ -133,4 +133,4 @@ there'are some application here, for more applicaton you can refer to examples OTHERS -------------------------------------------------------------------- -anymore problem, please send me a email: luweicong@seeedstudio.com +If you have any problems, please send me an email: luweicong@seeedstudio.com From 520940e6d1119b1789ca204b219dad861184c5c5 Mon Sep 17 00:00:00 2001 From: Morris Johns Date: Tue, 15 Apr 2014 01:22:45 +1200 Subject: [PATCH 2/2] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7302794..9a42b31 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,13 @@ This library is written to manage Xadow. It includes functions to: * read the battery voltage * put the xadow to sleep +Also see the examples directory for: + +* reading the barometer +* vibrating the vibrator +* reading the accelerometer +* reading and setting the real-time-clock + FUNCTION ------------------------------------------------------------------------------------------------------------------- It contains the following functions: @@ -55,7 +62,7 @@ It will put your xadow to sleep for sSleep ms, then it will wake. You should use APPLICATION ------------------------------------------------------------------------------------------------------------------- -Here are some application examples: +See the examples sub-directory which has complete and extended example code. The following is the basic examples of using the library: ### POWER DOWN MODE