Shop OBEX P1 Docs P2 Docs Learn Events
Using Arduino board to control Parallax Altimeter Module — Parallax Forums

Using Arduino board to control Parallax Altimeter Module

CrosswaysCrossways Posts: 8
edited 2013-02-13 13:49 in General Discussion
I saw a Altimeter module with LCD readout on Hack a Week. I have a Arduino Duemilanove experimenters kit that I am somewhat familiar with, and noticed that the project seemed to provide the needed software for a Arduino, as well ad the BOE.

I purchased the LCD and MS5607 Altimeter Module from Parallax, and downloaded two zip files: Arduino 1.0 Code for the Altimeter Module & Arduino Pre-release Version Code for the Altimeter.

Now the fun begins, and I'm in way over my head. Here are my problems:

1. When I try to open the downloaded zip files using my Arduino Sketch program (I don't know what else to use), the unzipped file: (IntersemaBaro.h) comes in, but the Sketch program states: (27: error, IntersemaBaro.h: No such file or directory)

2. When I try to bring in the other file by double clicking on the zip file: (Altimeter Arduino 10. ino), the Sketch program states: (Processing can only open its own sketches & other files ending in (.pde).

Trying unconventional approaches, I open it in Word then pasted it into the Sketch program along with the earlier (IntersemaBaro.h), I get: (21: error: Arduino.h: No such file or directory). I don't know where Arduino.h comes from.

If there isn't a easy way to program the Arduino board, I'm out of luck. Any ideas would be greatly appreciated.

Comments

  • Martin_HMartin_H Posts: 4,051
    edited 2013-02-12 15:08
    Did you try to open the file directly from the zip file, or did you extract them onto the file system? I would place them under the Arduino directory under my documents and then double click on the ino file.
  • CrosswaysCrossways Posts: 8
    edited 2013-02-12 16:23
    Martin:

    Thanks for your help. You may have me 9 miles down the road. I moved both files into my eariler Arduino folder, which has drivers etc., and I was able to call up the (Altimeter Arduino 10.ino) file which was great. Only now I get the message; (C:users\Dave\downloads\ardoino-0018\arduino-018\hardware\arduino\cores\arduino/mai n.cpp:10 undefined reference to 'Loop') I know you're going to tell me I'm a sloppy housekeeper :-)

    When I scan the loaded code, I don't see a Loop region. I'm not sure if I need to add the (IntersemaBaro.h) file. I just have the feeling, with your help, I'm really close to having this work.
  • Martin_HMartin_H Posts: 4,051
    edited 2013-02-12 16:42
    The loop function needs to be in the ino file, not the header (.h file). A little later tonight I can expand the zip and see if I can get this to compile. I do think that you are close.
  • Martin_HMartin_H Posts: 4,051
    edited 2013-02-12 17:30
    I got it to compile with the following steps.

    1. My Arduino software is installed here C:\Documents and Settings\Martin\My Documents\arduino-1.0.1, but that shouldn't be an issue if yours is elsewhere.

    2. I downloaded the Arduino sample from http://learn.parallax.com/sites/default/files/content/kickstart/code/Altimeter_Arduino_10.zip and opened the zip file.

    3. I extracted the Altimeter_Arduino_10 folder to C:\Documents and Settings\Martin\My Documents\Arduino\Altimeter_Arduino_10

    4. I double clicked on Altimeter_Arduino_10.ino and the Arduino IDE loaded. I was able to compile it without a problem. Since I don't own the altimeter module I can't test it.

    I hope this helps.
  • CrosswaysCrossways Posts: 8
    edited 2013-02-13 08:16
    Martin:
    Here's the deal –

    1. When I follow your instructions, and double click on the Arduino 10 unzipped file, it opens Arduino Sketch and says - “processing can only open its own Sketches & other files ending in (.pde)”

    2.
    If I double click on the other file (IntersemaBaro.h) it opens in Wordpad and there is a lot of code there. If I take that code and paste it into the Sketch program – when I go to verify/compile, it highlights a line: #include <util/delay.h> Near the bottom is says: (21: error: Arduino.h: No such file or directory).


    3. Are both file needed in Sketch?

    4. What about the (.pde) file type it keeps asking for?

    5. And, the (Arduino.h) file it seem to want?

    Any ideas would be helpful.
  • Martin_HMartin_H Posts: 4,051
    edited 2013-02-13 08:34
    OK, some things to understand here. There are three related open source IDE's: Processing, Wiring, and Arduino. Processing is a PC side Java IDE and isn't used for Arduino sketches which end in .ino extension. I would open the Arduino IDE and then open the sketch because you might have a problem with extension handling.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2013-02-13 10:47
    Crossways wrote: »
    2. When I try to bring in the other file by double clicking on the zip file: (Altimeter Arduino 10. ino), the Sketch program states: (Processing can only open its own sketches & other files ending in (.pde).

    Let's start here. The two file types are not compatible. You're using a pre-release Arduino IDE (version 0018 is astoundingly ancient), but the example is written for 1.0 and later.

    Download the latest version of the IDE, and use that version instead for any files that end with .ino.

    The other issues may clear up, or be easier to tackle, once this is done.

    -- Gordon
  • CrosswaysCrossways Posts: 8
    edited 2013-02-13 11:06
    Martin & Gordon:

    You both hit the nail on the head. I went out and downloaded the latest verison and it compiled without error. I uploaded it, and the Tx/Rx leds blink like crazy, so I know it loaded. It doesn't work, but now at least I know the whole chain works. Thank you both for you comments & Martin for his patience.

    I remember something on the Hack a Week video about changing a couple of things in the code, so I'm going back to view that again. I can't thank you enough for the help, now I have a fighting chance.
  • Martin_HMartin_H Posts: 4,051
    edited 2013-02-13 11:31
    Great glad to hear it is working now. If you edit the first post in this thread you can mark it solved so other people will know it without reading through the thread,
  • CrosswaysCrossways Posts: 8
    edited 2013-02-13 13:45
    I hate to ask this, but I don't see how to tell your system that my problem is solved.
  • doggiedocdoggiedoc Posts: 2,243
    edited 2013-02-13 13:49
    Edit your original post. You should be able to change the status at top of edit pane.

    You will need to select the 'Go Advanced' button that is to the right of the 'Save' button.

    EDIT: The 'Prefix' is what you'll need to change.

    Paul
Sign In or Register to comment.