loading

I already made two Instructables on how to use DTH11/DTH21/DTH22 and AM2301 Temperature and Humidity sensors with Arduino, and you can find them here and here . I also made Instructable on how to use I2C LCD Character Display, and one on how to use a directly connected LCD Character Display .

Here I will show you how you can use I2C LCD Character Display to display Temperature and Humidity measured by DHT11 sensor. The same steps can be followed to implement the project with directly connected LCD display.

In the previous Instructables, we just sent some text to be directly displayed in the LCD Display in the order the characters arrived. Visuino allows the information to also be displayed in predefined fields at specific positions. In addition, Visuino allows visually to create and use custom characters in the display. In this Instructable, we will use all of these features to make a cool Temperature and Humidity LCD display.

Step 1: Components

  1. One Arduino compatible board (I use Arduino Nano, because I have one, but any other will be just fine)
  2. One DHT11 Sensor module I got from this cheap 37 sensors set
  3. One I2C 16x2 LCD Display (Back side of the LCD with the I2C adapter showed on Picture 2)
  4. One small Breadboard (Any breadboard can be used, or any other way to connect 3 wires together)
  5. 3 Female-Male jumper wires
  6. 5 Female-Female jumper wires

Step 2: Connect the LCD Module to the Arduino

  1. Connect Ground(Black wire), Power(Red wire), SDA(Green wire), and SCL(Yellow wire) to the LCD Module (Picture 1)
  2. Connect the other end of the Ground wire(Black wire) to Ground pin of the Arduino board(Picture 2)
  3. Connect the other end of the SDA wire(Green wire) to SDA/Analog pin 4 of the Arduino Nano board(Picture 2)
  4. Connect the other end of the SCL wire(Yellow wire) to SCL/Analog pin 5 of the Arduino Nano board(Picture 2)
  5. Connect another Female-Male Power wire(Red wire) to the 5V Power pin of the Arduino board(Picture 2), and leave the Male end unconnected
  6. Picture 3 shows where are the Ground, 5V Power, SDA/Analog pin 4, and SCL/Analog pin 5 pins of the Arduino Nano

Step 3: Connect the Humidity/Thermometer Sensor to Arduino

  1. Connect Female-MalePower(Red wire), connect Female-Female Ground(Black wire), and Data(Gray wire) to the DHT11 Module (Picture 1 shows 2 different types of DHT11 sensor modules. As you can see the pins may differ, so connect carefully!)
  2. Connect the other end of the Ground wire(Black wire) to Ground pin of the Arduino board (Picture 2 and 3)
  3. Connect the other end of the Data wire(Gray wire) to Digital pin 2 of the Arduino board (Picture 2, and 3)
  4. Picture 4 shows in Red where are the Ground, and Digital 2 pins of the Arduino Nano (In Blue are shown the connections made in the previous step)

Step 4: Connect the Power Wires Together

Connect the Male ends of the 3 Power wires(Red wires) - from the Display, the DHT11 Module, and the Arduino together as example with the help of a Breadboard (Picture 1) - In my case I used a small Breadboard

Step 5: Start Visuino, and Select the Arduino Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/ .

Please be aware that there are some critical bugs in Arduino IDE 1.6.6.

Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work!

The Visuino: https://www.visuino.com also needs to be installed.

  1. Start Visuino as shown in the first picture
  2. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino
  3. When the dialog appears, select Arduino Nano as shown in Picture 2

Step 6: In Visuino: Add and Connect LCD Component, and Open the Elements Editor

  1. Type "lcd" in the Filter box of the Component Toolbox then select the "Liquid Crystal Display (LCD) - I2C" component (Picture 1), and drop it in the design area
  2. Click on the "Tools" button (Picture 2) to open the Elements editor (Picture 3)

Step 7: In Visuino: Add, and Setup Text and Analog Value Elements to Display the Temperature and Humidity

We will add a Text field with the description of the value, and Analog field to display the value for the Temperature and Humidity values.

First we will add Description and value fields for the Temperature:

  1. Add Text field for the Temperature description text by double clicking on the "Text Field" in the right window of the "Elements" editor (Picture 1)
  2. In the Object Inspector set the "InitialValue" property of the element to "Temp:" (Picture 1) - This will specify the text to be displayed
  3. In the Object Inspector set the "Width" property of the element to 10 (Picture 1) - This will specify that the text field will be no bigger than 10 characters
  4. Add Analog field for the Temperature value double clicking on the "Analog Field" in the right window of the "Elements" editor (Picture 2)
  5. In the Object Inspector set the "Column" property of the element to 10 (Picture 2) - This will specify the starting column of the field
  6. In the Object Inspector set the "Precision" property of the element to 1 (Picture 2) - This will specify the number of digits after the decimal point
  7. In the Object Inspector set the "Width" property of the element to 4 (Picture 2) - This will specify that the field will be no bigger than 4 characters

Next we will repeat the same steps for the Humidity:

  1. Add Text field for the Humidity description text by double clicking on the "Text Field" in the right window of the "Elements" editor (Picture 3)
  2. In the Object Inspector set the "InitialValue" property of the element to "Humidity:" (Picture 3)
  3. In the Object Inspector set the "Row" property of the element to 1 (Picture 3) - This will specify that the field will be shown in the second row of the Display
  4. In the Object Inspector set the "Width" property of the element to 10 (Picture 3)
  5. Add Analog field for the Humidity value by double clicking on the "Analog Field" in the right window of the "Elements" editor (Picture 4)
  6. In the Object Inspector set the "Column" property of the element to 10 (Picture 4)
  7. In the Object Inspector set the "Precision" property of the element to 1 (Picture 4)
  8. In the Object Inspector set the "Row" property of the element to 1 (Picture 4)
  9. In the Object Inspector set the "Width" property of the element to 4 (Picture 4)

Step 8: In Visuino: Add, and Setup Custom Degrees Symbol Shape Element for the Temperature

The LCD display does not have Degree symbol, so we will define our own. For this, first we will define a symbol, and then display it.

  1. Add field to define a custom character by double clicking on the "Define Custom Character" in the right window of the "Elements" editor (Picture 1)
  2. In the Object Inspector, select the "Pattern" property, and click on the "..." button next its value (Picture 1)
  3. In the Pixel Editor, draw the shape of the Degree symbol as shown in Picture 2. You can use the mouse or the arrows to move around, and the "Spacebar" key to set or clear a pixel
  4. Close the dialog by clicking on the "OK" button (Picture 2)
  5. Add a field do display the custom character at specific location by double clicking on the "Custom Character Field" in the right window of the "Elements" editor (Picture 3)
  6. In the Object Inspector set the "Column" property of the element to 15 (Picture 3)

Step 9: In Visuino: Add, and Setup % Element for the Humidity, and Connect the LCD Display

  1. Add Text field for the % text by double clicking on the "Text Field" in the right window of the "Elements" editor (Picture 1)
  2. In the Object Inspector set the "InitialValue" property of the element to "%" (Picture 1)
  3. In the Object Inspector set the "Column" property of the element to 15 (Picture 1)
  4. In the Object Inspector set the "Row" property of the element to 1 (Picture 1)
  5. Connect the "Out" pin of the LCD component to the to the "In" pin of the I2C channel of the Arduino component (Picture 2)

Step 10: In Visuino: Add and Connect DHT11 Component

  1. Type "dht" in the Filter box of the Component Toolbox then select the "Humidity and Thermometer DHT11/21/22/AM2301" component (Picture 1), and drop it in the design area
  2. Connect the "Temperature" output pin of the HumidityThermometer1 component to the "In" pin of the Elements.AnalogField1 element of the LiquidCrystalDisplay1 component (Picture 2)
  3. Connect the "Humidity" output pin of the HumidityThermometer1 component to the "In" pin of the Elements.AnalogField2 element of the LiquidCrystalDisplay1 component (Picture 3)
  4. Connect the "Sensor" pin of the HumidityThermometer1 component to the "Digital" input pin of the "Digital[ 2 ]" channel of the Arduino component (Picture 4)

Step 11: In Visuino: Add and Connect Clock Generator Component

We can use the project as it is, however it will refresh the LCD very fast all the time. It is better if the LCD is updated as example once a second. For this we will add a clock component to clock the reading from the sensor and the updating of the LCD.

  1. Type "clock" in the Filter box of the Component Toolbox then select the "Clock Generator" component (Picture 1), and drop it in the design area
  2. Connect the "Out" output pin of the ClockGenerator1 component to the "Clock" input pin of the HumidityThermometer1 component (Picture 2)

Step 12: Generate, Compile, and Upload the Arduino Code

  1. In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
  2. In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Step 13: And Play...

Congratulations! You have completed the project.

Picture 1 shows the connected and powered up project. As you can see on the picture the Display will show the temperature and the Humidity.

On Picture 2 you can see the complete Visuino diagram.
Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.com

<p>can I connect it to a 5V 700 mA wall adapter? </p><p>Thanks in advance!</p>
You should use something like 7V adapter for the VIN pin, as there is a regulator on the nano, and it needs more than 5V to operate properly and generate 5V on its output. You may be able to hook directly to the 5V to power it, but I am not sure if there can be any problems.
<p>Hello,</p><p>I have a problem, my lcd dot show me humidity % and temperature, tem: 0.0, Humidity: 0.0%. What can be a problem?</p>
<p>Hello Wyboroff,</p><p>Check if the DHT11 is properly connected. You can also test it by connecting the Temperature pin in Visuino to Serial to check the temperature. If you do this do it in a new Visuino project as Nano has limited memory and the serial communication tends to add quite some memory usage. So start new project drop DHT11 component, connect the sensor pin. Connect the temperature pin to Serial and test with Serial Terminal to see if the module works.</p>
<p>Thank you! Everything work good. I have not see small interruption with pin of gnd :)</p>
<p>Hi <br>Does anyone have a link to the code as I detest visuino ?</p><p>Paul</p>
<p>I have problem with compilation in arduino IDE. It's a problem: </p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p><p>Arduino: 1.0.6 (Windows NT (unknown)), Board: &quot;Arduino Nano w/ ATmega328&quot;</p><p>In file included from C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:13,</p><p> from Generated.ino:10:</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:261: error: 'nullptr' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:261: error: ISO C++ forbids initialization of member '_list'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:261: error: making '_list' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:262: error: ISO C++ forbids initialization of member '_size'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:262: error: making '_size' static</p><p>In file included from Generated.ino:10:</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:74: error: 'nullptr' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:74: error: ISO C++ forbids initialization of member 'OnReceiveObject'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:74: error: making 'OnReceiveObject' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:74: error: invalid in-class initialization of static data member of non-integral type 'OpenWire::Object*'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:75: error: 'nullptr' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:75: error: ISO C++ forbids initialization of member 'OnReceive'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:75: error: making 'OnReceive' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:75: error: invalid in-class initialization of static data member of non-integral type 'void (OpenWire::Object::*)(void*)'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:88: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:95: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h: In member function 'void OpenWire::CallbackPin::SetCallback(OpenWire::Object*, void (OpenWire::Object::*)(void*))':</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:80: error: 'OnReceiveObject' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:81: error: 'OnReceive' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h: At global scope:</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h: In instantiation of 'Mitov::SimpleList&lt;OpenWire::Pin*, unsigned char&gt;':</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:100: instantiated from here</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:261: error: invalid in-class initialization of static data member of non-integral type 'OpenWire::Pin**'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:262: error: ISO C++ forbids in-class initialization of non-const static member 'Mitov::SimpleList&lt;OpenWire::Pin*, unsigned char&gt;::_size'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:114: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:119: error: expected `;' before 'public'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:147: error: ISO C++ forbids initialization of member 'FIsConnected'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:147: error: making 'FIsConnected' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:147: error: ISO C++ forbids in-class initialization of non-const static member 'FIsConnected'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:211: error: ISO C++ forbids initialization of member 'FStarted'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:211: error: making 'FStarted' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:211: error: ISO C++ forbids in-class initialization of non-const static member 'FStarted'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:233: error: ISO C++ forbids initialization of member 'Value'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:233: error: making 'Value' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:236: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:240: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:250: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:254: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:264: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:269: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:276: error: ISO C++ forbids initialization of member 'Value'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:276: error: making 'Value' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:281: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:292: error: expected `;' before 'public'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:311: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:322: error: expected `;' before 'public'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:340: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:351: error: expected `;' before 'public'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:364: error: ISO C++ forbids initialization of member 'Clocked'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:364: error: making 'Clocked' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:364: error: ISO C++ forbids in-class initialization of non-const static member 'Clocked'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:367: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:372: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:379: error: ISO C++ forbids initialization of member 'Value'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:379: error: making 'Value' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:382: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:387: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:397: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:402: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:412: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:418: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:425: error: ISO C++ forbids initialization of member 'Value'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:425: error: making 'Value' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:428: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:436: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:446: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:455: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:465: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:475: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:482: error: ISO C++ forbids initialization of member 'Value'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:482: error: making 'Value' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:483: error: ISO C++ forbids initialization of member 'OldValue'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:483: error: making 'OldValue' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:486: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:492: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:503: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:509: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:520: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:526: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:533: error: ISO C++ forbids initialization of member 'Index'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:533: error: making 'Index' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:533: error: ISO C++ forbids in-class initialization of non-const static member 'Index'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:536: error: 'nullptr' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:536: error: ISO C++ forbids initialization of member 'OnReceiveObject'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:536: error: making 'OnReceiveObject' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:536: error: invalid in-class initialization of static data member of non-integral type 'OpenWire::Object*'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:537: error: 'nullptr' was not declared in this scope</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:537: error: ISO C++ forbids initialization of member 'OnIndexedReceive'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:537: error: making 'OnIndexedReceive' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:537: error: invalid in-class initialization of static data member of non-integral type 'void (OpenWire::Object::*)(int, void*)'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:540: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:548: error: expected `;' before '}' token</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:556: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:561: error: expected `;' before 'public'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:574: error: expected ';' before 'override'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:579: error: expected `;' before 'public'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h: In instantiation of 'Mitov::SimpleList&lt;OpenWire::Component*, unsigned int&gt;':</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:586: instantiated from here</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:261: error: invalid in-class initialization of static data member of non-integral type 'OpenWire::Component**'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:262: error: ISO C++ forbids in-class initialization of non-const static member 'Mitov::SimpleList&lt;OpenWire::Component*, unsigned int&gt;::_size'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h: In instantiation of 'Mitov::SimpleList&lt;OpenWire::Component*, unsigned char&gt;':</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/OpenWire.h:595: instantiated from here</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:261: error: invalid in-class initialization of static data member of non-integral type 'OpenWire::Component**'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov_SimpleList.h:262: error: ISO C++ forbids in-class initialization of non-const static member 'Mitov::SimpleList&lt;OpenWire::Component*, unsigned char&gt;::_size'</p><p>In file included from Generated.ino:11:</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:97: error: ISO C++ forbids initialization of member 'Alpha'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:97: error: making 'Alpha' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:97: error: ISO C++ forbids in-class initialization of non-const static member 'Alpha'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:523: error: ISO C++ forbids initialization of member '_BytesSize'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:523: error: making '_BytesSize' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:523: error: ISO C++ forbids in-class initialization of non-const static member '_BytesSize'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:544: error: ISO C++ forbids initialization of member 'Enabled'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:544: error: making 'Enabled' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:544: error: ISO C++ forbids in-class initialization of non-const static member 'Enabled'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:567: error: ISO C++ forbids initialization of member 'Enabled'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:567: error: making 'Enabled' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:567: error: ISO C++ forbids in-class initialization of non-const static member 'Enabled'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:604: error: ISO C++ forbids initialization of member 'Enabled'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:604: error: making 'Enabled' static</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:604: error: ISO C++ forbids in-class initialization of non-const static member 'Enabled'</p><p>C:\Users\Patryk\Documents\Arduino\libraries\Mitov/Mitov.h:613: error: expected ';' before 'override'</p><p>Generated:68: error: expected `;' at end of input</p><p>Generated:68: error: expected `}' at end of input</p><p>Generated:68: error: expected unqualified-id at end of input</p><p>Generated:68: error: expected `}' at end of input</p><p>And it is a program: </p><p>//----------------------------------------------</p><p>//</p><p>// Sketch Generated by Visuino</p><p>// <a href="http://www.visuino.com" rel="nofollow"> www.visuino.com</a></p><p>//</p><p>//----------------------------------------------</p><p>#define VISUINO_ARDUINO_NANO</p><p>#include &lt;OpenWire.h&gt;</p><p>#include &lt;Mitov.h&gt;</p><p>#include &lt;Mitov_FormattedSerial.h&gt;</p><p>#include &lt;Wire.h&gt;</p><p>#include &lt;Mitov_Basic_I2C.h&gt;</p><p>#include &lt;Visuino_LiquidCrystal_I2C.h&gt;</p><p>#include &lt;Mitov_LiquidCrystalDisplay.h&gt;</p><p>#include &lt;Mitov_DHT_Sensor.h&gt;</p><p>#include &lt;Mitov_Timing.h&gt;</p><p>// Declarations</p><p>namespace Declarations</p><p>{</p><p> Mitov::LiquidCrystalDisplayI2C LiquidCrystalDisplay1( new LiquidCrystal_I2C( 0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE ), 16, 2 );</p><p> Mitov::LiquidCrystalElementTextField TArduinoLiquidCrystalElementTextField1( LiquidCrystalDisplay1 );</p><p> Mitov::LiquidCrystalElementAnalogField TArduinoLiquidCrystalElementAnalogField1( LiquidCrystalDisplay1 );</p><p> Mitov::LiquidCrystalElementTextField TArduinoLiquidCrystalElementTextField2( LiquidCrystalDisplay1 );</p><p> Mitov::LiquidCrystalElementAnalogField TArduinoLiquidCrystalElementAnalogField2( LiquidCrystalDisplay1 );</p><p> Mitov::LiquidCrystalElementDefineCustomCharacter TArduinoLiquidCrystalElementDefineCustomCharacter1( LiquidCrystalDisplay1, 0, 12, 18, 18, 12, 0, 0, 0, 0 );</p><p> Mitov::LiquidCrystalElementCustomCharacterField TArduinoLiquidCrystalElementCustomCharacterField1( LiquidCrystalDisplay1 );</p><p> Mitov::LiquidCrystalElementTextField TArduinoLiquidCrystalElementTextField3( LiquidCrystalDisplay1 );</p><p> Mitov::DHT11Sensor&lt;2&gt; HumidityThermometer1;</p><p> Mitov::ClockGenerator ClockGenerator1;</p><p>} // Declarations</p><p>//The setup function is called once at startup of the sketch</p><p>void setup()</p><p>{</p><p> Wire.begin();</p><p> Declarations::TArduinoLiquidCrystalElementTextField1.InitialValue = &quot;Temp:&quot;;</p><p> Declarations::TArduinoLiquidCrystalElementTextField1.Width = 10;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField1.Precision = 1;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField1.Width = 4;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField1.Column = 10;</p><p> Declarations::TArduinoLiquidCrystalElementTextField2.InitialValue = &quot;Humidity:&quot;;</p><p> Declarations::TArduinoLiquidCrystalElementTextField2.Width = 10;</p><p> Declarations::TArduinoLiquidCrystalElementTextField2.Row = 1;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField2.Precision = 1;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField2.Width = 4;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField2.Column = 10;</p><p> Declarations::TArduinoLiquidCrystalElementAnalogField2.Row = 1;</p><p> Declarations::TArduinoLiquidCrystalElementCustomCharacterField1.Index = 0;</p><p> Declarations::TArduinoLiquidCrystalElementCustomCharacterField1.Column = 15;</p><p> Declarations::TArduinoLiquidCrystalElementTextField3.InitialValue = &quot;%&quot;;</p><p> Declarations::TArduinoLiquidCrystalElementTextField3.Column = 15;</p><p> Declarations::TArduinoLiquidCrystalElementTextField3.Row = 1;</p><p> Declarations::HumidityThermometer1.TemperatureOutputPin.Connect( Declarations::TArduinoLiquidCrystalElementAnalogField1.InputPin );</p><p> Declarations::HumidityThermometer1.HumidityOutputPin.Connect( Declarations::TArduinoLiquidCrystalElementAnalogField2.InputPin );</p><p> Declarations::ClockGenerator1.OutputPin.Connect( Declarations::HumidityThermometer1.ClockInputPin );</p><p> OpenWire::Component::_SystemInit();</p><p>}</p><p>// The loop function is called in an endless loop</p><p>void loop()</p><p>{</p><p> OpenWire::Component::_SystemLoop();</p><p>}</p><p>Please help!</p>
<p>You need Arduino IDE 1.6.7 or higher, and it will work ;-)</p>
<p>Why a decimal number remains zero?</p>
<p>Hello !! Plz can you give me code Email:ardonitu80@gmail.com</p>
<p>The Visuino project is attached in the Instructable. Use it to generate the code, as it will generate the proper code for the corresponding version of the libraries. The Visuino is updated together with the libraries, and code generated for one version will not work with newer library versions. It is best to use Visuino to generate the code for you.</p>
<p>Because the DHT11 does not support anything smaller than 1 degree precision :-(, if you want better, you will need DHT22 . I have ordered one, and waiting fro it to arrive soon.</p>
<p>OK. I also now ordered DHT22.</p><p>Big thanks to the excellent program (Visuino) and sorry for Google Translator english :)</p>
<p>Hi.</p><p>I have a problem with Visuino.</p><p>Output from Visuino (7.7.0.80) to Arduino 1.6.7 and verifying the sketch gives error:<br><br>Arduino: 1.6.7 (Windows 10), Board: &quot;Arduino Nano, ATmega328&quot;</p><p>E:\Our Documents\Documents\Arduino\libraries\Visuino_LiquidCrystal\Visuino_I2CIO.cpp:35:26: fatal error: ../Wire/Wire.h: No such file or directory</p><p> #include &lt;../Wire/Wire.h&gt;</p><p> ^</p><p>compilation terminated.</p><p>exit status 1</p><p>Error compiling.</p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p><p>The problem is in every sketch I make with LCD, and this one is strictly followed as the one above.</p><p>What can I do to correct this error?</p><p>Thank You in advance!</p>
<p>The Wire.h is part of the Arduino IDE installation. This means that for some reason you have a corrupted Arduino IDE installation, or something is misconfigured :-( . You should ask in the Arduino Forums, to see if somebody knows the problem, or you can try to do a clean Arduino IDE install.</p>
Thank You!<br>I asked on one forum, and the problem is in Arduino IDE, because they moved Wire.h to subfolder /Wire/src/Wire.h. I corrected the path in Visuino_I2CIO.cpp and now it works without any problem!<br><br>Thank You for help and for Visuino, it is great (without it, I wouldn't even consider to enter Arduino world).
<p>Thank you! I am glad you like it :-)</p>
<p>Fantastic !! This makes Arduino programming easy and understandable. Worked the first time. Thanks for the last tip about the DHT library. Looking forward to use this on other projects..! Thank you ...great work :) </p>
<p>Thank you!</p><p>You are welcome! I actually just finished rewriting the DHT support in Visuino not to require the library, and I will probably remove the step after the next Visuino release :-) I am constantly working to make it simpler to use.</p>
I like your step by step instructions. Most guys forget that there are idiots like me out there that want to learn, but do not want to use days just to get to know the software. Now, I can follow the steps, and then adjust the numbers afterwards. .. Looking forward to learn how to use this with the 8266 boards. And also maybe with the Blynk app. Have you used the Blynk App for your projects ? Kjetil
<p>Haven't done Blynk, but probably will :-)</p><p>Enjoy! :-)</p>
<p>great instructable easy to follow great work </p>
<p>Thank you! :-) Enjoy!</p>
<p>Brilliant thank you.</p>
<p>You are Welcome! Enjoy :-)</p>

About This Instructable

17,557views

78favorites

License:

More by BoianM:Assemble Kuman Wi-Fi Robot With Camera and Manipulator Arduino and Visuino: Long Distance Remote Light Sensor With RFM95W/RFM98W Makerfabs LoRa Shields  Arduino Nano and Visuino: Animate the Colors of RGB LED 
Add instructable to: