Ver Fonte

updated the README file about the copyright

Jack Shao há 11 anos atrás
pai
commit
d26bc1a485
4 ficheiros alterados com 97 adições e 58 exclusões
  1. 30 20
      Barometer.cpp
  2. 31 21
      Barometer.h
  3. 2 6
      README.md
  4. 34 11
      examples/Barometer_Sensor/Barometer_Sensor.ino

+ 30 - 20
Barometer.cpp

@@ -1,23 +1,33 @@
 /*
-  Barometer library V1.0
-  2010 Copyright (c) Seeed Technology Inc.  All right reserved.
- 
-  Original Author: LG
-  
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+ * Barometer.cpp
+ * A library for barometer
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : LG
+ * Create Time:
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
 #include "Barometer.h"
 #include <Wire.h>
 #include <Arduino.h>
@@ -100,7 +110,7 @@ unsigned long Barometer::bmp085ReadUP()
 }
 void Barometer::writeRegister(int deviceAddress, byte address, byte val)
 {
-    Wire.beginTransmission(deviceAddress); // start transmission to device 
+    Wire.beginTransmission(deviceAddress); // start transmission to device
     Wire.write(address);       // send register address
     Wire.write(val);         // send value to write
     Wire.endTransmission();     // end transmission

+ 31 - 21
Barometer.h

@@ -1,23 +1,33 @@
 /*
-  Barometer library V1.0
-  2010 Copyright (c) Seeed Technology Inc.  All right reserved.
- 
-  Original Author: LG
-  
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+ * Barometer.h
+ * A library for barometer
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : LG
+ * Create Time:
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
 #ifndef __BAROMETER_H__
 #define __BAROMETER_H__
 
@@ -28,7 +38,7 @@ const unsigned char OSS = 0;
 #define BMP085_ADDRESS 0x77
 class Barometer
 {
-public: 
+public:
   void init(void);
   long PressureCompensate;
   float bmp085GetTemperature(unsigned int ut);
@@ -36,7 +46,7 @@ public:
   float calcAltitude(float pressure);
   unsigned int bmp085ReadUT(void);
   unsigned long bmp085ReadUP(void);
- 
+
 private:
   int ac1;
   int ac2;

+ 2 - 6
README.md

@@ -19,18 +19,14 @@ For connection guide and more information, please refer to [wiki page](<http://w
     
 ----
 
-This software is written by L.G. for seeed studio and is licensed under The GPL v2 License.<br>
+This software is written by L.G. for for [Seeed Technology Inc.](http://www.seeed.cc) and is licensed under [The MIT License](http://opensource.org/licenses/mit-license.php). Check License.txt/LICENSE for the details of MIT license.<br>
 
 Contributing to this software is warmly welcomed. You can do this basically by<br>
 [forking](https://help.github.com/articles/fork-a-repo), committing modifications and then [pulling requests](https://help.github.com/articles/using-pull-requests) (follow the links above<br>
 for operating guide). Adding change log and your contact into file header is encouraged.<br>
 Thanks for your contribution.
 
-Seeed Studio is an open hardware facilitation company based in Shenzhen, China. <br>
-Benefiting from local manufacture power and convenient global logistic system, <br>
-we integrate resources to serve new era of innovation. Seeed also works with <br>
-global distributors and partners to push open hardware movement.<br>
-
+Seeed is a hardware innovation platform for makers to grow inspirations into differentiating products. By working closely with technology providers of all scale, Seeed provides accessible technologies with quality, speed and supply chain knowledge. When prototypes are ready to iterate, Seeed helps productize 1 to 1,000 pcs using in-house engineering, supply chain management and agile manufacture forces. Seeed also team up with incubators, Chinese tech ecosystem, investors and distribution channels to portal Maker startups beyond.
 
 
 [![Analytics](https://ga-beacon.appspot.com/UA-46589105-3/Grove_Barometer_Sensor)](https://github.com/igrigorik/ga-beacon)

+ 34 - 11
examples/Barometer_Sensor/Barometer_Sensor.ino

@@ -1,10 +1,33 @@
-/* Barometer demo V1.0
-* Based largely on code by  Jim Lindblom
-* Get pressure, altitude, and temperature from the BMP085.
-* Serial.print it out at 9600 baud to serial monitor.
-*
-* By:http://www.seeedstudio.com
-*/
+/*
+ * Barometer_Sensor.ino
+ * Example sketch for barometer
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : Jim Lindblom, LG
+ * Create Time:
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
 #include "Barometer.h"
 #include <Wire.h>
 float temperature;
@@ -15,16 +38,16 @@ Barometer myBarometer;
 void setup(){
   Serial.begin(9600);
   myBarometer.init();
-  
+
 }
 
 void loop()
 {
    temperature = myBarometer.bmp085GetTemperature(myBarometer.bmp085ReadUT()); //Get the temperature, bmp085ReadUT MUST be called first
    pressure = myBarometer.bmp085GetPressure(myBarometer.bmp085ReadUP());//Get the temperature
-   altitude = myBarometer.calcAltitude(pressure); //Uncompensated caculation - in Meters 
-   atm = pressure / 101325; 
-  
+   altitude = myBarometer.calcAltitude(pressure); //Uncompensated caculation - in Meters
+   atm = pressure / 101325;
+
   Serial.print("Temperature: ");
   Serial.print(temperature, 2); //display 2 decimal places
   Serial.println("deg C");