|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <title>BME280 Free Pascal Driver for Raspberry Pi</title> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 7 | + <meta name="description" content="Free Pascal driver for the BME280 sensor on Raspberry Pi. Temperature, humidity, air pressure and dewpoint calculation."> |
| 8 | + |
| 9 | + <style> |
| 10 | + body { |
| 11 | + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif; |
| 12 | + margin: 0; |
| 13 | + background: #f7f9fb; |
| 14 | + color: #222; |
| 15 | + line-height: 1.6; |
| 16 | + } |
| 17 | + |
| 18 | + header { |
| 19 | + background: #263238; |
| 20 | + color: #fff; |
| 21 | + padding: 2.5rem 1rem; |
| 22 | + text-align: center; |
| 23 | + } |
| 24 | + |
| 25 | + header h1 { |
| 26 | + margin: 0; |
| 27 | + font-size: 2.3rem; |
| 28 | + } |
| 29 | + |
| 30 | + header p { |
| 31 | + margin-top: 0.6rem; |
| 32 | + color: #cfd8dc; |
| 33 | + font-size: 1.05rem; |
| 34 | + } |
| 35 | + |
| 36 | + main { |
| 37 | + max-width: 1100px; |
| 38 | + margin: auto; |
| 39 | + background: #fff; |
| 40 | + padding: 2rem 1.5rem; |
| 41 | + } |
| 42 | + |
| 43 | + h2 { |
| 44 | + margin-top: 2.5rem; |
| 45 | + border-bottom: 2px solid #eceff1; |
| 46 | + padding-bottom: 0.3rem; |
| 47 | + color: #37474f; |
| 48 | + } |
| 49 | + |
| 50 | + h3 { |
| 51 | + color: #37474f; |
| 52 | + } |
| 53 | + |
| 54 | + table { |
| 55 | + width: 100%; |
| 56 | + border-collapse: collapse; |
| 57 | + margin: 1rem 0 2rem 0; |
| 58 | + font-size: 0.95rem; |
| 59 | + } |
| 60 | + |
| 61 | + th, td { |
| 62 | + border: 1px solid #cfd8dc; |
| 63 | + padding: 0.55rem 0.7rem; |
| 64 | + text-align: left; |
| 65 | + } |
| 66 | + |
| 67 | + th { |
| 68 | + background: #eceff1; |
| 69 | + } |
| 70 | + |
| 71 | + code { |
| 72 | + background: #eceff1; |
| 73 | + padding: 0.2rem 0.4rem; |
| 74 | + border-radius: 4px; |
| 75 | + font-family: Consolas, monospace; |
| 76 | + } |
| 77 | + |
| 78 | + pre { |
| 79 | + background: #eceff1; |
| 80 | + padding: 1rem; |
| 81 | + border-radius: 6px; |
| 82 | + overflow-x: auto; |
| 83 | + } |
| 84 | + |
| 85 | + img { |
| 86 | + max-width: 100%; |
| 87 | + display: block; |
| 88 | + margin: 2rem auto; |
| 89 | + border-radius: 6px; |
| 90 | + } |
| 91 | + |
| 92 | + footer { |
| 93 | + text-align: center; |
| 94 | + padding: 2rem 1rem; |
| 95 | + font-size: 0.9rem; |
| 96 | + color: #555; |
| 97 | + background: #fafafa; |
| 98 | + border-top: 1px solid #e0e0e0; |
| 99 | + } |
| 100 | + |
| 101 | + a { |
| 102 | + color: #0277bd; |
| 103 | + text-decoration: none; |
| 104 | + } |
| 105 | + |
| 106 | + a:hover { |
| 107 | + text-decoration: underline; |
| 108 | + } |
| 109 | + </style> |
| 110 | +</head> |
| 111 | + |
| 112 | +<body> |
| 113 | + |
| 114 | +<header> |
| 115 | + <h1>BME280 Free Pascal Driver</h1> |
| 116 | + <p>Raspberry Pi · I2C · Temperature · Humidity · Pressure · Dewpoint</p> |
| 117 | +</header> |
| 118 | + |
| 119 | +<main> |
| 120 | + |
| 121 | + <img src="https://github.com/RaspberryFpc/RaspberryPi-BME280-GUI/blob/main/BME280.png?raw=true" alt="BME280 GUI Screenshot"> |
| 122 | + |
| 123 | + <h2>Introduction</h2> |
| 124 | + <p> |
| 125 | + This project provides a Free Pascal driver for the BME280 environmental sensor. |
| 126 | + It runs on the Raspberry Pi via I2C and measures temperature, humidity and air pressure. |
| 127 | + An accurate dewpoint calculation is included. |
| 128 | + </p> |
| 129 | + |
| 130 | + <h2>Features</h2> |
| 131 | + <ul> |
| 132 | + <li>Supports I2C addresses <code>$76</code> and <code>$77</code></li> |
| 133 | + <li>Default and fully configurable initialization</li> |
| 134 | + <li>All parameters defined as constants</li> |
| 135 | + <li>No external dependencies</li> |
| 136 | + </ul> |
| 137 | + |
| 138 | + <h2>Funktionen (Deutsch)</h2> |
| 139 | + <ul> |
| 140 | + <li>Unterstützt I2C-Adressen <code>$76</code> und <code>$77</code></li> |
| 141 | + <li>Standard- und benutzerdefinierte Initialisierung</li> |
| 142 | + <li>Alle Parameter als Konstanten</li> |
| 143 | + <li>Keine externen Bibliotheken nötig</li> |
| 144 | + </ul> |
| 145 | + |
| 146 | + <h2>Installation</h2> |
| 147 | + <ol> |
| 148 | + <li>I2C aktivieren (<code>sudo raspi-config</code>)</li> |
| 149 | + <li>Repository klonen: |
| 150 | + <pre><code>git clone https://github.com/RaspberryFpc/BME280-FreePascal-Driver.git</code></pre> |
| 151 | + </li> |
| 152 | + <li><code>bme280.pas</code> ins eigene Projekt einbinden</li> |
| 153 | + </ol> |
| 154 | + |
| 155 | + <h2>Predefined Constants</h2> |
| 156 | + |
| 157 | + <h3>Mode</h3> |
| 158 | + <table> |
| 159 | + <tr><th>Name</th><th>Description</th><th>Binary</th></tr> |
| 160 | + <tr><td>Sleepmode</td><td>Sleep mode</td><td>%0</td></tr> |
| 161 | + <tr><td>Forcedmode</td><td>Forced mode</td><td>%1</td></tr> |
| 162 | + <tr><td>Normalmode</td><td>Normal mode</td><td>%11</td></tr> |
| 163 | + </table> |
| 164 | + |
| 165 | + <h3>Oversampling</h3> |
| 166 | + <table> |
| 167 | + <tr><th>Name</th><th>Description</th><th>Binary</th></tr> |
| 168 | + <tr><td>PressureOversampling1</td><td>Pressure x1</td><td>%00100</td></tr> |
| 169 | + <tr><td>PressureOversampling2</td><td>Pressure x2</td><td>%01000</td></tr> |
| 170 | + <tr><td>PressureOversampling4</td><td>Pressure x4</td><td>%01100</td></tr> |
| 171 | + <tr><td>PressureOversampling8</td><td>Pressure x8</td><td>%10000</td></tr> |
| 172 | + <tr><td>PressureOversampling16</td><td>Pressure x16</td><td>%10100</td></tr> |
| 173 | + </table> |
| 174 | + |
| 175 | + <h2>Functions</h2> |
| 176 | + |
| 177 | + <h3>Initbme280</h3> |
| 178 | + <pre><code>function Initbme280( |
| 179 | + HumidityOversampling, |
| 180 | + PressureOversampling, |
| 181 | + TemperatureOversampling, |
| 182 | + mode, |
| 183 | + Repeattime, |
| 184 | + filter: byte |
| 185 | +): integer;</code></pre> |
| 186 | + |
| 187 | + <h3>Initbme280_WithDefaults</h3> |
| 188 | + <pre><code>function Initbme280_WithDefaults: integer;</code></pre> |
| 189 | + |
| 190 | + <h2>License</h2> |
| 191 | + <pre><code>MIT License |
| 192 | +Copyright (c) 2025 |
| 193 | +Permission is hereby granted, free of charge...</code></pre> |
| 194 | + |
| 195 | + <h2>Other Projects</h2> |
| 196 | + <ul> |
| 197 | + <li><a href="https://github.com/RaspberryFpc/pibackup">pibackup</a></li> |
| 198 | + <li><a href="https://github.com/RaspberryFpc/Raspberry-UDP_audio_receiver">Raspberry-UDP_audio_receiver</a></li> |
| 199 | + <li><a href="https://github.com/RaspberryFpc/DS18B20-FPC-Pi-GUI">DS18B20-FPC-Pi-GUI</a></li> |
| 200 | + <li><a href="https://github.com/RaspberryFpc/RaspberryPi-GPIOv2-FPC">RaspberryPi-GPIOv2-FPC</a></li> |
| 201 | + </ul> |
| 202 | + |
| 203 | +</main> |
| 204 | + |
| 205 | +<footer> |
| 206 | + © 2025 RaspberryFpc – Free Pascal on Raspberry Pi |
| 207 | +</footer> |
| 208 | + |
| 209 | +</body> |
| 210 | +</html> |
1 | 211 |
|
0 commit comments