Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. James Flosse
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by James Flosse

    • RE: Domoticz,raspberry pi and arduino and drf1278dm

      Sorry for my poor english im french.
      They havent solution for use only the tx/rx pin on both raspberry pi and arduino?

      posted in Feature Requests
      James Flosse
      James Flosse
    • RE: Domoticz,raspberry pi and arduino and drf1278dm

      Ok thx, but i think it's could be possible to use it TX/RX pin on arduino. It's transparent wireless communication.

      posted in Feature Requests
      James Flosse
      James Flosse
    • Domoticz,raspberry pi and arduino and drf1278dm

      Hi all. I have a question.
      Can i use drf1278dm with it ?
      Best regards

      posted in Feature Requests
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      @bgunnarb you are find the problem, i think i have arduino pro mini 3.3V but it's 5V. Thx very much it's work better now 🙂

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      Yes ^^ . can you give me at snyp_thx at hotmail dot fr?

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      Have you link for older library? Are you french?

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      i tested with 3.3V and 5volt but same result
      http://www.banggood.com/fr/GY-68-BMP180-Digital-Barometric-Pressure-Sensor-Board-Module-p-1059025.html?rmmds=myorder

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      I supply itwith the 3.3 V output off arduino

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      I bought it in banggood, but it work's before...

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor
      #include <Wire.h>
      #include <Adafruit_Sensor.h>
      #include <Adafruit_BMP085_U.h>
         
      Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);
       
      void setup(void) 
      {
        Serial.begin(9600);
        Serial.println("Pressure Sensor Test"); Serial.println("");
        
        /* Initialise the sensor */
        if(!bmp.begin())
        {
          /* There was a problem detecting the BMP085 ... check your connections */
          Serial.print("Ooops, no BMP085 detected ... Check your wiring or I2C ADDR!");
          while(1);
        }
      }
       
      void loop(void) 
      {
        /* Get a new sensor event */ 
        sensors_event_t event;
        bmp.getEvent(&event);
       
        /* Display the results (barometric pressure is measure in hPa) */
        if (event.pressure)
        {
          /* Display atmospheric pressure in hPa */
          Serial.print("Pressure: "); Serial.print(event.pressure); Serial.println(" hPa");
        }
        else
        {
          Serial.println("Sensor error");
        }
        delay(250);
      }
      
      Pressure: 756.46 hPa
      Pressure: 756.47 hPa
      Pressure: 756.49 hPa
      Pressure: 756.44 hPa
      Pressure: 756.44 hPa
      Pressure: 756.46 hPa
      Pressure: 756.41 hPa
      Pressure: 756.44 hPa
      Pressure: 756.42 hPa
      Pressure: 756.39 hPa
      Pressure: 756.42 hPa
      Pressure: 756.44 hPa
      Pressure: 756.38 hPa
      Pressure: 756.40 hPa
      Pressure: 756.41 hPa
      Pressure: 756.38 hPa
      Pressure: 756.41 hPa
      Pressure: 756.40 hPa
      Pressure: 756.38 hPa
      Pressure: 756.40 hPa
      Pressure: 756.42 hPa
      Pressure: 756.34 hPa
      Pressure: 756.22 hPa
      Pressure: 756.33 hPa
      Pressure: 756.37 hPa
      Pressure: 756.38 hPa
      
      

      same pressure

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      Ok i defined the altitude by my own (225 meters) but i have the same pressure and temperature :S

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      Only bmp180 connected to arduino and i have test with 3 other :s

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      The pressure and temperature is incorrect xD. sorry, i have 20°C in my room and the METAR of the near airport say 1016 hPa.

      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      Hi @mfalkvidd. This is the debug output and my code

      2269 MCO:REG:REQ
      2277 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      2287 TSF:MSG:READ,0-0-3,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      2293 MCO:PIM:NODE REG=1
      2295 MCO:BGN:STP
      2306 MCO:BGN:INIT OK,TSP=1
      Forecast at minute 1 dP/dt = 0.00kPa/h --> unknown
      Temperature = 31.00 *C
      Pressure = 728.00 hPa
      Forecast = unknown
      2359 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:31.0
      2369 TSF:MSG:SEND,3-3-0-0,s=0,c=1,t=4,pt=7,l=5,sg=0,ft=0,st=OK:728
      2381 TSF:MSG:SEND,3-3-0-0,s=0,c=1,t=5,pt=0,l=7,sg=0,ft=0,st=OK:unknown
      2387 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      2394 MCO:SLP:TPD
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #include <SPI.h>
      #include <MySensors.h>  
      #include <Wire.h>
      #include <Adafruit_BMP085.h>
      
      #define BARO_CHILD 0
      #define TEMP_CHILD 1
      
      const float ALTITUDE = 688; // <-- adapt this value to your own location's altitude.
      
      // Sleep time between reads (in seconds). Do not change this value as the forecast algorithm needs a sample every minute.
      const unsigned long SLEEP_TIME = 60000; 
      
      const char *weather[] = { "stable", "sunny", "cloudy", "unstable", "thunderstorm", "unknown" };
      enum FORECAST
      {
          STABLE = 0,            // "Stable Weather Pattern"
          SUNNY = 1,            // "Slowly rising Good Weather", "Clear/Sunny "
          CLOUDY = 2,            // "Slowly falling L-Pressure ", "Cloudy/Rain "
          UNSTABLE = 3,        // "Quickly rising H-Press",     "Not Stable"
          THUNDERSTORM = 4,    // "Quickly falling L-Press",    "Thunderstorm"
          UNKNOWN = 5            // "Unknown (More Time needed)
      };
      
      Adafruit_BMP085 bmp = Adafruit_BMP085();      // Digital Pressure Sensor 
      
      float lastPressure = -1;
      float lastTemp = -1;
      int lastForecast = -1;
      
      const int LAST_SAMPLES_COUNT = 5;
      float lastPressureSamples[LAST_SAMPLES_COUNT];
      
      // this CONVERSION_FACTOR is used to convert from Pa to kPa in forecast algorithm
      // get kPa/h be dividing hPa by 10 
      #define CONVERSION_FACTOR (1.0/10.0)
      
      int minuteCount = 0;
      bool firstRound = true;
      // average value is used in forecast algorithm.
      float pressureAvg;
      // average after 2 hours is used as reference value for the next iteration.
      float pressureAvg2;
      
      float dP_dt;
      bool metric;
      MyMessage tempMsg(TEMP_CHILD, V_TEMP);
      MyMessage pressureMsg(BARO_CHILD, V_PRESSURE);
      MyMessage forecastMsg(BARO_CHILD, V_FORECAST);
      
      
      void setup() 
      {
          if (!bmp.begin()) 
          {
              Serial.println("Could not find a valid BMP085 sensor, check wiring!");
              while (1) {}
          }
          metric = getControllerConfig().isMetric;
      }
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Pressure Sensor", "1.1");
      
        // Register sensors to gw (they will be created as child devices)
        present(BARO_CHILD, S_BARO);
        present(TEMP_CHILD, S_TEMP);
      }
      
      void loop() 
      {
          float pressure = bmp.readPressure() / 100 ;
          float temperature = bmp.readTemperature();
      
          if (!metric) 
          {
              // Convert to fahrenheit
              temperature = temperature * 9.0 / 5.0 + 32.0;
          }
      
          int forecast = sample(pressure);
      
          Serial.print("Temperature = ");
          Serial.print(temperature);
          Serial.println(metric ? " *C" : " *F");
          Serial.print("Pressure = ");
          Serial.print(pressure);
          Serial.println(" hPa");
          Serial.print("Forecast = ");
          Serial.println(weather[forecast]);
      
      
          if (temperature != lastTemp) 
          {
              send(tempMsg.set(temperature, 1));
              lastTemp = temperature;
          }
      
          if (pressure != lastPressure) 
          {
              send(pressureMsg.set(pressure, 0));
              lastPressure = pressure;
          }
      
          if (forecast != lastForecast)
          {
              send(forecastMsg.set(weather[forecast]));
              lastForecast = forecast;
          }
      
          sleep(SLEEP_TIME);
      }
      
      float getLastPressureSamplesAverage()
      {
          float lastPressureSamplesAverage = 0;
          for (int i = 0; i < LAST_SAMPLES_COUNT; i++)
          {
              lastPressureSamplesAverage += lastPressureSamples[i];
          }
          lastPressureSamplesAverage /= LAST_SAMPLES_COUNT;
      
          return lastPressureSamplesAverage;
      }
      
      
      
      // Algorithm found here
      // http://www.freescale.com/files/sensors/doc/app_note/AN3914.pdf
      // Pressure in hPa -->  forecast done by calculating kPa/h
      int sample(float pressure)
      {
          // Calculate the average of the last n minutes.
          int index = minuteCount % LAST_SAMPLES_COUNT;
          lastPressureSamples[index] = pressure;
      
          minuteCount++;
          if (minuteCount > 185)
          {
              minuteCount = 6;
          }
      
          if (minuteCount == 5)
          {
              pressureAvg = getLastPressureSamplesAverage();
          }
          else if (minuteCount == 35)
          {
              float lastPressureAvg = getLastPressureSamplesAverage();
              float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
              if (firstRound) // first time initial 3 hour
              {
                  dP_dt = change * 2; // note this is for t = 0.5hour
              }
              else
              {
                  dP_dt = change / 1.5; // divide by 1.5 as this is the difference in time from 0 value.
              }
          }
          else if (minuteCount == 65)
          {
              float lastPressureAvg = getLastPressureSamplesAverage();
              float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
              if (firstRound) //first time initial 3 hour
              {
                  dP_dt = change; //note this is for t = 1 hour
              }
              else
              {
                  dP_dt = change / 2; //divide by 2 as this is the difference in time from 0 value
              }
          }
          else if (minuteCount == 95)
          {
              float lastPressureAvg = getLastPressureSamplesAverage();
              float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
              if (firstRound) // first time initial 3 hour
              {
                  dP_dt = change / 1.5; // note this is for t = 1.5 hour
              }
              else
              {
                  dP_dt = change / 2.5; // divide by 2.5 as this is the difference in time from 0 value
              }
          }
          else if (minuteCount == 125)
          {
              float lastPressureAvg = getLastPressureSamplesAverage();
              pressureAvg2 = lastPressureAvg; // store for later use.
              float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
              if (firstRound) // first time initial 3 hour
              {
                  dP_dt = change / 2; // note this is for t = 2 hour
              }
              else
              {
                  dP_dt = change / 3; // divide by 3 as this is the difference in time from 0 value
              }
          }
          else if (minuteCount == 155)
          {
              float lastPressureAvg = getLastPressureSamplesAverage();
              float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
              if (firstRound) // first time initial 3 hour
              {
                  dP_dt = change / 2.5; // note this is for t = 2.5 hour
              }
              else
              {
                  dP_dt = change / 3.5; // divide by 3.5 as this is the difference in time from 0 value
              }
          }
          else if (minuteCount == 185)
          {
              float lastPressureAvg = getLastPressureSamplesAverage();
              float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
              if (firstRound) // first time initial 3 hour
              {
                  dP_dt = change / 3; // note this is for t = 3 hour
              }
              else
              {
                  dP_dt = change / 4; // divide by 4 as this is the difference in time from 0 value
              }
              pressureAvg = pressureAvg2; // Equating the pressure at 0 to the pressure at 2 hour after 3 hours have past.
              firstRound = false; // flag to let you know that this is on the past 3 hour mark. Initialized to 0 outside main loop.
          }
      
          int forecast = UNKNOWN;
          if (minuteCount < 35 && firstRound) //if time is less than 35 min on the first 3 hour interval.
          {
              forecast = UNKNOWN;
          }
          else if (dP_dt < (-0.25))
          {
              forecast = THUNDERSTORM;
          }
          else if (dP_dt > 0.25)
          {
              forecast = UNSTABLE;
          }
          else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05)))
          {
              forecast = CLOUDY;
          }
          else if ((dP_dt > 0.05) && (dP_dt < 0.25))
          {
              forecast = SUNNY;
          }
          else if ((dP_dt >(-0.05)) && (dP_dt < 0.05))
          {
              forecast = STABLE;
          }
          else
          {
              forecast = UNKNOWN;
          }
      
          // uncomment when debugging
          Serial.print(F("Forecast at minute "));
          Serial.print(minuteCount);
          Serial.print(F(" dP/dt = "));
          Serial.print(dP_dt);
          Serial.print(F("kPa/h --> "));
          Serial.println(weather[forecast]);
      
          return forecast;
      }
      
      2017-03-09 10:52:56.474 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 10:52:56.475 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 10:52:56.488 (GATEWAY) Temp (Temp)
      2017-03-09 10:52:56.497 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:52:56.503 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:53:40.053 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 10:53:40.054 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 10:53:40.067 (GATEWAY) Temp (Temp)
      2017-03-09 10:53:40.075 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:53:40.081 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:14.102 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 10:54:14.104 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 10:54:14.148 (GATEWAY) Temp (Temp)
      2017-03-09 10:54:14.162 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:14.172 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:26.662 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 10:54:26.664 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 10:54:26.676 (GATEWAY) Temp (Temp)
      2017-03-09 10:54:26.685 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:26.691 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:44.122 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 10:54:44.123 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 10:54:44.136 (GATEWAY) Temp (Temp)
      2017-03-09 10:54:44.145 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:44.150 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:50.417 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 10:54:51.225 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 10:54:51.227 (GATEWAY) Temp (Temp)
      2017-03-09 10:54:51.236 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:54:51.242 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:55:55.513 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:58:05.600 (GATEWAY) Temp (Temp)
      2017-03-09 10:58:05.608 (GATEWAY) General/Barometer (Baro)
      2017-03-09 10:59:10.651 (GATEWAY) Temp (Temp)
      2017-03-09 11:01:20.704 (GATEWAY) Temp (Temp)
      2017-03-09 11:02:00.701 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 11:02:00.702 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 11:02:00.715 (GATEWAY) Temp (Temp)
      2017-03-09 11:02:00.723 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:00.728 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:31.650 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 11:02:31.652 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 11:02:31.664 (GATEWAY) Temp (Temp)
      2017-03-09 11:02:31.673 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:31.678 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:38.872 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 11:02:38.873 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 11:02:38.886 (GATEWAY) Temp (Temp)
      2017-03-09 11:02:38.894 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:38.900 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:41.863 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 11:02:41.864 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 11:02:41.887 (GATEWAY) Temp (Temp)
      2017-03-09 11:02:41.895 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:41.901 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:49.208 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 11:02:49.209 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 11:02:49.232 (GATEWAY) Temp (Temp)
      2017-03-09 11:02:49.240 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:02:49.245 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:03:54.286 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:04:59.319 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:06:04.359 (GATEWAY) Temp (Temp)
      2017-03-09 11:06:04.368 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:06:36.109 MySensors: Node: 3, Sketch Name: Pressure Sensor
      2017-03-09 11:06:36.111 MySensors: Node: 3, Sketch Version: 1.1
      2017-03-09 11:06:36.123 (GATEWAY) Temp (Temp)
      2017-03-09 11:06:36.132 (GATEWAY) General/Barometer (Baro)
      2017-03-09 11:06:36.137 (GATEWAY) General/Barometer (Baro)
      
      posted in Announcements
      James Flosse
      James Flosse
    • RE: 💬 Atmospheric Pressure Sensor

      Hi, i've a problem with the bmp180 with domoticz. I use raspberry pi with domoticz and mysensor v2 and nrf24 on gpio, i receive data but i think is wrong. The temperature is 31°C and pressure is 728. I put my altitude in the sketch.
      Can you help me?
      Best regards.

      posted in Announcements
      James Flosse
      James Flosse