Navigation
Assembly
Code
Final/Demo
Home
Issues
 

Code

Code description

The code for the project is very conditional. The remote acts as the master controller. IR signals from the remote are sent to the Arduino for control over temperature, lights, fan, and blinds. In order to cut back on interference, only the control center (Arduino) decodes messages from the remote. When the remote button for opening blinds is pushed, a signal is sent to the control center, and then emitted from the control center to the blinds (mbed).

The control center LCD displays the current temperature and a set temperature. The remote control is used to set the temperature. When it is too warm inside the room, the blinds shut and the fan turns on. When it is too cool, the blinds open and the fan turns off in order to heat the room. 

The pushbuttons on the control center are an alternate input to open and close the blinds.

mbed
  • The mbed was programmed using the online compiler.
  • Libraries and documentation written by Shinichiro Nakamura were used for IR programming
  • The "main.cpp" file contains the commented code to run the mbed.

Arduino
  • IR libraries written by shirriff were used for receiving IR codes from the remote and sending IR codes to the sensor on the mbed.
  • Servo library published on the Arduino website was used for switch control on the Arduino
  • LiquidCrystal library published on the Arduino website was used for LCD configuration
  • The program to compile and upload code to the Arduino device can be found here.
  • The "project_lcd.ino" file can be opened in any text editor or the Arduino program.

Updated on Dec 10, 2013 by Hitesh Patel (Version 7)


Attachments (2)

project_lcd.ino - on Dec 10, 2013 by Hitesh Patel (Version 2)

main.cpp - on Dec 8, 2013 by Hitesh Patel (Version 2)