Carol’s IoT and Final Project Planning

Bill of Materials (BOM):


Clear Acrylic Sheets 1/8″ Thick 4″ x 6″

LED light

Idea4: Stainless Steel Hollow Ball (I want an opaque plastic or acrylic ball, but I don’t know if the thermal conductivity will be good enough):

Possible temperature sensors:

TMP36 – Analog Temperature sensor – TMP36

reference instruction

Adafruit PCT2075 Temperature Sensor – STEMMA QT / Qwiic

LED light

Rough draft circuit diagram:

Idea1 (a Playback Counting Board for YouTubers. After the video playback reaches a specific value 1000, the YouTube acrylic panel light on the desktop will be turned on) possible code:

const char *ssid = “YourWiFiSSID”;
const char *password = “YourWiFiPassword”;

const int buttonPin = D2; // Connect the push button to pin D2
const int ledPin = D3; // Connect the LED to pin D3

volatile int playbackCount = 0;

void setup() {
pinMode(buttonPin, INPUT_PULLUP);
pinMode(ledPin, OUTPUT);


attachInterrupt(digitalPinToInterrupt(buttonPin), incrementPlaybackCount, FALLING);

void loop() {
if (playbackCount >= 1000) {
digitalWrite(ledPin, HIGH); // Turn on the LED when playback count reaches 1000
} else {
digitalWrite(ledPin, LOW); // Turn off the LED if playback count is less than 1000

void incrementPlaybackCount() {
Serial.println(“Playback Count: ” + String(playbackCount));

void connectToWiFi() {
WiFi.begin(ssid, password);
Serial.print(“Connecting to WiFi”);

while (WiFi.status() != WL_CONNECTED) {

Serial.println(“\nConnected to WiFi”);

In this code:

  • The button is connected to pin D2 and set up with a pull-up resistor.
  • The LED is connected to pin D3.
  • The playbackCount is a counter that increments when the button is pressed (interrupt triggered).
  • The LED will turn on when the playback count reaches 1000.
  • The ESP8266 connects to the WiFi network using the provided credentials.

Idea4 (a Divinationcrystal ball. When your hand is close to the crystal ball for a period of time, the heat sensor will sense the heat and will light up the built-in LED lights):

Possible code:

const int heatSensorPin = A0; // Connect the heat sensor to analog pin A0
const int ledPin = 13; // Built-in LED on most Arduino boards

const int heatThreshold = 300; // Adjust this value based on your sensor and environment

void setup() {
pinMode(heatSensorPin, INPUT);
pinMode(ledPin, OUTPUT);

void loop() {
int heatValue = analogRead(heatSensorPin);
Serial.println(“Heat Value: ” + String(heatValue));

if (heatValue > heatThreshold) {
// If heat is detected, turn on the LED
digitalWrite(ledPin, HIGH);
} else {
// If no heat is detected, turn off the LED
digitalWrite(ledPin, LOW);

delay(1000); // Adjust the delay as needed