Захария Стургин

Member Since: November 24, 2011

Country: United States

  • Just got my weather shield, but forgot to order headers. (In my impatience) I slapped on what I had, forgoing VIN, and pins 8 and 9. It took me a visit to the schematic to figure out why I was getting bogus values without VIN connected, but now that it's working I've still run into some interesting issues with the example sketch on the Leonardo:

    1. The serial seems unreliable, starting indeterminately. I think this is a known issue with the serial reset on the Leonardo.
    2. When serial data is being output, everything looks in order, except for the rain sensor. It just keeps racking up values despite being disconnected.
    3. After the anaeometer spins for the first time, serial data is only output when the aneometer is still spinning. Otherwise it stops sending.

    Any suggestions?

    Edit: Guessing that this is an interrupt problem, further inspection of the datasheet reveals that the anaeometer is supposed to close a switch once per revoluion, but checking it on a multimeter it's actually a normally closed contact that opens when the magnet passes. Did I get a deffective/different anaeometer, or is this just an interrupt issue?

    Edit 2: I isolated the issue to interrutps being fired whenever working with the I²C bus to read the barometer, etc. The Leonardo uses pins 2 & 3 for I²C, so an interrupt gets fired every time data is sent. As a work around in software, you can detach the interrupts for the weather sensors before using I²C data, and reattach them when done.

No public wish lists :(