Smart living room

Project based on the use of the XMC1300 board to automatically control the TV's on/off based on the movement of people in the room.

IntermediateFull instructions provided10 hours436

Things used in this project

Hardware components

Infineon XMC1300 Boot Kit
Infineon XMC1300 Boot Kit
×1
S2GO RADAR BGT60LTR11
Infineon S2GO RADAR BGT60LTR11
×1
38 kHz Ir Transmitter Sensor
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Schematics

Code

Firmware

Arduino
Need the following libraries:
Arduino-IRremote: https://github.com/Arduino-IRremote/Arduino-IRremote
Arduino-radar-bgt60: https://github.com/Infineon/arduino-radar-bgt60
BGT60RadarUtils: https://github.com/yvcabrerago/BGT60RadarUtils
#include <bgt60-ino.hpp>
#include <bgt60-platf-ino.hpp>
#include <BGT60RadarUtils.h>
#include "TinyIRSender.hpp"

#define TD 5                           // P2.9
#define PD 6                           // P2.10
#define IR_SEND_PIN 7                  // P2.11

Bgt60Ino radarShield(TD, PD);
BGT60RadarUtils radar(&radarShield);

void setup() {
  Serial.begin(115200);
  delay(4000);
  Serial.println("setup");
  Error_t init_status = radarShield.init();
  if (init_status == OK) {
    Serial.println("radar init good");
  }
  else {
    Serial.println("radar init bad");
  }
  radar.StatusFunctions[Bgt60::NO_DIR][Bgt60::DEPARTING] = &sendIRCommand;
  radar.StatusFunctions[Bgt60::NO_DIR][Bgt60::APPROACHING] = &sendIRCommand;
}

void sendIRCommand() {
  sendNEC(IR_SEND_PIN, 0x4, 0x8, 2); // Send address 0x4 and command 0x8 on pin 7 with 2 repeats.
}

void loop() {
  delay(300);
  radar.checkStatus();
}

BGT60RadarUtils

Library repository in GitHub.

Credits

Yunior Vicente Cabrera González

Yunior Vicente Cabrera González

4 projects • 18 followers
Telecommunications and Electronics Engineer. I am passionate about designing electronic circuits and systems, as well as front-end software.
Danelis Garrido Guillan

Danelis Garrido Guillan

0 projects • 11 followers
Telecommunications and Electronics Engineer

Comments