Final Project¶
Interactive Table¶
(I am a carpenter)
At the beginning of my search for the final project, after looking at many ideas and after talking to myself, I said why not do something related to carpentry, but the project had to be about electronics, so the idea was a reception table or whatever, small, and the materials used were wood and Epoxy (resin) and iron. The idea was acceptable, but it lacked electronics. After deep thinking, I added lighting to it (LED), but this was not enough, so I had to use (Inputs/Outputs) The options were to use a remote or a magnet sensor and have a drawer in the table, until I chose an Ultrasonic sensor. The idea is to program the LED and connect it with the Ultrasonic sensor and to know that when it senses movement, the LED lights up and sets a time. Certainly, after the end of the time, the ultrasonic sensor turns on and senses if there is movement, the LED remains lit, and if there is no movement, the LED turns off.
The idea is: It is a table with epoxy (resin) and the LED, and it is in the path of the epoxy, and when the LED lights up, the epoxy lights up. It is a reception or hospitality table, and its location is the guest room, for example. When there are guests, the sensor turns on, the LED lights up and the epoxy glows as if the guest is being welcomed. It is a beautiful piece of furniture.
Electronics¶
Ultrasonic: It is a sensor used to determine distance using ultrasound. This sensor belongs to the “Grove” system, which includes a set of easy-to-use electronic components.
LED strip: (LED strip) is a type of lighting consisting of an array of LEDs mounted on a flexible or rigid strip. It is used in a variety of applications, including decorative lighting, backlighting, and general lighting.
XIAO ESP32-C3: is a small development board based on the ESP32-C3 chip, designed to facilitate Internet of Things (IoT) projects and portable applications. Here are some details about it:
Key Features: Powerful Processor: It uses the ESP32-C3 chip, featuring a RISC-V processor running at 160 MHz, providing good performance for various applications.
Microcontroller: A microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system. It typically includes a processor core, memory, and programmable input/output peripherals.
The CNC was used to settle the table top
Code:¶
#include <Adafruit_NeoPixel.h>
#define ULTRASONIC_PIN 9 // Connect ultrasonic sensor to D6
#define LED_PIN 8 // Connect RGB LED Stick to D8
#define NUM_LEDS 60 // Number of LEDs on the stick
#define DISTANCE_THRESHOLD 100 // Distance in cm to trigger the LED
Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
long measure_distance() {
pinMode(ULTRASONIC_PIN, OUTPUT);
digitalWrite(ULTRASONIC_PIN, LOW);
delayMicroseconds(2);
digitalWrite(ULTRASONIC_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(ULTRASONIC_PIN, LOW);
pinMode(ULTRASONIC_PIN, INPUT);
long duration = pulseIn(ULTRASONIC_PIN, HIGH);
return duration / 58; // Convert to centimeters
}
void setup() {
Serial.begin(115200);
strip.begin();
strip.show(); // Initialize all pixels to 'off'
strip.setBrightness(50); // Set brightness to about 1/5 (max = 255)
}
void loop() {
long distance = measure_distance();
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
if (distance < DISTANCE_THRESHOLD) {
// Movement detected, light up the LED stick
for(int i=0; i<NUM_LEDS; i++) {
strip.setPixelColor(i, strip.Color(255, 0, 0)); // Red color
}
strip.show();
delay(18000); // Keep LEDs on for 1 second
} else {
// No movement, turn off LEDs
strip.clear();
strip.show();
}
delay(100); // Short delay between measurements
}
2D and 3D Modeling¶
Add here your modeling and design.
Some other section¶
This is an updated text.
Materials¶
Qty | Description | Price | Link | Notes |
---|---|---|---|---|
1 | Material one | 22.00 $ | http://amazon.com/test | Order many |
1 | Material two | 22.00 $ | http://amazon.com/test | |
1 | Material three | 22.00 $ | http://amazon.com/test | |
1 | Material five | 22.00 $ | http://amazon.com/test | |
1 | Material eight | 22.00 $ | http://amazon.com/test | |
1 | Material twelve | 22.00 $ | http://amazon.com/test | |
1 | Material eleven | 22.00 $ | http://amazon.com/test |
Useful links¶
Code Example¶
Use the three backticks to separate code.
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Gallery¶
Video¶
From Vimeo¶
Sound Waves from George Gally (Radarboy) on Vimeo.