Date 10-10-2023

Cute group

Idea 1: Pump-kin!

Concept / Sketch / Input & Output

The Pump-kin! is a pumpkin hat, we would like to use a sensor as the switch. And we will add some lights on the hat when the switch is on, the lights on.

We were thinking that to use the accelerometer and gyro sensor, and making sunglasses as the switch, when opening the clip-on sunglass, all lights were off, and when we closed it, all lights were bright.

截屏2023-10-10 00.29.17.png

Ultrasonic sensors emit short bursts of high-frequency sound pulses at regular intervals. These sound pulses propagate through the air, and if they encounter an object, they are reflected back to the sensor as echo signals. This information is used to calculate the distance to the target by measuring the time it takes for the echoes to travel. So, our team is planning to create party glasses that operate an ultrasonic sensor by adjusting the angle.

  1. Normally, the ultrasonic sensor is attached to the frame of the glasses and is not used for object detection.
  2. When you want to enjoy the party, you adjust the ultrasonic sensor to face forward.
  3. The ultrasonic sensor continuously detects objects in real-time and sends the detected values to an Arduino.
  4. The Arduino processes these values and converts them into values that can be used to control Neopixels.
  5. The Neopixels illuminate accordingly.

Support technologies (how to interface, where to buy, etc.)

Accelerometer and Gyroscope Sensor

Obstacle Avoiding Robot using Ultrasonic Sensor and L298N H-Bridg.jpg

Circuit and code

wiring diagram of arduino ultrasonic sensor.webp

#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>

Adafruit_MPU6050 mpu;

void setup(void) {
				Serial.begin(115200);

				// Try to initialize!
				if (!mpu.begin()) {
								Serial.println("Failed to find MPU6050 chip");
								while (1) {
								  delay(10);
								}
}
				Serial.println("MPU6050 Found!");

				// set accelerometer range to +-8G
				mpu.setAccelerometerRange(MPU6050_RANGE_8_G);

				// set gyro range to +- 500 deg/s
				mpu.setGyroRange(MPU6050_RANGE_500_DEG);

				// set filter bandwidth to 21 Hz
				mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);

				delay(100);
}

void loop() {
				/* Get new sensor events with the readings */
				sensors_event_t a, g, temp;
				mpu.getEvent(&a, &g, &temp);

				/* Print out the values */
				Serial.print("Acceleration X: ");
				Serial.print(a.acceleration.x);
				Serial.print(", Y: ");
				Serial.print(a.acceleration.y);
				Serial.print(", Z: ");
				Serial.print(a.acceleration.z);
				Serial.println(" m/s^2");
				
				Serial.print("Rotation X: ");
				Serial.print(g.gyro.x);
				Serial.print(", Y: ");
				Serial.print(g.gyro.y);
				Serial.print(", Z: ");
				Serial.print(g.gyro.z);
				Serial.println(" rad/s");
				
				Serial.print("Temperature: ");
				Serial.print(temp.temperature);
				Serial.println(" degC");
				
				Serial.println("");
				delay(500);
				
}

Idea 2: A halloween wand