Software


Fully functional software is can be found on https://github.com/hellange/arduino under the directory “weatherstation2”. It will no longer be changed/maintained. Further development of the prototype will continue under the “weatherstation3” directory, but that version might not be fully functional at all times. It also might require extra hardware. I’ll try to describe significant progress in the blog when/if they occur…

I’ve used the standard arduino IDE version 1.5.4/1.5.5 while developing weatherstation2.
The only things you must do in addition are:

  • copy a number of libraries into the arduino library directory. Refer to the list of #include in the weatherstation2.ino file.
  • Calibrate the touch sensors and replace the content in the UTouchCD.h file accordingly.  The calibration procedure is described in UTouch page created by Henning Karlsen

Feel free to copy the prototype software and modify it for your own (non-commercial) use.

3rd party software

An nice thing about the prototype LCD hardware combo is that it works more or less out of the box using a display library by Henning Karlsen.

If you want to connect more I2C devices, a useful application for detecting I2C addresses can be found here.

The BMP085 driver I use is currently from Adafruit (ref #include in prototype software). Ther are other drivers out there, i.e. http://code.google.com/p/bmp085driver/, but I havn’t tested it. I’m also a bit unsure about the calibration. Did I do that ?

The other software is Time library from playground.arduino and Timezone from HChristensen. Refer to #include statements in the prototype source code in git.

Cut’n past algorithms

Moon phase calculations are borrowed from this www.nano-reef.com forum entry. I haven’t really verified if this algorithm is correct, though…

IMG_8507
Moon phases for some days ahead

 

 

Advertisements

12 thoughts on “Software

    1. Thanks for the answer; I have 2 more questions:
      1) Touch can be dispensed, as here: UTouch myTouch (6,5,4,3,2); because my display does not have the Touch. My display is the TFT01_22S 240×320 without the Touch function.
      2) What do I do with the moon_phases folder?
      Thank you very much

      Like

    2. Sorry, one more question:
      My Display is not with Touch Screen, so should I simply comment the lines in the sketch with this function?
      Or does it have to be with Display with Touch Screen?
      Thank you

      Like

  1. The code is written for a 240×400 display, so it will not work as expected on your display. If I remember correctly, the moon_phases folder was just added for reference. I believe I copied everything needed into the moon_phases_raw.h directory. Also, if I remember correctly, the touch functionality was actually used to jump between various modes so you will lose some functionality without it. Can probably remove the code if you don’t need it. Note that I haven’t touched this code for 4-5 years. Actually, I’m unable to find the hardware for it. Hmm… maybe I should try to find it and see if it still works… Conclusion is that you probably have to take parts of the code and rewrite for your own display. Mainly because of the resolution.

    Like

      1. Note that the stuff I’ve done with 5″ displays are not directly compatible with what I did in the weatherstation2 project. I originally planned to take parts from weatherstation2 and bring it over to the 5″ world. I never got that far before other projects took priority. Feel free to follow that path ! Alternative path is to get rid of the LCD breakout board and put a 3.2″ display directly on the Arduino mega. Could be that this display will work: https://www.aliexpress.com/item/3-2-3-2-inch-240X400-TFT-LCD-Touch-Screen-Expansion-Shield-LED-Display-Module-5V/32892795591.html.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s