proyecto para la realizacion de un altimetro con base ... - Tripoli Spain
proyecto para la realizacion de un altimetro con base ... - Tripoli Spain
proyecto para la realizacion de un altimetro con base ... - Tripoli Spain
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
APENDICE 1: PROGRAMA BASICO<br />
(En negro se muestra el código básico propuesto por el proveedor <strong>de</strong>l sensor <strong>para</strong> su<br />
f<strong>un</strong>cionamiento, en azul mis añadidos <strong>para</strong> el f<strong>un</strong>cionamiento <strong>de</strong>l dispositivo en su <strong>con</strong>j<strong>un</strong>to).<br />
/* BMP085 Exten<strong>de</strong>d Example Co<strong>de</strong><br />
*/<br />
by: Jim Lindblom<br />
SparkF<strong>un</strong> Electronics<br />
date: 1/18/11<br />
license: CC BY-SA v3.0 - http://creativecommons.org/licenses/by-sa/3.0/<br />
Update (7/19/11): I've heard folks may be enco<strong>un</strong>tering issues<br />
with this co<strong>de</strong>, who're r<strong>un</strong>ning an Arduino at 8MHz. If you're<br />
using an Arduino Pro 3.3V/8MHz, or the like, you may need to<br />
increase some of the <strong>de</strong><strong>la</strong>ys in the bmp085ReadUP and<br />
bmp085ReadUT f<strong>un</strong>ctions.<br />
Amendments for rocket flight by David Sariñena<br />
Version 03 is rocket inten<strong>de</strong>d<br />
* Detects the different stages<br />
Version 05 <strong>de</strong>bugged and ad<strong>de</strong>d buzzer<br />
* Buzzer t<strong>un</strong>es<br />
** 7 low t<strong>un</strong>es at 220Hz --> memory full<br />
** 3 t<strong>un</strong>es at 440Hz --> start of measure<br />
** 1 long t<strong>un</strong>e at 600Hz --> number zero<br />
** n short t<strong>un</strong>es at 600Hz --> number n<br />
Version 06.<br />
* Deleted all Serial Monitor traces.<br />
* All comments trans<strong>la</strong>ted to English.<br />
#inclu<strong>de</strong> <br />
#inclu<strong>de</strong> <br />
#<strong>de</strong>fine BMP085_ADDRESS 0x77 // I2C address of BMP085<br />
<strong>con</strong>st <strong>un</strong>signed char OSS = 0; // Oversampling Setting<br />
// Calibration values<br />
int ac1;<br />
int ac2;<br />
int ac3;<br />
<strong>un</strong>signed int ac4;<br />
<strong>un</strong>signed int ac5;<br />
<strong>un</strong>signed int ac6;<br />
int b1;<br />
int b2;<br />
18