HDTV Antenna
& Tuner Box
GPS, Receivers
RF Modules
Voice Modules

Credit Card Payment

Follow us on Twitter Facebook

Hot! Hot! Hot!

Level: beginner

Last week we had a record heat wave in San Jose. TV and radio reminded us to keep kids and pets out of overheated car. I decided to check out how hot it was inside a car parked under the sun. I use the Temperature & Humidity module and the LCD2x16 to display the temperature.

Simple hardware

As there won't be any circuit, we don't need any bread board. I can use the Command Board with the Basic Commander for this project. The Command Board looks exactly like the Education Board, except it does not have the bread board nor the xxxx pins. It can connect up to seven peripherals at the same time.

As a precaution, I checked the specificiation of the modules to make sure the operation temperature is within the range. Fortunately, both modules function under 120F. I connect the two peripherals to the cmdBus pins on the Command Board using the cmdBusTM cable, making sure to connect the red cable of the cmdBus to the VDD pin. Otherwise, it would damage the modules. As I am using two modules, I need to set the dip switch on each module to different ID. To see what ID it is set or how to change it, check the ID MAP.

1Command Board with Basic Commander
1Temperature & Humidity

Intelligent Peripherals

Both the Temperature module and the LCD2x16 module have many built-in functions which makes programming a bliss. Let's check the Temperature module first. This module comes with several conversion functions between Celius, Fahrenheit, Kelvin scales. As the module's name indicates, it also has functions to detect humidity and dew.

Simple program

Fortunately, the module is already calibarated and ready to use. For our small project, I simply took the sample code from the module's manual. The sample code includes functions for humidity and dew. As on a hot day like this, there won't be dew and humidity is probably zero. So I removed those lines and kept only the function GetTemp(). By default, the modules gets the modules in F. If you are in a country where Celsius is used, you can use ConvertF2C() to easily convert the value automatically to Celsius.

     Peripheral MyTh As ThermometerA @ 0 'Set the module ID as 0 
     Dim fl_Temp As Float       ' store temperature in F
     Dim fl_TempC As Float      ' store temperature in C
     Sub Main()
         MyTh.Gettempf(fl_Temp) 'Get the temperature value
         MyTh.ConvertF2C(fl_Temp,fl_TempC)  'Convert the temperature from F to C
         Debug CLREOL,fl_Temp, "F ", fl_tempC, "C"  'show temperature in F and C
     End Sub

That's it. You can also enable up to 7 events in the Temperature module. These events can be used for many purposes, such as to alert you if the temperature or humidity reaches certain value. For example, if the temperature reaches 120F, play a beep sound; or if the temperature changes 10 degrees, turn on the LED, etc.


As I want to know the temperature in the car. I won't be able to display the temperature in the debug window. So I use the LCD2x16 module to display the output. The LCD2x16 is another simple module with many built-in functions and default settings such as backlight intensity, displaying from right to left, etc. You can change these according to your needs. Another nice feature of this module as well as the LCD4x20 is the capability to display customized characters.

      myLCD.DisplayOn() 'enable the display
      myLCD.SetBacklight(255) 'set LCD brightness to the maximum value
      myLCD.Backlighton(0) 'LCD backlight on constantly
      myLCD.Display(fl_temp) 'display the temperature

Before I compile and build the program, I double check that I have set the DIP switch to the right number for the ID mapping as indicated in my program. Once that is done, I test the program indoor. It shows a nice 80 degree. But once I put in the car, the temperature jumped up to 107 within seconds.

What is Next?

The Temperature and LCD2x16 are very easy to use. I managed to build this project within minutes. There are many more built-in functions such as automatically detecting and recording the temperature, humidity and dew value. Adding the Time Keeper, you can make your own alarm clock with temperature and humidity. We'd love to see your results. Share your project ideas with us.

Download: temphum.inb

  • Robot Kits
  • Commander Module
  • Commander Boards
  • Development Boards
  • Smart Modules
  • General Modules
  • Accessories
  • InnoBasic
  • catalogue

  • DIY Projects
  • ID MAP
  • Identifier List
  • InnoBasic Workshop

  • FAQ | Terms & Conditions | Contact Us

    Copyright © 2018 Kowatec Corporation. All rights reserved.