Altimeter Module MS5607 w/ Arduino Mega 2560
jameshayek
Posts: 3
Hello all,
I am having trouble with programming the Altimeter Module MS5607. I was following the tutorials posted here: http://learn.parallax.com/KickStart/29124
I read
And placed the IntersemaBaro file in the same location (folder) as my Arduino Sketch. (C:\Users\JamesHayek\Documents\Arduino\AltimeterCode\Altimeter001) I provided a screencap of the files location.
I then used the sample code as posted from the site:
I am getting the following error: Altimeter001.ino:11:27: error: IntersemaBaro.h: No such file or directory
As of now I just plan on using the sample file to test the module and its functionality. Eventually I will use this data to drive a RGB LED to produce red or blue light to predict if it will be rainy or dry outside.
Please let me know any suggestions as to what I was doing wrong.
Thanks in advance
Btw, I used the download link: Download Arduino 1.0 Code for the Altimeter Module
I am having trouble with programming the Altimeter Module MS5607. I was following the tutorials posted here: http://learn.parallax.com/KickStart/29124
I read
Important! This program uses an additional code file,IntersemaBaro.h, which is included in the download. To use this program you must include IntersemaBaro.h in the same folder as the program file. Be sure to download the correct version for the Arduino IDE you are using.
And placed the IntersemaBaro file in the same location (folder) as my Arduino Sketch. (C:\Users\JamesHayek\Documents\Arduino\AltimeterCode\Altimeter001) I provided a screencap of the files location.
I then used the sample code as posted from the site:
/*Team 5's Compliment Professor Mario Ibrahim NJIT ECE 252 */ #include <Wire.h> #include "IntersemaBaro.h" Intersema::BaroPressure_MS5607B baro(true); void setup() { Serial.begin(9600); baro.init(); } void loop() { int alt = baro.getHeightCentiMeters(); Serial.print("Centimeters: "); Serial.print((float)(alt)); Serial.print(", Feet: "); Serial.println((float)(alt) / 30.48); delay(400); }
I am getting the following error: Altimeter001.ino:11:27: error: IntersemaBaro.h: No such file or directory
As of now I just plan on using the sample file to test the module and its functionality. Eventually I will use this data to drive a RGB LED to produce red or blue light to predict if it will be rainy or dry outside.
Please let me know any suggestions as to what I was doing wrong.
Thanks in advance
Btw, I used the download link: Download Arduino 1.0 Code for the Altimeter Module
Comments
If you open the sketch and the Intersema file is not also shown in its own window tab in the Arduino IDE, you know that somehow the IDE is not finding the file. To ensure against mistakes, go back to the original download, don't rename files or folders, and place inside your Arduino sketch folder (not another folder within that).
All said, the code for a Uno will NOT work on a Mega. The pins for I2C are different between these two boards. Refer to the specifications on the Arduino Web site for how you need to rewire your board in order to use the correct pins.
Thanks, GordonMcComb, I now see another tab in the Arduino IDE with the IntersemaBaro.h file's content. I uploaded the sketch after choosing the board type and it works great!!
Can I ask however, where can I find libraries/functions/commands/documents to call for a read out value of say something like temperature or humidity?
The latest Arduino IDE for Windows is 1.0.5. You must be referring to something else.
For this board you'd need to refer to the original datasheet for the pressure sensor/altimeter chip used on it, and you can download the code examples for the other microcontrollers. General documentation and an app note for the chip-level sensor is provided on the Parallax page for the module. The app note is quite complicated.
There are many other resources for this chip, though most of them require advanced programming. For example, the following page contains C code for the MS56XX series of chips and Atmel processors:
http://www.servoflo.com/pressure-sensors/suppliers/measurement-specialties/227-measurement-specialties-a-intersema/781-an520.html
Maybe someone has ported this to the Arduino.