├── .gitattributes ├── .gitignore ├── Documentation └── BMP180 Datasheet V2.5.pdf ├── LICENSE.md ├── Libraries ├── Arduino │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── examples │ │ ├── BMP180_altitude_example │ │ │ └── BMP180_altitude_example.ino │ │ ├── README.md │ │ └── SFE_BMP180_example │ │ │ └── SFE_BMP180_example.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── README.md │ │ ├── SFE_BMP180.cpp │ │ └── SFE_BMP180.h ├── README.md └── Teensy │ ├── LICENSE.md │ ├── README.md │ ├── examples │ └── PressTempAlt │ │ └── PressTempAlt.ino │ ├── keywords.txt │ ├── library.properties │ ├── src │ ├── README.md │ ├── Teensy_BMP180.cpp │ └── Teensy_BMP180.h │ └── utilyt │ ├── README.md │ ├── Teensy_BMP180.cpp │ └── Teensy_BMP180.h ├── Production └── BMP180-Breakout-Panel-v10.brd ├── README.md └── hardware ├── SparkFun_BMP180_Breakout.brd └── SparkFun_BMP180_Breakout.sch /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | 165 | # Eagle 166 | *.?#? 167 | eagle.epf 168 | *.log 169 | *.eup 170 | *\eagleUp* 171 | -------------------------------------------------------------------------------- /Documentation/BMP180 Datasheet V2.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/BMP180_Breakout/f00c5e673de1c8331d2e88312d9f837cf7fbb25b/Documentation/BMP180 Datasheet V2.5.pdf -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | SparkFun License Information 2 | ============================ 3 | 4 | SparkFun uses two different licenses for our files - one for hardware and one for code. 5 | 6 | Hardware 7 | --------- 8 | 9 | **SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).** 10 | 11 | Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode). 12 | 13 | You are free to: 14 | 15 | Share — copy and redistribute the material in any medium or format 16 | Adapt — remix, transform, and build upon the material 17 | for any purpose, even commercially. 18 | The licensor cannot revoke these freedoms as long as you follow the license terms. 19 | Under the following terms: 20 | 21 | Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 22 | ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. 23 | No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. 24 | Notices: 25 | 26 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. 27 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. 28 | 29 | 30 | Code 31 | -------- 32 | 33 | **SparkFun code, firmware, and software is released under the [MIT License](http://opensource.org/licenses/MIT).** 34 | 35 | The MIT License (MIT) 36 | 37 | Copyright (c) 2015 SparkFun Electronics 38 | 39 | Permission is hereby granted, free of charge, to any person obtaining a copy 40 | of this software and associated documentation files (the "Software"), to deal 41 | in the Software without restriction, including without limitation the rights 42 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 43 | copies of the Software, and to permit persons to whom the Software is 44 | furnished to do so, subject to the following conditions: 45 | 46 | The above copyright notice and this permission notice shall be included in all 47 | copies or substantial portions of the Software. 48 | 49 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 50 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 51 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 52 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 53 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 54 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 55 | SOFTWARE. 56 | -------------------------------------------------------------------------------- /Libraries/Arduino/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /Libraries/Arduino/.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## SparkFun Useful stuff 3 | ################# 4 | 5 | ## AVR Development 6 | *.eep 7 | *.elf 8 | *.lst 9 | *.lss 10 | *.sym 11 | *.d 12 | *.o 13 | *.srec 14 | *.map 15 | 16 | ## Notepad++ backup files 17 | *.bak 18 | 19 | ## BOM files 20 | *bom* 21 | 22 | ################# 23 | ## Eclipse 24 | ################# 25 | 26 | *.pydevproject 27 | .project 28 | .metadata 29 | bin/ 30 | tmp/ 31 | *.tmp 32 | *.bak 33 | *.swp 34 | *~.nib 35 | local.properties 36 | .classpath 37 | .settings/ 38 | .loadpath 39 | 40 | # External tool builders 41 | .externalToolBuilders/ 42 | 43 | # Locally stored "Eclipse launch configurations" 44 | *.launch 45 | 46 | # CDT-specific 47 | .cproject 48 | 49 | # PDT-specific 50 | .buildpath 51 | 52 | 53 | ############# 54 | ## Eagle 55 | ############# 56 | 57 | # Ignore the board and schematic backup files 58 | *.b#? 59 | *.s#? 60 | 61 | 62 | ################# 63 | ## Visual Studio 64 | ################# 65 | 66 | ## Ignore Visual Studio temporary files, build results, and 67 | ## files generated by popular Visual Studio add-ons. 68 | 69 | # User-specific files 70 | *.suo 71 | *.user 72 | *.sln.docstates 73 | 74 | # Build results 75 | [Dd]ebug/ 76 | [Rr]elease/ 77 | *_i.c 78 | *_p.c 79 | *.ilk 80 | *.meta 81 | *.obj 82 | *.pch 83 | *.pdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.vspscc 93 | .builds 94 | *.dotCover 95 | 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 97 | #packages/ 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opensdf 104 | *.sdf 105 | 106 | # Visual Studio profiler 107 | *.psess 108 | *.vsp 109 | 110 | # ReSharper is a .NET coding add-in 111 | _ReSharper* 112 | 113 | # Installshield output folder 114 | [Ee]xpress 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish 128 | 129 | # Others 130 | [Bb]in 131 | [Oo]bj 132 | sql 133 | TestResults 134 | *.Cache 135 | ClientBin 136 | stylecop.* 137 | ~$* 138 | *.dbmdl 139 | Generated_Code #added for RIA/Silverlight projects 140 | 141 | # Backup & report files from converting an old project file to a newer 142 | # Visual Studio version. Backup files are not needed, because we have git ;-) 143 | _UpgradeReport_Files/ 144 | Backup*/ 145 | UpgradeLog*.XML 146 | 147 | 148 | ############ 149 | ## Windows 150 | ############ 151 | 152 | # Windows image file caches 153 | Thumbs.db 154 | 155 | # Folder config file 156 | Desktop.ini 157 | 158 | 159 | ############# 160 | ## Python 161 | ############# 162 | 163 | *.py[co] 164 | 165 | # Packages 166 | *.egg 167 | *.egg-info 168 | dist 169 | build 170 | eggs 171 | parts 172 | bin 173 | var 174 | sdist 175 | develop-eggs 176 | .installed.cfg 177 | 178 | # Installer logs 179 | pip-log.txt 180 | 181 | # Unit test / coverage reports 182 | .coverage 183 | .tox 184 | 185 | #Translations 186 | *.mo 187 | 188 | #Mr Developer 189 | .mr.developer.cfg 190 | 191 | # Mac crap 192 | .DS_Store 193 | -------------------------------------------------------------------------------- /Libraries/Arduino/LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | License Information 3 | ------------------- 4 | 5 | The hardware is released under [Creative Commons Share-alike 3.0](http://creativecommons.org/licenses/by-sa/3.0/). 6 | 7 | All other code is open source so please feel free to do anything you want with it; you buy me a beer if you use this and we meet someday ([Beerware license](http://en.wikipedia.org/wiki/Beerware)). 8 | 9 | 10 | -------------------------------------------------------------------------------- /Libraries/Arduino/README.md: -------------------------------------------------------------------------------- 1 | SparkFun BMP180_Breakout Arduino Library 2 | ======================================== 3 | 4 | ![BMP180 Breakout](https://dlnmh9ip6v2uc.cloudfront.net/images/products/1/1/8/2/4/11824-01.jpg) 5 | 6 | [*SEN-11824*](https://www.sparkfun.com/products/11824) 7 | 8 | This archive contains an Arduino library and example sketch showing how to use this sensor. The library must be installed onto your computer in order for the example code to work correctly. 9 | 10 | Repository Contents 11 | ------------------- 12 | 13 | * **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. 14 | * **/src** - Source files for the library (.cpp, .h). 15 | * **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE. 16 | * **library.properties** - General library properties for the Arduino package manager. 17 | 18 | Documentation 19 | -------------- 20 | 21 | * **[*Installing an Arduino Library* Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library. 22 | * **[Product Repository](https://github.com/sparkfun/BMP180_Breakout)** - Main repository (including hardware files) for the BMP180 Breakout. 23 | * **[Hookup Guide](https://learn.sparkfun.com/tutorials/bmp180-barometric-pressure-sensor-hookup)** - Basic hookup guide for the BMP180 Breakout. 24 | 25 | 26 | Products that use this Library 27 | --------------------------------- 28 | 29 | * [SEN-11824](https://www.sparkfun.com/products/11824) - BMP180 Barometric Pressure Sensor Breakout 30 | 31 | 32 | Version History 33 | --------------- 34 | 35 | * [V_1.1.2](https://github.com/sparkfun/BMP180_Breakout_Arduino_Library/tree/V_1.1.2) - Small patch on integers, cleaning up library files. 36 | * [V_1.1.1](https://github.com/sparkfun/BMP180_Breakout_Arduino_Library/tree/V_1.1.1) - Updated library.properties file 37 | * [V_1.1.0](https://github.com/sparkfun/BMP180_Breakout_Arduino_Library/tree/V_1.1.0) - Updated to new library structure 38 | * V_1.0.0 - Untracked version 39 | 40 | License Information 41 | ------------------- 42 | 43 | This product is _**open source**_! 44 | 45 | The **code** is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round! 46 | 47 | Please use, reuse, and modify these files as you see fit. Please maintain attribution to SparkFun Electronics and release anything derivative under the same license. 48 | 49 | Distributed as-is; no warranty is given. 50 | 51 | \- Your friends at SparkFun. 52 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/BMP180_altitude_example/BMP180_altitude_example.ino: -------------------------------------------------------------------------------- 1 | /* SFE_BMP180 altitude example sketch 2 | 3 | This sketch shows how to use the Bosch BMP180 pressure sensor 4 | as an altimiter. 5 | https://www.sparkfun.com/products/11824 6 | 7 | Like most pressure sensors, the BMP180 measures absolute pressure. 8 | Since absolute pressure varies with altitude, you can use the pressure 9 | to determine your altitude. 10 | 11 | Because pressure also varies with weather, you must first take a pressure 12 | reading at a known baseline altitude. Then you can measure variations 13 | from that pressure 14 | 15 | Hardware connections: 16 | 17 | - (GND) to GND 18 | + (VDD) to 3.3V 19 | 20 | (WARNING: do not connect + to 5V or the sensor will be damaged!) 21 | 22 | You will also need to connect the I2C pins (SCL and SDA) to your 23 | Arduino. The pins are different on different Arduinos: 24 | 25 | Any Arduino pins labeled: SDA SCL 26 | Uno, Redboard, Pro: A4 A5 27 | Mega2560, Due: 20 21 28 | Leonardo: 2 3 29 | 30 | Leave the IO (VDDIO) pin unconnected. This pin is for connecting 31 | the BMP180 to systems with lower logic levels such as 1.8V 32 | 33 | Have fun! -Your friends at SparkFun. 34 | 35 | The SFE_BMP180 library uses floating-point equations developed by the 36 | Weather Station Data Logger project: http://wmrx00.sourceforge.net/ 37 | 38 | Our example code uses the "beerware" license. You can do anything 39 | you like with this code. No really, anything. If you find it useful, 40 | buy me a beer someday. 41 | 42 | V10 Mike Grusin, SparkFun Electronics 10/24/2013 43 | V1.1.2 Updates for Arduino 1.6.4 5/2015 44 | 45 | */ 46 | 47 | // Your sketch must #include this library, and the Wire library. 48 | // (Wire is a standard library included with Arduino.): 49 | 50 | #include 51 | #include 52 | 53 | // You will need to create an SFE_BMP180 object, here called "pressure": 54 | 55 | SFE_BMP180 pressure; 56 | // or "&Wire1" to Arduino DUE 57 | // SFE_BMP180 pressure(&Wire1); 58 | 59 | double baseline; // baseline pressure 60 | 61 | void setup() 62 | { 63 | Serial.begin(9600); 64 | Serial.println("REBOOT"); 65 | 66 | // Initialize the sensor (it is important to get calibration values stored on the device). 67 | 68 | if (pressure.begin()) 69 | Serial.println("BMP180 init success"); 70 | else 71 | { 72 | // Oops, something went wrong, this is usually a connection problem, 73 | // see the comments at the top of this sketch for the proper connections. 74 | 75 | Serial.println("BMP180 init fail (disconnected?)\n\n"); 76 | while(1); // Pause forever. 77 | } 78 | 79 | // Get the baseline pressure: 80 | 81 | baseline = getPressure(); 82 | 83 | Serial.print("baseline pressure: "); 84 | Serial.print(baseline); 85 | Serial.println(" mb"); 86 | } 87 | 88 | void loop() 89 | { 90 | double a,P; 91 | 92 | // Get a new pressure reading: 93 | 94 | P = getPressure(); 95 | 96 | // Show the relative altitude difference between 97 | // the new reading and the baseline reading: 98 | 99 | a = pressure.altitude(P,baseline); 100 | 101 | Serial.print("relative altitude: "); 102 | if (a >= 0.0) Serial.print(" "); // add a space for positive numbers 103 | Serial.print(a,1); 104 | Serial.print(" meters, "); 105 | if (a >= 0.0) Serial.print(" "); // add a space for positive numbers 106 | Serial.print(a*3.28084,0); 107 | Serial.println(" feet"); 108 | 109 | delay(500); 110 | } 111 | 112 | 113 | double getPressure() 114 | { 115 | char status; 116 | double T,P,p0,a; 117 | 118 | // You must first get a temperature measurement to perform a pressure reading. 119 | 120 | // Start a temperature measurement: 121 | // If request is successful, the number of ms to wait is returned. 122 | // If request is unsuccessful, 0 is returned. 123 | 124 | status = pressure.startTemperature(); 125 | if (status != 0) 126 | { 127 | // Wait for the measurement to complete: 128 | 129 | delay(status); 130 | 131 | // Retrieve the completed temperature measurement: 132 | // Note that the measurement is stored in the variable T. 133 | // Use '&T' to provide the address of T to the function. 134 | // Function returns 1 if successful, 0 if failure. 135 | 136 | status = pressure.getTemperature(T); 137 | if (status != 0) 138 | { 139 | // Start a pressure measurement: 140 | // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait). 141 | // If request is successful, the number of ms to wait is returned. 142 | // If request is unsuccessful, 0 is returned. 143 | 144 | status = pressure.startPressure(3); 145 | if (status != 0) 146 | { 147 | // Wait for the measurement to complete: 148 | delay(status); 149 | 150 | // Retrieve the completed pressure measurement: 151 | // Note that the measurement is stored in the variable P. 152 | // Use '&P' to provide the address of P. 153 | // Note also that the function requires the previous temperature measurement (T). 154 | // (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.) 155 | // Function returns 1 if successful, 0 if failure. 156 | 157 | status = pressure.getPressure(P,T); 158 | if (status != 0) 159 | { 160 | return(P); 161 | } 162 | else Serial.println("error retrieving pressure measurement\n"); 163 | } 164 | else Serial.println("error starting pressure measurement\n"); 165 | } 166 | else Serial.println("error retrieving temperature measurement\n"); 167 | } 168 | else Serial.println("error starting temperature measurement\n"); 169 | } 170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/README.md: -------------------------------------------------------------------------------- 1 | SparkFun Example Sketches 2 | --------------------------- 3 | 4 | 5 | Basic Arduino Example Sketches that work with the SparkFun BMP180 Library. 6 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/SFE_BMP180_example/SFE_BMP180_example.ino: -------------------------------------------------------------------------------- 1 | /* SFE_BMP180 library example sketch 2 | 3 | This sketch shows how to use the SFE_BMP180 library to read the 4 | Bosch BMP180 barometric pressure sensor. 5 | https://www.sparkfun.com/products/11824 6 | 7 | Like most pressure sensors, the BMP180 measures absolute pressure. 8 | This is the actual ambient pressure seen by the device, which will 9 | vary with both altitude and weather. 10 | 11 | Before taking a pressure reading you must take a temparture reading. 12 | This is done with startTemperature() and getTemperature(). 13 | The result is in degrees C. 14 | 15 | Once you have a temperature reading, you can take a pressure reading. 16 | This is done with startPressure() and getPressure(). 17 | The result is in millibar (mb) aka hectopascals (hPa). 18 | 19 | If you'll be monitoring weather patterns, you will probably want to 20 | remove the effects of altitude. This will produce readings that can 21 | be compared to the published pressure readings from other locations. 22 | To do this, use the sealevel() function. You will need to provide 23 | the known altitude at which the pressure was measured. 24 | 25 | If you want to measure altitude, you will need to know the pressure 26 | at a baseline altitude. This can be average sealevel pressure, or 27 | a previous pressure reading at your altitude, in which case 28 | subsequent altitude readings will be + or - the initial baseline. 29 | This is done with the altitude() function. 30 | 31 | Hardware connections: 32 | 33 | - (GND) to GND 34 | + (VDD) to 3.3V 35 | 36 | (WARNING: do not connect + to 5V or the sensor will be damaged!) 37 | 38 | You will also need to connect the I2C pins (SCL and SDA) to your 39 | Arduino. The pins are different on different Arduinos: 40 | 41 | Any Arduino pins labeled: SDA SCL 42 | Uno, Redboard, Pro: A4 A5 43 | Mega2560, Due: 20 21 44 | Leonardo: 2 3 45 | 46 | Leave the IO (VDDIO) pin unconnected. This pin is for connecting 47 | the BMP180 to systems with lower logic levels such as 1.8V 48 | 49 | Have fun! -Your friends at SparkFun. 50 | 51 | The SFE_BMP180 library uses floating-point equations developed by the 52 | Weather Station Data Logger project: http://wmrx00.sourceforge.net/ 53 | 54 | Our example code uses the "beerware" license. You can do anything 55 | you like with this code. No really, anything. If you find it useful, 56 | buy me a beer someday. 57 | 58 | V10 Mike Grusin, SparkFun Electronics 10/24/2013 59 | V1.1.2 Updates for Arduino 1.6.4 5/2015 60 | 61 | */ 62 | 63 | // Your sketch must #include this library, and the Wire library. 64 | // (Wire is a standard library included with Arduino.): 65 | 66 | #include 67 | #include 68 | 69 | // You will need to create an SFE_BMP180 object, here called "pressure": 70 | 71 | SFE_BMP180 pressure; 72 | 73 | #define ALTITUDE 1655.0 // Altitude of SparkFun's HQ in Boulder, CO. in meters 74 | 75 | void setup() 76 | { 77 | Serial.begin(9600); 78 | Serial.println("REBOOT"); 79 | 80 | // Initialize the sensor (it is important to get calibration values stored on the device). 81 | 82 | if (pressure.begin()) 83 | Serial.println("BMP180 init success"); 84 | else 85 | { 86 | // Oops, something went wrong, this is usually a connection problem, 87 | // see the comments at the top of this sketch for the proper connections. 88 | 89 | Serial.println("BMP180 init fail\n\n"); 90 | while(1); // Pause forever. 91 | } 92 | } 93 | 94 | void loop() 95 | { 96 | char status; 97 | double T,P,p0,a; 98 | 99 | // Loop here getting pressure readings every 10 seconds. 100 | 101 | // If you want sea-level-compensated pressure, as used in weather reports, 102 | // you will need to know the altitude at which your measurements are taken. 103 | // We're using a constant called ALTITUDE in this sketch: 104 | 105 | Serial.println(); 106 | Serial.print("provided altitude: "); 107 | Serial.print(ALTITUDE,0); 108 | Serial.print(" meters, "); 109 | Serial.print(ALTITUDE*3.28084,0); 110 | Serial.println(" feet"); 111 | 112 | // If you want to measure altitude, and not pressure, you will instead need 113 | // to provide a known baseline pressure. This is shown at the end of the sketch. 114 | 115 | // You must first get a temperature measurement to perform a pressure reading. 116 | 117 | // Start a temperature measurement: 118 | // If request is successful, the number of ms to wait is returned. 119 | // If request is unsuccessful, 0 is returned. 120 | 121 | status = pressure.startTemperature(); 122 | if (status != 0) 123 | { 124 | // Wait for the measurement to complete: 125 | delay(status); 126 | 127 | // Retrieve the completed temperature measurement: 128 | // Note that the measurement is stored in the variable T. 129 | // Function returns 1 if successful, 0 if failure. 130 | 131 | status = pressure.getTemperature(T); 132 | if (status != 0) 133 | { 134 | // Print out the measurement: 135 | Serial.print("temperature: "); 136 | Serial.print(T,2); 137 | Serial.print(" deg C, "); 138 | Serial.print((9.0/5.0)*T+32.0,2); 139 | Serial.println(" deg F"); 140 | 141 | // Start a pressure measurement: 142 | // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait). 143 | // If request is successful, the number of ms to wait is returned. 144 | // If request is unsuccessful, 0 is returned. 145 | 146 | status = pressure.startPressure(3); 147 | if (status != 0) 148 | { 149 | // Wait for the measurement to complete: 150 | delay(status); 151 | 152 | // Retrieve the completed pressure measurement: 153 | // Note that the measurement is stored in the variable P. 154 | // Note also that the function requires the previous temperature measurement (T). 155 | // (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.) 156 | // Function returns 1 if successful, 0 if failure. 157 | 158 | status = pressure.getPressure(P,T); 159 | if (status != 0) 160 | { 161 | // Print out the measurement: 162 | Serial.print("absolute pressure: "); 163 | Serial.print(P,2); 164 | Serial.print(" mb, "); 165 | Serial.print(P*0.0295333727,2); 166 | Serial.println(" inHg"); 167 | 168 | // The pressure sensor returns abolute pressure, which varies with altitude. 169 | // To remove the effects of altitude, use the sealevel function and your current altitude. 170 | // This number is commonly used in weather reports. 171 | // Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m. 172 | // Result: p0 = sea-level compensated pressure in mb 173 | 174 | p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO) 175 | Serial.print("relative (sea-level) pressure: "); 176 | Serial.print(p0,2); 177 | Serial.print(" mb, "); 178 | Serial.print(p0*0.0295333727,2); 179 | Serial.println(" inHg"); 180 | 181 | // On the other hand, if you want to determine your altitude from the pressure reading, 182 | // use the altitude function along with a baseline pressure (sea-level or other). 183 | // Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb. 184 | // Result: a = altitude in m. 185 | 186 | a = pressure.altitude(P,p0); 187 | Serial.print("computed altitude: "); 188 | Serial.print(a,0); 189 | Serial.print(" meters, "); 190 | Serial.print(a*3.28084,0); 191 | Serial.println(" feet"); 192 | } 193 | else Serial.println("error retrieving pressure measurement\n"); 194 | } 195 | else Serial.println("error starting pressure measurement\n"); 196 | } 197 | else Serial.println("error retrieving temperature measurement\n"); 198 | } 199 | else Serial.println("error starting temperature measurement\n"); 200 | 201 | delay(5000); // Pause for 5 seconds. 202 | } 203 | -------------------------------------------------------------------------------- /Libraries/Arduino/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map for SFE_BMP180 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SFE_BMP180 KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | startTemperature KEYWORD2 17 | getTemperature KEYWORD2 18 | startPressure KEYWORD2 19 | getPressure KEYWORD2 20 | sealevel KEYWORD2 21 | altitude KEYWORD2 22 | 23 | ####################################### 24 | # Constants (LITERAL1) 25 | ####################################### 26 | 27 | BMP180_ADDR LITERAL1 -------------------------------------------------------------------------------- /Libraries/Arduino/library.properties: -------------------------------------------------------------------------------- 1 | name=Sparkfun BMP180 2 | version=1.1.2 3 | author=SparkFun Electronics 4 | maintainer=SparkFun Electronics 5 | sentence=Sparkfun examples for the Bosch BMP180 barometric pressure sensor 6 | paragraph=Example code for the Sparkfun Bosch BMP180 barometric pressure sensor breakout board. 7 | category=Signal Input/Output 8 | url=https://github.com/sparkfun/BMP180_Breakout 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/README.md: -------------------------------------------------------------------------------- 1 | This folder should contain the .cpp and .h files for the library. 2 | 3 | If backward compatibility is needed, source code should be placed in the library root folder and in a "utilyt" folder. 4 | 5 | Check out the [library specification](https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification) for more details. -------------------------------------------------------------------------------- /Libraries/Arduino/src/SFE_BMP180.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SFE_BMP180.cpp 3 | Bosch BMP180 pressure sensor library for the Arduino microcontroller 4 | Mike Grusin, SparkFun Electronics 5 | 6 | Uses floating-point equations from the Weather Station Data Logger project 7 | http://wmrx00.sourceforge.net/ 8 | http://wmrx00.sourceforge.net/Arduino/BMP085-Calcs.pdf 9 | 10 | Forked from BMP085 library by M.Grusin 11 | 12 | version 1.0 2013/09/20 initial version 13 | Verison 1.1.2 - Updated for Arduino 1.6.4 5/2015 14 | 15 | Our example code uses the "beerware" license. You can do anything 16 | you like with this code. No really, anything. If you find it useful, 17 | buy me a (root) beer someday. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | 26 | SFE_BMP180::SFE_BMP180() 27 | // Base library type 28 | { 29 | twi = &Wire; 30 | } 31 | 32 | SFE_BMP180::SFE_BMP180(TwoWire *_twi) 33 | // Base library type 34 | { 35 | twi = _twi; 36 | } 37 | 38 | 39 | 40 | char SFE_BMP180::begin() 41 | // Initialize library for subsequent pressure measurements 42 | { 43 | double c3,c4,b1; 44 | 45 | // Start up the Arduino's "wire" (I2C) library: 46 | 47 | twi->begin(); 48 | 49 | // The BMP180 includes factory calibration data stored on the device. 50 | // Each device has different numbers, these must be retrieved and 51 | // used in the calculations when taking pressure measurements. 52 | 53 | // Retrieve calibration data from device: 54 | 55 | if (readInt(0xAA,AC1) && 56 | readInt(0xAC,AC2) && 57 | readInt(0xAE,AC3) && 58 | readUInt(0xB0,AC4) && 59 | readUInt(0xB2,AC5) && 60 | readUInt(0xB4,AC6) && 61 | readInt(0xB6,VB1) && 62 | readInt(0xB8,VB2) && 63 | readInt(0xBA,MB) && 64 | readInt(0xBC,MC) && 65 | readInt(0xBE,MD)) 66 | { 67 | 68 | // All reads completed successfully! 69 | 70 | // If you need to check your math using known numbers, 71 | // you can uncomment one of these examples. 72 | // (The correct results are commented in the below functions.) 73 | 74 | // Example from Bosch datasheet 75 | // AC1 = 408; AC2 = -72; AC3 = -14383; AC4 = 32741; AC5 = 32757; AC6 = 23153; 76 | // B1 = 6190; B2 = 4; MB = -32768; MC = -8711; MD = 2868; 77 | 78 | // Example from http://wmrx00.sourceforge.net/Arduino/BMP180-Calcs.pdf 79 | // AC1 = 7911; AC2 = -934; AC3 = -14306; AC4 = 31567; AC5 = 25671; AC6 = 18974; 80 | // VB1 = 5498; VB2 = 46; MB = -32768; MC = -11075; MD = 2432; 81 | 82 | /* 83 | Serial.print("AC1: "); Serial.println(AC1); 84 | Serial.print("AC2: "); Serial.println(AC2); 85 | Serial.print("AC3: "); Serial.println(AC3); 86 | Serial.print("AC4: "); Serial.println(AC4); 87 | Serial.print("AC5: "); Serial.println(AC5); 88 | Serial.print("AC6: "); Serial.println(AC6); 89 | Serial.print("VB1: "); Serial.println(VB1); 90 | Serial.print("VB2: "); Serial.println(VB2); 91 | Serial.print("MB: "); Serial.println(MB); 92 | Serial.print("MC: "); Serial.println(MC); 93 | Serial.print("MD: "); Serial.println(MD); 94 | */ 95 | 96 | // Compute floating-point polynominals: 97 | 98 | c3 = 160.0 * pow(2,-15) * AC3; 99 | c4 = pow(10,-3) * pow(2,-15) * AC4; 100 | b1 = pow(160,2) * pow(2,-30) * VB1; 101 | c5 = (pow(2,-15) / 160) * AC5; 102 | c6 = AC6; 103 | mc = (pow(2,11) / pow(160,2)) * MC; 104 | md = MD / 160.0; 105 | x0 = AC1; 106 | x1 = 160.0 * pow(2,-13) * AC2; 107 | x2 = pow(160,2) * pow(2,-25) * VB2; 108 | y0 = c4 * pow(2,15); 109 | y1 = c4 * c3; 110 | y2 = c4 * b1; 111 | p0 = (3791.0 - 8.0) / 1600.0; 112 | p1 = 1.0 - 7357.0 * pow(2,-20); 113 | p2 = 3038.0 * 100.0 * pow(2,-36); 114 | 115 | /* 116 | Serial.println(); 117 | Serial.print("c3: "); Serial.println(c3); 118 | Serial.print("c4: "); Serial.println(c4); 119 | Serial.print("c5: "); Serial.println(c5); 120 | Serial.print("c6: "); Serial.println(c6); 121 | Serial.print("b1: "); Serial.println(b1); 122 | Serial.print("mc: "); Serial.println(mc); 123 | Serial.print("md: "); Serial.println(md); 124 | Serial.print("x0: "); Serial.println(x0); 125 | Serial.print("x1: "); Serial.println(x1); 126 | Serial.print("x2: "); Serial.println(x2); 127 | Serial.print("y0: "); Serial.println(y0); 128 | Serial.print("y1: "); Serial.println(y1); 129 | Serial.print("y2: "); Serial.println(y2); 130 | Serial.print("p0: "); Serial.println(p0); 131 | Serial.print("p1: "); Serial.println(p1); 132 | Serial.print("p2: "); Serial.println(p2); 133 | */ 134 | 135 | // Success! 136 | return(1); 137 | } 138 | else 139 | { 140 | // Error reading calibration data; bad component or connection? 141 | return(0); 142 | } 143 | } 144 | 145 | 146 | char SFE_BMP180::readInt(char address, int16_t &value) 147 | // Read a signed integer (two bytes) from device 148 | // address: register to start reading (plus subsequent register) 149 | // value: external variable to store data (function modifies value) 150 | { 151 | unsigned char data[2]; 152 | 153 | data[0] = address; 154 | if (readBytes(data,2)) 155 | { 156 | value = (int16_t)((data[0]<<8)|data[1]); 157 | //if (*value & 0x8000) *value |= 0xFFFF0000; // sign extend if negative 158 | return(1); 159 | } 160 | value = 0; 161 | return(0); 162 | } 163 | 164 | 165 | char SFE_BMP180::readUInt(char address, uint16_t &value) 166 | // Read an unsigned integer (two bytes) from device 167 | // address: register to start reading (plus subsequent register) 168 | // value: external variable to store data (function modifies value) 169 | { 170 | unsigned char data[2]; 171 | 172 | data[0] = address; 173 | if (readBytes(data,2)) 174 | { 175 | value = (((uint16_t)data[0]<<8)|(uint16_t)data[1]); 176 | return(1); 177 | } 178 | value = 0; 179 | return(0); 180 | } 181 | 182 | 183 | char SFE_BMP180::readBytes(unsigned char *values, char length) 184 | // Read an array of bytes from device 185 | // values: external array to hold data. Put starting register in values[0]. 186 | // length: number of bytes to read 187 | { 188 | uint8_t x; 189 | 190 | twi->beginTransmission(BMP180_ADDR); 191 | twi->write(values[0]); 192 | _error = twi->endTransmission(); 193 | if (_error == 0) 194 | { 195 | twi->requestFrom(BMP180_ADDR,length); 196 | while(twi->available() != length) ; // wait until bytes are ready 197 | for(x=0;xread(); 200 | } 201 | return(1); 202 | } 203 | return(0); 204 | } 205 | 206 | 207 | char SFE_BMP180::writeBytes(unsigned char *values, char length) 208 | // Write an array of bytes to device 209 | // values: external array of data to write. Put starting register in values[0]. 210 | // length: number of bytes to write 211 | { 212 | twi->beginTransmission(BMP180_ADDR); 213 | twi->write(values,length); 214 | _error = twi->endTransmission(); 215 | if (_error == 0) 216 | return(1); 217 | else 218 | return(0); 219 | } 220 | 221 | 222 | char SFE_BMP180::startTemperature(void) 223 | // Begin a temperature reading. 224 | // Will return delay in ms to wait, or 0 if I2C error 225 | { 226 | unsigned char data[2], result; 227 | 228 | data[0] = BMP180_REG_CONTROL; 229 | data[1] = BMP180_COMMAND_TEMPERATURE; 230 | result = writeBytes(data, 2); 231 | if (result) // good write? 232 | return(5); // return the delay in ms (rounded up) to wait before retrieving data 233 | else 234 | return(0); // or return 0 if there was a problem communicating with the BMP 235 | } 236 | 237 | 238 | char SFE_BMP180::getTemperature(double &T) 239 | // Retrieve a previously-started temperature reading. 240 | // Requires begin() to be called once prior to retrieve calibration parameters. 241 | // Requires startTemperature() to have been called prior and sufficient time elapsed. 242 | // T: external variable to hold result. 243 | // Returns 1 if successful, 0 if I2C error. 244 | { 245 | unsigned char data[2]; 246 | char result; 247 | double tu, a; 248 | 249 | data[0] = BMP180_REG_RESULT; 250 | 251 | result = readBytes(data, 2); 252 | if (result) // good read, calculate temperature 253 | { 254 | tu = (data[0] * 256.0) + data[1]; 255 | 256 | //example from Bosch datasheet 257 | //tu = 27898; 258 | 259 | //example from http://wmrx00.sourceforge.net/Arduino/BMP085-Calcs.pdf 260 | //tu = 0x69EC; 261 | 262 | a = c5 * (tu - c6); 263 | T = a + (mc / (a + md)); 264 | 265 | /* 266 | Serial.println(); 267 | Serial.print("tu: "); Serial.println(tu); 268 | Serial.print("a: "); Serial.println(a); 269 | Serial.print("T: "); Serial.println(*T); 270 | */ 271 | } 272 | return(result); 273 | } 274 | 275 | 276 | char SFE_BMP180::startPressure(char oversampling) 277 | // Begin a pressure reading. 278 | // Oversampling: 0 to 3, higher numbers are slower, higher-res outputs. 279 | // Will return delay in ms to wait, or 0 if I2C error. 280 | { 281 | unsigned char data[2], result, delay; 282 | 283 | data[0] = BMP180_REG_CONTROL; 284 | 285 | switch (oversampling) 286 | { 287 | case 0: 288 | data[1] = BMP180_COMMAND_PRESSURE0; 289 | delay = 5; 290 | break; 291 | case 1: 292 | data[1] = BMP180_COMMAND_PRESSURE1; 293 | delay = 8; 294 | break; 295 | case 2: 296 | data[1] = BMP180_COMMAND_PRESSURE2; 297 | delay = 14; 298 | break; 299 | case 3: 300 | data[1] = BMP180_COMMAND_PRESSURE3; 301 | delay = 26; 302 | break; 303 | default: 304 | data[1] = BMP180_COMMAND_PRESSURE0; 305 | delay = 5; 306 | break; 307 | } 308 | result = writeBytes(data, 2); 309 | if (result) // good write? 310 | return(delay); // return the delay in ms (rounded up) to wait before retrieving data 311 | else 312 | return(0); // or return 0 if there was a problem communicating with the BMP 313 | } 314 | 315 | 316 | char SFE_BMP180::getPressure(double &P, double &T) 317 | // Retrieve a previously started pressure reading, calculate abolute pressure in mbars. 318 | // Requires begin() to be called once prior to retrieve calibration parameters. 319 | // Requires startPressure() to have been called prior and sufficient time elapsed. 320 | // Requires recent temperature reading to accurately calculate pressure. 321 | 322 | // P: external variable to hold pressure. 323 | // T: previously-calculated temperature. 324 | // Returns 1 for success, 0 for I2C error. 325 | 326 | // Note that calculated pressure value is absolute mbars, to compensate for altitude call sealevel(). 327 | { 328 | unsigned char data[3]; 329 | char result; 330 | double pu,s,x,y,z; 331 | 332 | data[0] = BMP180_REG_RESULT; 333 | 334 | result = readBytes(data, 3); 335 | if (result) // good read, calculate pressure 336 | { 337 | pu = (data[0] * 256.0) + data[1] + (data[2]/256.0); 338 | 339 | //example from Bosch datasheet 340 | //pu = 23843; 341 | 342 | //example from http://wmrx00.sourceforge.net/Arduino/BMP085-Calcs.pdf, pu = 0x982FC0; 343 | //pu = (0x98 * 256.0) + 0x2F + (0xC0/256.0); 344 | 345 | s = T - 25.0; 346 | x = (x2 * pow(s,2)) + (x1 * s) + x0; 347 | y = (y2 * pow(s,2)) + (y1 * s) + y0; 348 | z = (pu - x) / y; 349 | P = (p2 * pow(z,2)) + (p1 * z) + p0; 350 | 351 | /* 352 | Serial.println(); 353 | Serial.print("pu: "); Serial.println(pu); 354 | Serial.print("T: "); Serial.println(*T); 355 | Serial.print("s: "); Serial.println(s); 356 | Serial.print("x: "); Serial.println(x); 357 | Serial.print("y: "); Serial.println(y); 358 | Serial.print("z: "); Serial.println(z); 359 | Serial.print("P: "); Serial.println(*P); 360 | */ 361 | } 362 | return(result); 363 | } 364 | 365 | 366 | double SFE_BMP180::sealevel(double P, double A) 367 | // Given a pressure P (mb) taken at a specific altitude (meters), 368 | // return the equivalent pressure (mb) at sea level. 369 | // This produces pressure readings that can be used for weather measurements. 370 | { 371 | return(P/pow(1-(A/44330.0),5.255)); 372 | } 373 | 374 | 375 | double SFE_BMP180::altitude(double P, double P0) 376 | // Given a pressure measurement P (mb) and the pressure at a baseline P0 (mb), 377 | // return altitude (meters) above baseline. 378 | { 379 | return(44330.0*(1-pow(P/P0,1/5.255))); 380 | } 381 | 382 | 383 | char SFE_BMP180::getError(void) 384 | // If any library command fails, you can retrieve an extended 385 | // error code using this command. Errors are from the wire library: 386 | // 0 = Success 387 | // 1 = Data too long to fit in transmit buffer 388 | // 2 = Received NACK on transmit of address 389 | // 3 = Received NACK on transmit of data 390 | // 4 = Other error 391 | { 392 | return(_error); 393 | } 394 | 395 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/SFE_BMP180.h: -------------------------------------------------------------------------------- 1 | /* 2 | SFE_BMP180.h 3 | Bosch BMP180 pressure sensor library for the Arduino microcontroller 4 | Mike Grusin, SparkFun Electronics 5 | 6 | Uses floating-point equations from the Weather Station Data Logger project 7 | http://wmrx00.sourceforge.net/ 8 | http://wmrx00.sourceforge.net/Arduino/BMP085-Calcs.pdf 9 | 10 | Forked from BMP085 library by M.Grusin 11 | 12 | version 1.0 2013/09/20 initial version 13 | Verison 1.1.2 - Updated for Arduino 1.6.4 5/2015 14 | 15 | Our example code uses the "beerware" license. You can do anything 16 | you like with this code. No really, anything. If you find it useful, 17 | buy me a (root) beer someday. 18 | */ 19 | 20 | #ifndef SFE_BMP180_h 21 | #define SFE_BMP180_h 22 | 23 | #if defined(ARDUINO) && ARDUINO >= 100 24 | #include "Arduino.h" 25 | #else 26 | #include "WProgram.h" 27 | #endif 28 | 29 | #include 30 | 31 | class SFE_BMP180 32 | { 33 | public: 34 | SFE_BMP180(); // base type 35 | SFE_BMP180(TwoWire *_twi); // base type 36 | 37 | char begin(); 38 | // call pressure.begin() to initialize BMP180 before use 39 | // returns 1 if success, 0 if failure (bad component or I2C bus shorted?) 40 | 41 | char startTemperature(void); 42 | // command BMP180 to start a temperature measurement 43 | // returns (number of ms to wait) for success, 0 for fail 44 | 45 | char getTemperature(double &T); 46 | // return temperature measurement from previous startTemperature command 47 | // places returned value in T variable (deg C) 48 | // returns 1 for success, 0 for fail 49 | 50 | char startPressure(char oversampling); 51 | // command BMP180 to start a pressure measurement 52 | // oversampling: 0 - 3 for oversampling value 53 | // returns (number of ms to wait) for success, 0 for fail 54 | 55 | char getPressure(double &P, double &T); 56 | // return absolute pressure measurement from previous startPressure command 57 | // note: requires previous temperature measurement in variable T 58 | // places returned value in P variable (mbar) 59 | // returns 1 for success, 0 for fail 60 | 61 | double sealevel(double P, double A); 62 | // convert absolute pressure to sea-level pressure (as used in weather data) 63 | // P: absolute pressure (mbar) 64 | // A: current altitude (meters) 65 | // returns sealevel pressure in mbar 66 | 67 | double altitude(double P, double P0); 68 | // convert absolute pressure to altitude (given baseline pressure; sea-level, runway, etc.) 69 | // P: absolute pressure (mbar) 70 | // P0: fixed baseline pressure (mbar) 71 | // returns signed altitude in meters 72 | 73 | char getError(void); 74 | // If any library command fails, you can retrieve an extended 75 | // error code using this command. Errors are from the wire library: 76 | // 0 = Success 77 | // 1 = Data too long to fit in transmit buffer 78 | // 2 = Received NACK on transmit of address 79 | // 3 = Received NACK on transmit of data 80 | // 4 = Other error 81 | 82 | private: 83 | 84 | char readInt(char address, int16_t &value); 85 | // read an signed int (16 bits) from a BMP180 register 86 | // address: BMP180 register address 87 | // value: external signed int for returned value (16 bits) 88 | // returns 1 for success, 0 for fail, with result in value 89 | 90 | char readUInt(char address, uint16_t &value); 91 | // read an unsigned int (16 bits) from a BMP180 register 92 | // address: BMP180 register address 93 | // value: external unsigned int for returned value (16 bits) 94 | // returns 1 for success, 0 for fail, with result in value 95 | 96 | char readBytes(unsigned char *values, char length); 97 | // read a number of bytes from a BMP180 register 98 | // values: array of char with register address in first location [0] 99 | // length: number of bytes to read back 100 | // returns 1 for success, 0 for fail, with read bytes in values[] array 101 | 102 | char writeBytes(unsigned char *values, char length); 103 | // write a number of bytes to a BMP180 register (and consecutive subsequent registers) 104 | // values: array of char with register address in first location [0] 105 | // length: number of bytes to write 106 | // returns 1 for success, 0 for fail 107 | 108 | int16_t AC1,AC2,AC3,VB1,VB2,MB,MC,MD; 109 | uint16_t AC4,AC5,AC6; 110 | double c5,c6,mc,md,x0,x1,x2,y0,y1,y2,p0,p1,p2; 111 | char _error; 112 | 113 | TwoWire *twi; 114 | }; 115 | 116 | #define BMP180_ADDR 0x77 // 7-bit address 117 | 118 | #define BMP180_REG_CONTROL 0xF4 119 | #define BMP180_REG_RESULT 0xF6 120 | 121 | #define BMP180_COMMAND_TEMPERATURE 0x2E 122 | #define BMP180_COMMAND_PRESSURE0 0x34 123 | #define BMP180_COMMAND_PRESSURE1 0x74 124 | #define BMP180_COMMAND_PRESSURE2 0xB4 125 | #define BMP180_COMMAND_PRESSURE3 0xF4 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /Libraries/README.md: -------------------------------------------------------------------------------- 1 | SparkFun BMP180 Libraries 2 | ================================= 3 | 4 | Libraries for use in different environments. 5 | 6 | 7 | Directory Contents 8 | ------------------- 9 | * **/Arduino** - [Arduino IDE](http://www.arduino.cc/en/Main/Software) libraries 10 | * **/Teensy** - [Teensyduino IDE](https://www.pjrc.com/store/teensy35.html) libraries 11 | 12 | 13 | License Information 14 | ------------------- 15 | This product is open source! 16 | The code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round! 17 | Please use, reuse, and modify these files as you see fit. Please maintain attribution to SparkFun Electronics and release anything derivative under the same license. 18 | 19 | Distributed as-is; no warranty is given. 20 | 21 | \- Your friends at SparkFun. 22 | 23 | 24 | 25 | Update Library Instructions: 26 | ---------------------------- 27 | To get the most up-to-date version of the library, you must run the following git subtree commands. 28 | 29 | $git subtree pull -P Libraries/Arduino --squash git@github.com:sparkfun/BMP180_Breakout_Arduino_Library.git master 30 | -------------------------------------------------------------------------------- /Libraries/Teensy/LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | License Information 3 | ------------------- 4 | 5 | The hardware is released under [Creative Commons Share-alike 3.0](http://creativecommons.org/licenses/by-sa/3.0/). 6 | 7 | All other code is open source so please feel free to do anything you want with it; you buy me a beer if you use this and we meet someday ([Beerware license](http://en.wikipedia.org/wiki/Beerware)). 8 | 9 | 10 | -------------------------------------------------------------------------------- /Libraries/Teensy/README.md: -------------------------------------------------------------------------------- 1 | BMP180_Breakout Teensy Library v2.0 2 | ======================================== 3 | 4 | This archive contains a Teensy library and an example sketch showing how to use this sensor. The library must be installed onto your computer in order for the example code to work correctly. 5 | 6 | Info About Update 7 | ------------------- 8 | * Supports all i2c buses, so BMP180 can be connected to the i2c interface specified by the user. (depend of **Wire.h**) 9 | * For using with depend of **i2c_t3.h** library, browse "utilyt" directory and use these files as /src. 10 | 11 | Review the example sketch for more information about using. 12 | 13 | Repository Contents 14 | ------------------- 15 | 16 | * **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. 17 | * **/src** - Source files for the library (.cpp, .h). 18 | * **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE. 19 | * **library.properties** - General library properties for the Teensy package manager. 20 | 21 | Documentation 22 | -------------- 23 | 1. Download "Teensy" directory that in "Libraries" directory. 24 | 2. Compress "Teensy" folder with ".zip" extension. 25 | 3. On Arduino IDE, use Include Libraries via ZIP method. 26 | 27 | There isn't any documentation with details yet for using. The Example Code is like a documentation for now. 28 | 29 | 30 | License Information 31 | ------------------- 32 | 33 | This product is _**open source**_! 34 | This library depends on SparkFUN BMP180 library and https://roboticboat.uk/Teensy/Teensy36/BMP180.html page. 35 | -------------------------------------------------------------------------------- /Libraries/Teensy/examples/PressTempAlt/PressTempAlt.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * BMP180 Teensy 3.5 3 | * 4 | * For Wire, 5 | * SDA 18 6 | * SCL 19 7 | * 8 | * For Wire1, 9 | * SDA 38 10 | * SCL 37 11 | * 12 | * 13 | * For Wire2, 14 | * SDA 4 15 | * SCL 3 16 | * 17 | * For WireX, 18 | * You can see interfaces on the pinouts page: https://www.pjrc.com/teensy/pinout.html* 19 | * 20 | * 21 | */ 22 | #include 23 | double baseline; 24 | double bmpValues[2]; //0: Temperature, 1:Pressure 25 | Teensy_BMP180 bmp180(&Wire); 26 | //Teensy_BMP180 bmp180(&Wire1); //If BMP180 is connected to Wire1 bus 27 | //Teensy_BMP180 bmp180(&Wire2); //If BMP180 is connected to Wire2 bus 28 | 29 | void setup() { 30 | bmp180.begin(); 31 | if(getPressure()){ 32 | baseline=bmpValues[1]; 33 | } 34 | 35 | } 36 | 37 | void loop() { 38 | if(getPressure()){ 39 | double altVal=bmp180.altitude(bmpValues[1],baseline); 40 | Serial.print(bmpValues[0]); 41 | Serial.print(" C | "); 42 | Serial.print(bmpValues[1]); 43 | Serial.print(" mb | "); 44 | Serial.print(altVal); 45 | Serial.println(" cm"); 46 | } 47 | delay(100); 48 | } 49 | 50 | boolean getPressure() 51 | { 52 | if (bmp180.startTemperature() != 0) 53 | { 54 | if (bmp180.getTemperature(bmpValues[0]) != 0) 55 | { 56 | if (bmp180.startPressure() != 0) 57 | { 58 | if (bmp180.getPressure(bmpValues[1],bmpValues[0]) != 0) 59 | { 60 | return(1); 61 | } 62 | } 63 | } 64 | } 65 | return(0); 66 | } 67 | -------------------------------------------------------------------------------- /Libraries/Teensy/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map for SFE_BMP180 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Teensy_BMP180 KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | startTemperature KEYWORD2 17 | getTemperature KEYWORD2 18 | startPressure KEYWORD2 19 | getPressure KEYWORD2 20 | altitude KEYWORD2 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | 26 | BMP180_ADDR LITERAL1 -------------------------------------------------------------------------------- /Libraries/Teensy/library.properties: -------------------------------------------------------------------------------- 1 | name=Teensy BMP180 2 | version=1.0.0 3 | author=Faruk UNAL 4 | maintainer=unalfaruk.com 5 | sentence= 6 | paragraph= 7 | category= 8 | url= 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Libraries/Teensy/src/README.md: -------------------------------------------------------------------------------- 1 | This folder should contain the .cpp and .h files for the library. 2 | 3 | If backward compatibility is needed, source code should be placed in the library root folder and in a "utilyt" folder. 4 | 5 | Check out the [library specification](https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification) for more details. -------------------------------------------------------------------------------- /Libraries/Teensy/src/Teensy_BMP180.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SFE_BMP180.cpp 3 | --- 4 | Bosch BMP180 pressure sensor library for the Teensy microcontroller. 5 | unalfaruk.com / A.Faruk UNAL / ahmet@unalfaruk.com || unalfaruk@outlook.com 6 | This library depends on SparkFUN BMP180 library and https://roboticboat.uk/Teensy/Teensy36/BMP180.html page. 7 | 8 | --- 9 | */ 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | void Teensy_BMP180::begin() 17 | // Initialize library for subsequent pressure measurements 18 | { 19 | //Initialise the pressure library 20 | double c3,c4,b1; 21 | 22 | //Start the wire library 23 | WireSelected->begin(); 24 | 25 | //Read the BMP180 factory settings 26 | if (readInt(0xAA,AC1) && 27 | readInt(0xAC,AC2) && 28 | readInt(0xAE,AC3) && 29 | readUInt(0xB0,AC4) && 30 | readUInt(0xB2,AC5) && 31 | readUInt(0xB4,AC6) && 32 | readInt(0xB6,VB1) && 33 | readInt(0xB8,VB2) && 34 | readInt(0xBA,MB) && 35 | readInt(0xBC,MC) && 36 | readInt(0xBE,MD)) 37 | { 38 | // Calculate calibration polynomials 39 | 40 | c3 = 160.0 * pow(2,-15) * AC3; 41 | c4 = pow(10,-3) * pow(2,-15) * AC4; 42 | b1 = pow(160,2) * pow(2,-30) * VB1; 43 | c5 = (pow(2,-15) / 160) * AC5; 44 | c6 = AC6; 45 | 46 | mc = (pow(2,11) / pow(160,2)) * MC; 47 | md = MD / 160.0; 48 | 49 | xx0 = AC1; 50 | xx1 = 160.0 * pow(2,-13) * AC2; 51 | xx2 = pow(160,2) * pow(2,-25) * VB2; 52 | 53 | yy0 = c4 * pow(2,15); 54 | yy1 = c4 * c3; 55 | yy2 = c4 * b1; 56 | 57 | p0 = (3791.0 - 8.0) / 1600.0; 58 | p1 = 1.0 - 7357.0 * pow(2,-20); 59 | p2 = 3038.0 * 100.0 * pow(2,-36); 60 | 61 | } 62 | } 63 | 64 | 65 | char Teensy_BMP180::readInt(char registerAddress, int16_t &value) 66 | // Read a signed integer (two bytes) from device 67 | // address: register to start reading (plus subsequent register) 68 | // value: external variable to store data (function modifies value) 69 | { 70 | // Read a signed integer from device 71 | 72 | unsigned char byteHigh; 73 | unsigned char byteLow; 74 | 75 | // Begin communication with BMP180 76 | WireSelected->beginTransmission(_i2cAddress); 77 | 78 | // Tell register you want some data 79 | WireSelected->write(registerAddress); 80 | 81 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 82 | //which prevents another master device from transmitting between messages. This allows one master device 83 | //to send multiple transmissions while in control. The default value is true. 84 | int nackCatcher = WireSelected->endTransmission(false); 85 | 86 | // Return if we have a connection problem 87 | if (nackCatcher != 0) {return 0;} 88 | 89 | // Request 2 bytes from BMP180 90 | WireSelected->requestFrom(_i2cAddress , _TWO_BYTES); 91 | 92 | // Wait for the bytes to arrive 93 | while(WireSelected->available() < _TWO_BYTES); 94 | 95 | // Read the values 96 | byteHigh = WireSelected->read(); 97 | byteLow = WireSelected->read(); 98 | 99 | value = (((int16_t)byteHigh <<8) + (int16_t)byteLow); 100 | 101 | // Return true as ok 102 | return(1); 103 | } 104 | 105 | 106 | char Teensy_BMP180::readUInt(char registerAddress, uint16_t &value) 107 | // Read an unsigned integer (two bytes) from device 108 | // address: register to start reading (plus subsequent register) 109 | // value: external variable to store data (function modifies value) 110 | { 111 | // Read an unsigned integer from device 112 | 113 | unsigned char byteHigh; 114 | unsigned char byteLow; 115 | 116 | // Begin communication with BMP180 117 | WireSelected->beginTransmission(_i2cAddress); 118 | 119 | // Tell register you want some data 120 | WireSelected->write(registerAddress); 121 | 122 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 123 | //which prevents another master device from transmitting between messages. This allows one master device 124 | //to send multiple transmissions while in control. The default value is true. 125 | int nackCatcher = WireSelected->endTransmission(false); 126 | 127 | // Return if we have a connection problem 128 | if (nackCatcher != 0) {return 0;} 129 | 130 | // Request 2 bytes from BMP180 131 | WireSelected->requestFrom(_i2cAddress , _TWO_BYTES); 132 | 133 | // Wait for the bytes to arrive 134 | while(WireSelected->available() < _TWO_BYTES); 135 | 136 | // Read the values 137 | byteHigh = WireSelected->read(); 138 | byteLow = WireSelected->read(); 139 | 140 | value = (((uint16_t)byteHigh <<8) + (uint16_t)byteLow); 141 | 142 | // Return true as ok 143 | return(1); 144 | } 145 | 146 | 147 | 148 | 149 | char Teensy_BMP180::startTemperature(void) 150 | // Begin a temperature reading. 151 | // Will return delay in ms to wait, or 0 if I2C error 152 | { 153 | // Begin communication with BMP180 154 | WireSelected->beginTransmission(_i2cAddress); 155 | 156 | // Tell register an instruction 157 | WireSelected->write(_Register_CONTROL); 158 | WireSelected->write(_COMMAND_TEMPERATURE); 159 | 160 | //End transmission and release the bus. The default value is true. 161 | int nackCatcher = WireSelected->endTransmission(); 162 | 163 | // Return if we have a connection problem 164 | if (nackCatcher != 0) {return 0;} 165 | 166 | // Return true as ok 167 | return(1); 168 | 169 | } 170 | 171 | 172 | char Teensy_BMP180::getTemperature(double &T) 173 | // Retrieve a previously-started temperature reading. 174 | // Requires begin() to be called once prior to retrieve calibration parameters. 175 | // Requires startTemperature() to have been called prior and sufficient time elapsed. 176 | // T: external variable to hold result. 177 | // Returns 1 if successful, 0 if I2C error. 178 | { 179 | unsigned char byteHigh; 180 | unsigned char byteLow; 181 | double tu, a; 182 | 183 | // Wait for the measurement to complete: 184 | delay(5); 185 | 186 | // Begin communication with BMP180 187 | WireSelected->beginTransmission(_i2cAddress); 188 | 189 | // Tell register you want some data 190 | WireSelected->write(_Register_RESULT); 191 | 192 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 193 | //which prevents another master device from transmitting between messages. This allows one master device 194 | //to send multiple transmissions while in control. The default value is true. 195 | int nackCatcher = WireSelected->endTransmission(false); 196 | 197 | // Return if we have a connection problem 198 | if (nackCatcher != 0) {return 0;} 199 | 200 | // Request 2 bytes from BMP180 201 | WireSelected->requestFrom(_i2cAddress , _TWO_BYTES); 202 | 203 | // Wait for the bytes to arrive 204 | while(WireSelected->available() < _TWO_BYTES); 205 | 206 | // Read the values 207 | byteHigh = WireSelected->read(); 208 | byteLow = WireSelected->read(); 209 | 210 | // Calculate the temperature 211 | tu = (byteHigh << 8) + byteLow; 212 | a = c5 * (tu - c6); 213 | T = a + (mc / (a + md)); 214 | 215 | // Return true as ok 216 | return(1); 217 | } 218 | 219 | 220 | //char Teensy_BMP180::startPressure(char oversampling) 221 | char Teensy_BMP180::startPressure(void) 222 | 223 | // Begin a pressure reading. 224 | // Oversampling: 0 to 3, higher numbers are slower, higher-res outputs. 225 | // Will return delay in ms to wait, or 0 if I2C error. 226 | { 227 | // Begin a pressure reading. 228 | WireSelected->beginTransmission(_i2cAddress); 229 | 230 | // Tell register an instruction 231 | WireSelected->write(_Register_CONTROL); 232 | WireSelected->write(_COMMAND_PRESSURE); 233 | 234 | //End transmission and release the bus. The default value is true. 235 | int nackCatcher = WireSelected->endTransmission(); 236 | 237 | // Return if we have a connection problem 238 | if (nackCatcher != 0) {return 0;} 239 | 240 | // Return true as ok 241 | return(1); 242 | } 243 | 244 | 245 | char Teensy_BMP180::getPressure(double &P, double &T) 246 | // Retrieve a previously started pressure reading, calculate abolute pressure in mbars. 247 | // Requires begin() to be called once prior to retrieve calibration parameters. 248 | // Requires startPressure() to have been called prior and sufficient time elapsed. 249 | // Requires recent temperature reading to accurately calculate pressure. 250 | 251 | // P: external variable to hold pressure. 252 | // T: previously-calculated temperature. 253 | // Returns 1 for success, 0 for I2C error. 254 | 255 | // Note that calculated pressure value is absolute mbars, to compensate for altitude call sealevel(). 256 | { 257 | unsigned char byteHigh; 258 | unsigned char byteMid; 259 | unsigned char byteLow; 260 | double pu,s,x,y,z; 261 | 262 | // Wait for the measurement to complete: 263 | delay(26); 264 | 265 | // Begin communication with BMP180 266 | WireSelected->beginTransmission(_i2cAddress); 267 | 268 | // Tell register you want some data 269 | WireSelected->write(_Register_RESULT); 270 | 271 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 272 | //which prevents another master device from transmitting between messages. This allows one master device 273 | //to send multiple transmissions while in control. The default value is true. 274 | int nackCatcher = WireSelected->endTransmission(); 275 | 276 | // Return if we have a connection problem 277 | if (nackCatcher != 0) {return 0;} 278 | 279 | // Request 3 bytes from BMP180 280 | WireSelected->requestFrom(_i2cAddress , _THREE_BYTES); 281 | 282 | // Wait for the bytes to arrive 283 | while(WireSelected->available() < _THREE_BYTES); 284 | 285 | // Read the values 286 | byteHigh = WireSelected->read(); 287 | byteMid = WireSelected->read(); 288 | byteLow = WireSelected->read(); 289 | 290 | // Calculate absolute pressure in mbars. 291 | pu = (byteHigh * 256.0) + byteMid + (byteLow/256.0); 292 | 293 | s = T - 25.0; 294 | x = (xx2 * pow(s,2)) + (xx1 * s) + xx0; 295 | y = (yy2 * pow(s,2)) + (yy1 * s) + yy0; 296 | z = (pu - x) / y; 297 | P = (p2 * pow(z,2)) + (p1 * z) + p0; 298 | 299 | return(1); 300 | } 301 | 302 | double Teensy_BMP180::altitude(double P, double P0) 303 | // Given a pressure measurement P (mb) and the pressure at a baseline P0 (mb), 304 | // return altitude (meters) above baseline. 305 | { 306 | return(44330.0*(1-pow(P/P0,1/5.255))); 307 | } 308 | -------------------------------------------------------------------------------- /Libraries/Teensy/src/Teensy_BMP180.h: -------------------------------------------------------------------------------- 1 | /* 2 | SFE_BMP180.h 3 | --- 4 | Bosch BMP180 pressure sensor library for the Teensy microcontroller. 5 | unalfaruk.com / A.Faruk UNAL / ahmet@unalfaruk.com || unalfaruk@outlook.com 6 | This library depends on SparkFUN BMP180 library and https://roboticboat.uk/Teensy/Teensy36/BMP180.html page. 7 | 8 | --- 9 | */ 10 | 11 | #ifndef Teensy_BMP180_h 12 | #define Teensy_BMP180_h 13 | #include "Wire.h" 14 | class Teensy_BMP180 15 | { 16 | public: 17 | 18 | Teensy_BMP180(TwoWire *hwWire){ 19 | WireSelected=hwWire; 20 | } // base type 21 | 22 | void begin(); 23 | // call pressure.begin() to initialize BMP180 before use 24 | // returns 1 if success, 0 if failure (bad component or I2C bus shorted?) 25 | 26 | char startTemperature(void); 27 | // command BMP180 to start a temperature measurement 28 | // returns (number of ms to wait) for success, 0 for fail 29 | 30 | char getTemperature(double &T); 31 | // return temperature measurement from previous startTemperature command 32 | // places returned value in T variable (deg C) 33 | // returns 1 for success, 0 for fail 34 | 35 | char startPressure(void); 36 | // command BMP180 to start a pressure measurement 37 | // oversampling: 0 - 3 for oversampling value 38 | // returns (number of ms to wait) for success, 0 for fail 39 | 40 | char getPressure(double &P, double &T); 41 | // return absolute pressure measurement from previous startPressure command 42 | // note: requires previous temperature measurement in variable T 43 | // places returned value in P variable (mbar) 44 | // returns 1 for success, 0 for fail 45 | 46 | double altitude(double P, double P0); 47 | // convert absolute pressure to altitude (given baseline pressure; sea-level, runway, etc.) 48 | // P: absolute pressure (mbar) 49 | // P0: fixed baseline pressure (mbar) 50 | // returns signed altitude in meters 51 | 52 | 53 | 54 | private: 55 | 56 | char readInt(char address, int16_t &value); 57 | // read an signed int (16 bits) from a BMP180 register 58 | // address: BMP180 register address 59 | // value: external signed int for returned value (16 bits) 60 | // returns 1 for success, 0 for fail, with result in value 61 | 62 | char readUInt(char address, uint16_t &value); 63 | // read an unsigned int (16 bits) from a BMP180 register 64 | // address: BMP180 register address 65 | // value: external unsigned int for returned value (16 bits) 66 | // returns 1 for success, 0 for fail, with result in value 67 | 68 | 69 | int16_t AC1,AC2,AC3,VB1,VB2,MB,MC,MD; 70 | uint16_t AC4,AC5,AC6; 71 | 72 | double c5,c6,mc,md; 73 | double xx0,xx1,xx2; 74 | double yy0,yy1,yy2; 75 | double p0,p1,p2; 76 | 77 | TwoWire *WireSelected; 78 | }; 79 | 80 | //Address of the BMP180 address 81 | #define _i2cAddress 0x77 82 | 83 | //Registers 84 | #define _Register_CONTROL 0xF4 85 | #define _Register_RESULT 0xF6 86 | 87 | //Commands 88 | #define _COMMAND_TEMPERATURE 0x2E 89 | #define _COMMAND_PRESSURE 0xF4 90 | 91 | #define _ONE_BYTE 1 92 | #define _TWO_BYTES 2 93 | #define _THREE_BYTES 3 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /Libraries/Teensy/utilyt/README.md: -------------------------------------------------------------------------------- 1 | This folder should contain the .cpp and .h files for the library. 2 | 3 | This code supports i2c_t3.h library. You can use this code for Teensy devices. Example sketch is compatible with this source code. -------------------------------------------------------------------------------- /Libraries/Teensy/utilyt/Teensy_BMP180.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SFE_BMP180.cpp 3 | --- 4 | Bosch BMP180 pressure sensor library for the Teensy microcontroller. 5 | unalfaruk.com / A.Faruk UNAL / ahmet@unalfaruk.com || unalfaruk@outlook.com 6 | This library depends on SparkFUN BMP180 library and https://roboticboat.uk/Teensy/Teensy36/BMP180.html page. 7 | 8 | --- 9 | */ 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | void Teensy_BMP180::begin() 17 | // Initialize library for subsequent pressure measurements 18 | { 19 | //Initialise the pressure library 20 | double c3,c4,b1; 21 | 22 | //Start the wire library 23 | WireSelected->begin(); 24 | 25 | //Read the BMP180 factory settings 26 | if (readInt(0xAA,AC1) && 27 | readInt(0xAC,AC2) && 28 | readInt(0xAE,AC3) && 29 | readUInt(0xB0,AC4) && 30 | readUInt(0xB2,AC5) && 31 | readUInt(0xB4,AC6) && 32 | readInt(0xB6,VB1) && 33 | readInt(0xB8,VB2) && 34 | readInt(0xBA,MB) && 35 | readInt(0xBC,MC) && 36 | readInt(0xBE,MD)) 37 | { 38 | // Calculate calibration polynomials 39 | 40 | c3 = 160.0 * pow(2,-15) * AC3; 41 | c4 = pow(10,-3) * pow(2,-15) * AC4; 42 | b1 = pow(160,2) * pow(2,-30) * VB1; 43 | c5 = (pow(2,-15) / 160) * AC5; 44 | c6 = AC6; 45 | 46 | mc = (pow(2,11) / pow(160,2)) * MC; 47 | md = MD / 160.0; 48 | 49 | xx0 = AC1; 50 | xx1 = 160.0 * pow(2,-13) * AC2; 51 | xx2 = pow(160,2) * pow(2,-25) * VB2; 52 | 53 | yy0 = c4 * pow(2,15); 54 | yy1 = c4 * c3; 55 | yy2 = c4 * b1; 56 | 57 | p0 = (3791.0 - 8.0) / 1600.0; 58 | p1 = 1.0 - 7357.0 * pow(2,-20); 59 | p2 = 3038.0 * 100.0 * pow(2,-36); 60 | 61 | } 62 | } 63 | 64 | 65 | char Teensy_BMP180::readInt(char registerAddress, int16_t &value) 66 | // Read a signed integer (two bytes) from device 67 | // address: register to start reading (plus subsequent register) 68 | // value: external variable to store data (function modifies value) 69 | { 70 | // Read a signed integer from device 71 | 72 | unsigned char byteHigh; 73 | unsigned char byteLow; 74 | 75 | // Begin communication with BMP180 76 | WireSelected->beginTransmission(_i2cAddress); 77 | 78 | // Tell register you want some data 79 | WireSelected->write(registerAddress); 80 | 81 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 82 | //which prevents another master device from transmitting between messages. This allows one master device 83 | //to send multiple transmissions while in control. The default value is true. 84 | int nackCatcher = WireSelected->endTransmission(false); 85 | 86 | // Return if we have a connection problem 87 | if (nackCatcher != 0) {return 0;} 88 | 89 | // Request 2 bytes from BMP180 90 | WireSelected->requestFrom(_i2cAddress , _TWO_BYTES); 91 | 92 | // Wait for the bytes to arrive 93 | while(WireSelected->available() < _TWO_BYTES); 94 | 95 | // Read the values 96 | byteHigh = WireSelected->read(); 97 | byteLow = WireSelected->read(); 98 | 99 | value = (((int16_t)byteHigh <<8) + (int16_t)byteLow); 100 | 101 | // Return true as ok 102 | return(1); 103 | } 104 | 105 | 106 | char Teensy_BMP180::readUInt(char registerAddress, uint16_t &value) 107 | // Read an unsigned integer (two bytes) from device 108 | // address: register to start reading (plus subsequent register) 109 | // value: external variable to store data (function modifies value) 110 | { 111 | // Read an unsigned integer from device 112 | 113 | unsigned char byteHigh; 114 | unsigned char byteLow; 115 | 116 | // Begin communication with BMP180 117 | WireSelected->beginTransmission(_i2cAddress); 118 | 119 | // Tell register you want some data 120 | WireSelected->write(registerAddress); 121 | 122 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 123 | //which prevents another master device from transmitting between messages. This allows one master device 124 | //to send multiple transmissions while in control. The default value is true. 125 | int nackCatcher = WireSelected->endTransmission(false); 126 | 127 | // Return if we have a connection problem 128 | if (nackCatcher != 0) {return 0;} 129 | 130 | // Request 2 bytes from BMP180 131 | WireSelected->requestFrom(_i2cAddress , _TWO_BYTES); 132 | 133 | // Wait for the bytes to arrive 134 | while(WireSelected->available() < _TWO_BYTES); 135 | 136 | // Read the values 137 | byteHigh = WireSelected->read(); 138 | byteLow = WireSelected->read(); 139 | 140 | value = (((uint16_t)byteHigh <<8) + (uint16_t)byteLow); 141 | 142 | // Return true as ok 143 | return(1); 144 | } 145 | 146 | 147 | 148 | 149 | char Teensy_BMP180::startTemperature(void) 150 | // Begin a temperature reading. 151 | // Will return delay in ms to wait, or 0 if I2C error 152 | { 153 | // Begin communication with BMP180 154 | WireSelected->beginTransmission(_i2cAddress); 155 | 156 | // Tell register an instruction 157 | WireSelected->write(_Register_CONTROL); 158 | WireSelected->write(_COMMAND_TEMPERATURE); 159 | 160 | //End transmission and release the bus. The default value is true. 161 | int nackCatcher = WireSelected->endTransmission(); 162 | 163 | // Return if we have a connection problem 164 | if (nackCatcher != 0) {return 0;} 165 | 166 | // Return true as ok 167 | return(1); 168 | 169 | } 170 | 171 | 172 | char Teensy_BMP180::getTemperature(double &T) 173 | // Retrieve a previously-started temperature reading. 174 | // Requires begin() to be called once prior to retrieve calibration parameters. 175 | // Requires startTemperature() to have been called prior and sufficient time elapsed. 176 | // T: external variable to hold result. 177 | // Returns 1 if successful, 0 if I2C error. 178 | { 179 | unsigned char byteHigh; 180 | unsigned char byteLow; 181 | double tu, a; 182 | 183 | // Wait for the measurement to complete: 184 | delay(5); 185 | 186 | // Begin communication with BMP180 187 | WireSelected->beginTransmission(_i2cAddress); 188 | 189 | // Tell register you want some data 190 | WireSelected->write(_Register_RESULT); 191 | 192 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 193 | //which prevents another master device from transmitting between messages. This allows one master device 194 | //to send multiple transmissions while in control. The default value is true. 195 | int nackCatcher = WireSelected->endTransmission(false); 196 | 197 | // Return if we have a connection problem 198 | if (nackCatcher != 0) {return 0;} 199 | 200 | // Request 2 bytes from BMP180 201 | WireSelected->requestFrom(_i2cAddress , _TWO_BYTES); 202 | 203 | // Wait for the bytes to arrive 204 | while(WireSelected->available() < _TWO_BYTES); 205 | 206 | // Read the values 207 | byteHigh = WireSelected->read(); 208 | byteLow = WireSelected->read(); 209 | 210 | // Calculate the temperature 211 | tu = (byteHigh << 8) + byteLow; 212 | a = c5 * (tu - c6); 213 | T = a + (mc / (a + md)); 214 | 215 | // Return true as ok 216 | return(1); 217 | } 218 | 219 | 220 | //char Teensy_BMP180::startPressure(char oversampling) 221 | char Teensy_BMP180::startPressure(void) 222 | 223 | // Begin a pressure reading. 224 | // Oversampling: 0 to 3, higher numbers are slower, higher-res outputs. 225 | // Will return delay in ms to wait, or 0 if I2C error. 226 | { 227 | // Begin a pressure reading. 228 | WireSelected->beginTransmission(_i2cAddress); 229 | 230 | // Tell register an instruction 231 | WireSelected->write(_Register_CONTROL); 232 | WireSelected->write(_COMMAND_PRESSURE); 233 | 234 | //End transmission and release the bus. The default value is true. 235 | int nackCatcher = WireSelected->endTransmission(); 236 | 237 | // Return if we have a connection problem 238 | if (nackCatcher != 0) {return 0;} 239 | 240 | // Return true as ok 241 | return(1); 242 | } 243 | 244 | 245 | char Teensy_BMP180::getPressure(double &P, double &T) 246 | // Retrieve a previously started pressure reading, calculate abolute pressure in mbars. 247 | // Requires begin() to be called once prior to retrieve calibration parameters. 248 | // Requires startPressure() to have been called prior and sufficient time elapsed. 249 | // Requires recent temperature reading to accurately calculate pressure. 250 | 251 | // P: external variable to hold pressure. 252 | // T: previously-calculated temperature. 253 | // Returns 1 for success, 0 for I2C error. 254 | 255 | // Note that calculated pressure value is absolute mbars, to compensate for altitude call sealevel(). 256 | { 257 | unsigned char byteHigh; 258 | unsigned char byteMid; 259 | unsigned char byteLow; 260 | double pu,s,x,y,z; 261 | 262 | // Wait for the measurement to complete: 263 | delay(26); 264 | 265 | // Begin communication with BMP180 266 | WireSelected->beginTransmission(_i2cAddress); 267 | 268 | // Tell register you want some data 269 | WireSelected->write(_Register_RESULT); 270 | 271 | //If false, endTransmission() sends a restart message after transmission. The bus will not be released, 272 | //which prevents another master device from transmitting between messages. This allows one master device 273 | //to send multiple transmissions while in control. The default value is true. 274 | int nackCatcher = WireSelected->endTransmission(); 275 | 276 | // Return if we have a connection problem 277 | if (nackCatcher != 0) {return 0;} 278 | 279 | // Request 3 bytes from BMP180 280 | WireSelected->requestFrom(_i2cAddress , _THREE_BYTES); 281 | 282 | // Wait for the bytes to arrive 283 | while(WireSelected->available() < _THREE_BYTES); 284 | 285 | // Read the values 286 | byteHigh = WireSelected->read(); 287 | byteMid = WireSelected->read(); 288 | byteLow = WireSelected->read(); 289 | 290 | // Calculate absolute pressure in mbars. 291 | pu = (byteHigh * 256.0) + byteMid + (byteLow/256.0); 292 | 293 | s = T - 25.0; 294 | x = (xx2 * pow(s,2)) + (xx1 * s) + xx0; 295 | y = (yy2 * pow(s,2)) + (yy1 * s) + yy0; 296 | z = (pu - x) / y; 297 | P = (p2 * pow(z,2)) + (p1 * z) + p0; 298 | 299 | return(1); 300 | } 301 | 302 | double Teensy_BMP180::altitude(double P, double P0) 303 | // Given a pressure measurement P (mb) and the pressure at a baseline P0 (mb), 304 | // return altitude (meters) above baseline. 305 | { 306 | return(44330.0*(1-pow(P/P0,1/5.255))); 307 | } 308 | -------------------------------------------------------------------------------- /Libraries/Teensy/utilyt/Teensy_BMP180.h: -------------------------------------------------------------------------------- 1 | /* 2 | SFE_BMP180.h 3 | --- 4 | Bosch BMP180 pressure sensor library for the Teensy microcontroller. 5 | unalfaruk.com / A.Faruk UNAL / ahmet@unalfaruk.com || unalfaruk@outlook.com 6 | This library depends on SparkFUN BMP180 library and https://roboticboat.uk/Teensy/Teensy36/BMP180.html page. 7 | 8 | --- 9 | */ 10 | 11 | #ifndef Teensy_BMP180_h 12 | #define Teensy_BMP180_h 13 | 14 | #include "i2c_t3.h" 15 | 16 | class Teensy_BMP180 17 | { 18 | public: 19 | 20 | Teensy_BMP180(i2c_t3 *hwWire){ 21 | WireSelected=hwWire; 22 | } // base type 23 | 24 | void begin(); 25 | // call pressure.begin() to initialize BMP180 before use 26 | // returns 1 if success, 0 if failure (bad component or I2C bus shorted?) 27 | 28 | char startTemperature(void); 29 | // command BMP180 to start a temperature measurement 30 | // returns (number of ms to wait) for success, 0 for fail 31 | 32 | char getTemperature(double &T); 33 | // return temperature measurement from previous startTemperature command 34 | // places returned value in T variable (deg C) 35 | // returns 1 for success, 0 for fail 36 | 37 | char startPressure(void); 38 | // command BMP180 to start a pressure measurement 39 | // oversampling: 0 - 3 for oversampling value 40 | // returns (number of ms to wait) for success, 0 for fail 41 | 42 | char getPressure(double &P, double &T); 43 | // return absolute pressure measurement from previous startPressure command 44 | // note: requires previous temperature measurement in variable T 45 | // places returned value in P variable (mbar) 46 | // returns 1 for success, 0 for fail 47 | 48 | double altitude(double P, double P0); 49 | // convert absolute pressure to altitude (given baseline pressure; sea-level, runway, etc.) 50 | // P: absolute pressure (mbar) 51 | // P0: fixed baseline pressure (mbar) 52 | // returns signed altitude in meters 53 | 54 | 55 | 56 | private: 57 | 58 | char readInt(char address, int16_t &value); 59 | // read an signed int (16 bits) from a BMP180 register 60 | // address: BMP180 register address 61 | // value: external signed int for returned value (16 bits) 62 | // returns 1 for success, 0 for fail, with result in value 63 | 64 | char readUInt(char address, uint16_t &value); 65 | // read an unsigned int (16 bits) from a BMP180 register 66 | // address: BMP180 register address 67 | // value: external unsigned int for returned value (16 bits) 68 | // returns 1 for success, 0 for fail, with result in value 69 | 70 | 71 | int16_t AC1,AC2,AC3,VB1,VB2,MB,MC,MD; 72 | uint16_t AC4,AC5,AC6; 73 | 74 | double c5,c6,mc,md; 75 | double xx0,xx1,xx2; 76 | double yy0,yy1,yy2; 77 | double p0,p1,p2; 78 | 79 | i2c_t3 *WireSelected; 80 | }; 81 | 82 | //Address of the BMP180 address 83 | #define _i2cAddress 0x77 84 | 85 | //Registers 86 | #define _Register_CONTROL 0xF4 87 | #define _Register_RESULT 0xF6 88 | 89 | //Commands 90 | #define _COMMAND_TEMPERATURE 0x2E 91 | #define _COMMAND_PRESSURE 0xF4 92 | 93 | #define _ONE_BYTE 1 94 | #define _TWO_BYTES 2 95 | #define _THREE_BYTES 3 96 | 97 | #endif 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **NOTE:** *This product has been retired from our catalog. If you are looking for more up-to-date info, please check out some of these resources to see how other users are still hacking and improving on this product.* 2 | * *[SparkFun Forum](https://forum.sparkfun.com/)* 3 | * *[Comments Here on GitHub](https://github.com/sparkfun/BMP180_Breakout_Arduino_Library/issues)* 4 | * *[IRC Channel](https://www.sparkfun.com/news/263)* 5 | 6 | BMP180_Breakout 7 | =============== 8 | 9 | Breakout board and example code for the Bosch BMP180 barometric pressure sensor. 10 | 11 | ![BMP180 Breakout](https://dlnmh9ip6v2uc.cloudfront.net/images/products/1/1/8/2/4/11824-01.jpg) 12 | 13 | Product page: [www.sparkfun.com/products/11824](https://www.sparkfun.com/products/11824) 14 | 15 | Datasheet: [github.com/sparkfun/BMP180_Breakout/blob/master/BMP180 Datasheet V2.5.pdf](https://github.com/sparkfun/BMP180_Breakout/blob/master/BMP180%20Datasheet%20V2.5.pdf?raw=true) 16 | 17 | Github repository: [github.com/sparkfun/BMP180_Breakout](https://github.com/sparkfun/BMP180_Breakout) 18 | 19 | Arduino library installation: 20 | ------------------- 21 | 22 | This archive contains an Arduino library and example sketch showing how to use this sensor. The library must be installed onto your computer in order for the example code to work correctly. 23 | 24 | If you haven't, install the free Arduino IDE (Integrated Development Environment), available at [www.arduino.cc](http://www.arduino.cc). This code was written using Arduino version 1.0.5. and updated to be used with the Arduino library manager of version 1.6.3. 25 | 26 | To install without the manager, download the Arduino folder then use the Arduino IDE to add it. From the IDE, go Sketch->Include Library->"Add .ZIP Library", then choose the Arduino folder that was downloaded. The IDE will pick proper names from the library.properties file and put the libraries in your user sketch folder. 27 | 28 | Teensy library installation: 29 | ------------------- 30 | 31 | [A. Faruk](https://github.com/unalfaruk) was kind enough to create a version of this library for the [Teensy](https://www.pjrc.com/teensy/) microcontroller family. You can find information on installation and use of this library at: https://github.com/sparkfun/BMP180_Breakout/tree/master/Libraries/Teensy 32 | 33 | Running the example sketch: 34 | ------------------- 35 | 36 |
    37 |
  1. Connect the BMP180 breakout board to your Arduino. You can solder wires, use jumper wires and headers, etc. 38 |

    39 | "-" (GND) to GND 40 |
    41 | "+" (VDD) to 3.3V 42 |

    43 | (WARNING: do not connect "+" to 5V or the sensor will be damaged!) 44 |

    45 | You will also need to connect the I2C pins (SCL and SDA) to your Arduino. 46 | These pins are different on different Arduino models: 47 |

    48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
    Any ArduinoSDA SCL
    Uno, Redboard, Pro/Mini A4A5
    Mega2560, Due2021
    Leonardo, Pro/Micro23
    70 |

    71 | Leave the IO (VDDIO) pin unconnected. This pin is for connecting 72 | the BMP180 to systems with lower logic levels such as 1.8V. 73 |

  2. 74 |
  3. 75 | Connect your Arduino to your computer. 76 |

    77 |

  4. 78 |
  5. 79 | Start the Arduino IDE. Select the proper COM port and board type. 80 |

    81 |

  6. 82 |
  7. 83 | In the Arduino IDE, go to the File menu, and down to Examples/SFE_BMP180/SFE_BMP180_example. If you do not see this item, you likely did not install the library properly. See above. 84 |

    85 |

  8. 86 |
  9. 87 | Upload the sketch to your Arduino. 88 |

    89 |

  10. 90 |
  11. 91 | Open the Serial Monitor window (magnifying glass icon un upper right of IDE). 92 |

    93 |

  12. 94 |
  13. 95 | Set the Serial Monitor to 9600 baud (menu in bottom right). 96 |

    97 |

  14. 98 |
99 | You should now be seeing pressure measurements in the Serial Monitor window. If you see errors, you may not have connected the BMP180 Breakout Board to your Arduino properly. See step 1 above. 100 | 101 | If you have questions, don't hesistate to contact us at techsupport@sparkfun.com. 102 | 103 | Have fun! 104 | Your friends at SparkFun. 105 | 106 | License Informatiom 107 | ------------------- 108 | 109 | Software and hardware license information can be found at: https://github.com/sparkfun/BMP180_Breakout/blob/master/LICENSE.md 110 | 111 | Authors 112 | ------- 113 | 114 | * Mike Grusin, SparkFun Electronics 115 | 116 | Acknowledgements 117 | ---------------- 118 | 119 | * The SFE_BMP180 library uses [floating-point equations](http://wmrx00.sourceforge.net/Arduino/BMP085-Calcs.pdf) for the BMP085 developed by the [Weather Station Data Logger project](http://wmrx00.sourceforge.net/). 120 | 121 | * Thank you to [A. Faruk](https://github.com/unalfaruk) for modifications to support the PJRC Teensy microcontroller family. 122 | 123 | * Thank you to [Asafe Silva](https://github.com/AsafeSilva) for providing support for alternate I2C implementations. 124 | 125 | Changelog 126 | --------- 127 | + Release [V_1.1.0](https://github.com/sparkfun/BMP180_Breakout/tree/V_1.1.0) 128 | * Restructred for arduino IDE 129 | * Pulled in library 130 | 131 | + hardware V10 (release) 132 | 133 | * Minor updates 134 | * Library fork from SFE_BMP085 135 | 136 | + hardware V02 (proto) 137 | 138 | * Rearranged header: put VDD/GND/SDA/SCL in "standard" order 139 | * I2C pullups to VDDIO 140 | 141 | + hardware V01 (review) 142 | -------------------------------------------------------------------------------- /hardware/SparkFun_BMP180_Breakout.brd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | BMP180 127 | + 128 | IO 129 | - 130 | CL 131 | DA 132 | BMP180 133 | SDA 134 | SCL 135 | GND 136 | VDDIO 137 | VDD 138 | 139 | 140 | 141 | 142 | 0.125 X 2 143 | M Grusin 144 | 145 | V10 146 | BARO 147 | BARO 148 | SJ1 149 | SJ2 150 | 151 | 152 | 153 | <h3>SparkFun Electronics' preferred foot prints</h3> 154 | In this library you'll find non-functional items- supply symbols, logos, notations, frame blocks, etc.<br><br> 155 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 156 | <br><br> 157 | <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 158 | 159 | 160 | Released under the Creative Commons Attribution Share-Alike 3.0 License 161 | http://creativecommons.org/licenses/by-sa/3.0 162 | Designed by: 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | >NAME 547 | >VALUE 548 | PASTE 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | >NAME 558 | >VALUE 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | Small solder jumper with big paste layer so it will short during reflow. 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | >NAME 578 | >VALUE 579 | 580 | PASTE 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | <h3>SparkFun Electronics' preferred foot prints</h3> 590 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> 591 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 592 | <br><br> 593 | <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | >NAME 605 | >VALUE 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | <h3>SparkFun Electronics' preferred foot prints</h3> 615 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> 616 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 617 | <br><br> 618 | <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | >NAME 631 | >VALUE 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | >NAME 649 | >VALUE 650 | 651 | 652 | 653 | 654 | <h3>SparkFun Electronics' preferred foot prints</h3> 655 | In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br> 656 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 657 | <br><br> 658 | <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 659 | 660 | 661 | <b>Stand Off</b><p> 662 | This is the mechanical footprint for a #4 phillips button head screw. Use the keepout ring to avoid running the screw head into surrounding components. SKU : PRT-00447 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | <h3>SparkFun Electronics' preferred foot prints</h3> 674 | In this library you'll find sensors- accelerometers, gyros, compasses, magnetometers, light sensors, imagers, temp sensors, etc.<br><br> 675 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 676 | <br><br> 677 | <b>Licensing:</b> CC v3.0 Share-Alike You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | >NAME 706 | >VALUE 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | <b>EAGLE Design Rules</b> 722 | <p> 723 | The default Design Rules have been set to cover 724 | a wide range of applications. Your particular design 725 | may have different requirements, so please make the 726 | necessary adjustments and save your customized 727 | design rules under a new name. 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | --------------------------------------------------------------------------------