Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Rishabh Singh N
Created September 2, 2024

Empowering Independence for Individuals with Impairments

Design kitchen appliances with accessible controls. Incorporate tactile buttons and smartphone connectivity for easier operation.

30
Empowering Independence for Individuals with Impairments

Things used in this project

Hardware components

AC/DC Power Supply, 12 V
AC/DC Power Supply, 12 V
×1
thingSoC ESP8266 Wi-Fi Module
thingSoC ESP8266 Wi-Fi Module
×1
FireBeetle ESP32 IOT Microcontroller (Supports Wi-Fi & Bluetooth)
DFRobot FireBeetle ESP32 IOT Microcontroller (Supports Wi-Fi & Bluetooth)
×1

Software apps and online services

Android Studio
Android Studio

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Code

Empowering Independence for Individuals with Mobility Impairments

C/C++
this is a C++ sketch designed to run on an Arduino board, leveraging its hardware and libraries to create an interactive project involving a servo motor, button, speaker, and OLED display.
#include <Servo.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>

// Initialize components
Servo heightMotor; 
int buttonPin = 2;
int speakerPin = 8;
int heightPosition = 0;

// Initialize OLED display
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
  // Setup for motor and button
  heightMotor.attach(9);
  pinMode(buttonPin, INPUT);
  pinMode(speakerPin, OUTPUT);
  
  // Setup display
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.display();
  delay(2000);

  // Start at default height
  heightMotor.write(heightPosition);
}

void loop() {
  // Check if button is pressed
  if (digitalRead(buttonPin) == HIGH) {
    // Adjust height
    heightPosition += 10;
    heightMotor.write(heightPosition);

    // Provide audible feedback
    tone(speakerPin, 1000, 200); // 1kHz tone for 200ms

    // Update display
    display.clearDisplay();
    display.setTextSize(2);
    display.setTextColor(SSD1306_WHITE);
    display.setCursor(0, 10);
    display.print("Height: ");
    display.print(heightPosition);
    display.display();

    delay(500); // Debounce delay
  }
}

Credits

Rishabh Singh N

Rishabh Singh N

1 project • 1 follower

Comments