Member Since: August 27, 2010

Country: United States

  • My comment refers to the example code for the Breakout Board (above) which does not use the cpp, but has similar code. In the cpp for the Weather Shield, some of the limits are up to 600, I believe. I put a Serial.println (“E1”), etc. on each loop to figure out which ones were timing out and experimented with the values.

  • Nate, I think the library is over with the breakout board on github. I added it to the shield example and it’s working fine… in my freezer.

  • -999 indicates a timeout error. In several places, there is a counting loop containing a 1ms delay. The timeout is too quick. When the count reaches the limit, -999 is issued. Increase the count by several hundred. Look at the Weather Shield example’s MPL3115A2.cpp.

  • Below freezing I got some strange results using the example code. It appears that MPL3115A2.cpp does not take into account the 2’s complement nature of negative numbers used by the device; (see Application Note). The following shows additions to readTemp() which appear to fix this:

        word foo = 0;
        bool negSign = false;
        if(msb > 0x7F)
                foo = ~((msb << 8) + lsb) + 1;  //2’s complement
            msb = foo >> 8;
            lsb = foo & 0x00F0; 
                negSign = true;
    // The least significant bytes l_altitude and l_temp are 4-bit,
    // fractional values, so you must cast the calulation in (float),
    // shift the value over 4 spots to the right and divide by 16 (since 
    // there are 16 values in 4-bits). 
    float templsb = (lsb>>4)/16.0; //temp, fraction of a degree
    float temperature = (float)(msb + templsb);
    if (negSign) 
        temperature = 0 - temperature;

    This affects pressures also, if there is a negative value.

    Note that -999 results indicate a timeout. In the cpp, the timeout values have been increased versus other examples.

    Also, there was question about the Ethernet shield. It’s fairly easy to combine this code with the Arduino BarometriPressureWebServer example. But, keep in mind that the Wiznet W5100 is quite hot and very close. It added about 10F at room temperature.

    It’s 1.1 degrees Fahrenheit right now. Sorry about not knowing how to use GitHub…

  • The power button works in the same manner as the mute button.

  • To reset, hold reset button down, power on, and let button up.

  • This remote is programmable just not in the conventional sense. By holding down the mute button, the remote will send out every mute command it knows (a lot). When your TV mutes in response to the remote, let the button up and then press mute momentarily again. As a result, the remote learned the code set for your TV and the remaining buttons should work.

    When the remote is first powered up, it sends several codes for each button � three NEC-standard codes (or similar) plus others. After programming, it still may send more than one code per button. The mute codes come fast during programming and there may not be enough resolution, given you reaction time, so the designers just send a few nearby codes.

    To de program, leave the battery out for a while.

No public wish lists :(