George Kartsonas

MAX32620 FHTR Heat Control Unit

A simple step-bystep procedure to control anything in your home using the MAX32620 FTHR.

BeginnerProtip1 hour639

Things used in this project

Hardware components

Maxim Integrated MAX32630FTHR
Relay (generic)

Software apps and online services

Arduino IDE
Arduino IDE


Read more


Arduino Relay Code

void setup()
pinMode(12, OUTPUT);
while (!Serial);
Serial.println("Input 1 to Turn LED on and 2 to off");

void loop() {
if (Serial.available())
int state = Serial.parseInt();
if (state == 1)
digitalWrite(12, HIGH);
Serial.println("Command completed LED turned ON");
if (state == 2)
digitalWrite(12, LOW);
Serial.println("Command completed LED turned OFF");

Processing GUI Code

import controlP5.*; //import ControlP5 library
import processing.serial.*;

Serial port;

ControlP5 cp5; //create ControlP5 object
PFont font;

void setup(){ //same as arduino program

  size(300, 450);    //window size, (width, height)
  printArray(Serial.list());   //prints all available serial ports
  port = new Serial(this, "COM19", 9600);  //i have connected arduino to co19, it would be different in linux and mac os
  //lets add buton to empty window
  cp5 = new ControlP5(this);
  font = createFont("calibri light bold", 26);    // custom fonts for buttons and title
  cp5.addButton("red")     //"red" is the name of button
    .setPosition(100, 50)  //x and y coordinates of upper left corner of button
    .setSize(120, 70)      //(width, height)
  cp5.addButton("alloff")     //"alloff" is the name of button
    .setPosition(100, 250)  //x and y coordinates of upper left corner of button
    .setSize(120, 70)      //(width, height)

void draw(){  //same as loop in arduino

  background(150, 0 , 150); // background color of window (r, g, b) or (0 to 255)
  //lets give title to our window
  fill(0, 255, 0);               //text color (r, g, b)
  text("LIGHT CONTROL", 80, 30);  // ("text", x coordinate, y coordinat)

//lets add some functions to our buttons
//so whe you press any button, it sends perticular char over serial port

void red(){

void alloff(){


George Kartsonas

George Kartsonas

18 projects • 37 followers