6 Replies Latest reply on Sep 18, 2014 4:01 PM by DiegoV_Intel

    SHT15 with Intel Galileo Board

    ahmadto

      Hello everybody,

       

      I am trying to measure the temp. and Humidity with sensor SHT15 but it does not work

       

      Did somebody try this Sensor with Intel Galileo Board gn1.

        • 1. Re: SHT15 with Intel Galileo Board
          Intel_Alvarado

          Hi ahmadto,

          Can you be more specific about what is not working? What sketch are you running?  Also, make sure that you are choosing the correct board and port in the Galileo IDE under the “Tools” menu.

          Regards

          Sergio

          • 2. Re: SHT15 with Intel Galileo Board
            ahmadto

            Hey Sergio,

             

            Thanks for your response. Sorry that i canot tell you now what kind of error, because i treid with many Code and some of them told mw that something was not declare. I am using the Intel Galileo first generation, i download the Library from this sensor and i used Pin 11 for clock and Pin 10 for Data. But i am not sure if this Sensor is with this board compatible or not. Do you have the correct Code from this Sensor. I want to make Weather Station in Webserver.

            Best regards

             

            Ahmadto

            • 3. Re: SHT15 with Intel Galileo Board
              ahmadto

              Hey,

              this is my Code :

              #include <SHT1x.h>

              const int datenPinSHT  =  3; // Daten-Pin an Pin D2

              const int clockPinSHT =  2; // Clock-Pin an Pin D3

              float temperaturSHT; // definiere Variable als float

              float luftfeuchtigkeitSHT; // definiere Variable als float

              float taupunktSHT; // definiere Variable als float

              SHT1x Sht1x(datenPinSHT, clockPinSHT); // bilde Objekt "Sht1x"

              String ausgabe; // in diesem String landen alle Teile ..., auch spaeter diese:

              const String temperaturTxt = "Temperatur ";

              const String gradTxt1 = " Grad C, ";

              const String luftfeuchtigkeitTxt = "Luftfeuchtigkeit ";

              const String prozentTxt = " %, ";

              const String taupunktTxt = "Taupunkt ";

              const String gradTxt2 = " Grad C";

              void setup()

              {

                Serial.begin(9600); // beginne serielle Kommunikation

                delay(20); // warte bis Sensor bereit

              }

               

               

              void loop()

              {

                temperaturSHT = Sht1x.readTemperatureC(); // lese Temperatur

                delay(100); // warte ein wenig

                luftfeuchtigkeitSHT = Sht1x.readHumidity(); // lese Luftfeuchtigkeit

               

                 float a = 17.271; // fuer Formel

                float b = 237.7; // fuer Formel

                float taupunktTmp = (a * temperaturSHT) / (b + temperaturSHT) + log(luftfeuchtigkeitSHT / 100);

                taupunktSHT = (b * taupunktTmp) / (a - taupunktTmp);

                ausgabe = temperaturTxt + (int) (temperaturSHT + 0.5) + gradTxt1 + luftfeuchtigkeitTxt + (int) (luftfeuchtigkeitSHT + 0.5) + prozentTxt + taupunktTxt + (int) (taupunktSHT + 0.5) + gradTxt2;

               

                Serial.println(ausgabe); // zeige Ergebnis

                delay(10000); // warte 10 Sekunden bis zur nächsten Abfrage, minimal 7 Sekunden            

              }

               

              And the error :

              Arduino: 1.5.3 (Windows 7), Board: "Intel® Galileo"

              sketch_aug28a.ino: In function 'void loop()':

              sketch_aug28a.ino:41:55: error: passing 'const String' as 'this' argument of 'String String::operator+(int)' discards qualifiers [-fpermissive]

              • 4. Re: SHT15 with Intel Galileo Board
                Intel_Alvarado

                Hi ahmadto,

                 

                I believe the reason why the sensor is not working is because the library you are using is not supported in the list of supported libraries. Take a look at section 1.3 https://communities.intel.com/servlet/JiveServlet/previewBody/21837-102-7-26245/Galileo_RelNotes_329686_005.pdf .

                Another way to set the board to use this sensor might be using a different code that doesn’t use this library. I recommend you to take a look at these links http://bildr.org/2012/11/sht15-arduino/ and http://wiring.org.co/learning/basics/humiditytemperaturesht15.html They will show you the proper way to connect the sensor to the board and an example code you can modify and adapt to your application.

                 

                Regards

                Sergio

                • 5. Re: SHT15 with Intel Galileo Board
                  ahmadto

                  Hey Sergio ,

                  Thanks alot for your response.

                   

                  I have already the Library from sht1x.h in arduino .

                  i tried the code what u have sent. But i have another error :

                   

                  (sketch_sep02c.ino: In function 'void SHT_sendCommand(int, int, int)':

                  sketch_sep02c.ino:60:48: error: 'shiftOut' was not declared in this scope

                  sketch_sep02c.ino: In function 'int SHT_getData(int, int)':

                  sketch_sep02c.ino:94:49: error: 'shiftIn' was not declared in this scope)

                   

                  Is this Sensor with Intel Galileo suitable?

                   

                  Best regards

                   

                  Ahmad

                  • 6. Re: SHT15 with Intel Galileo Board
                    DiegoV_Intel

                    Hi ahmadto,

                     

                    I think the code recommended by Intel_Alvarado doesn't need the library, it is just an alternatively way without the library since it apparently is not supported. Also, the errors you showed are about the ShiftIn and the ShiftOut functions. Those functions are not supported for Galileo but you can check this post where JPMontero_Intel recommended some links to try to write a custom version for those functions: shiftOut not available for Galileo

                     

                    Try to check the post and tell us what were the results. Have a nice day!

                     

                    Regards,

                    Diego.