Alex Glow
Published

DreamGlass (WIP)

A pair of glasses that guide you to lucid dreaming, day and night.

Work in progress3,644
DreamGlass (WIP)

Things used in this project

Hardware components

TinyLily
×1
LiPo battery
3.7V works (the Lily takes 2.7V – 5.5V in Arduino mode)
×1
Pair of glasses
×1
Enclosure materials
3D printer, chain-making tools, amber, etc.
×1

Software apps and online services

Fusion 360
Autodesk Fusion 360

Story

Read more

Code

bare-led.JPG

C/C++
DreamGlass test code
/*
  DreamGlass code to test haptic motor with random timing.
  Modified from Arduino "Blink" example function.
  Turns on an LED on for one second, then off for one second, repeatedly.

  This code is in the public domain.
 */

  // Pin 13 has a haptic motor connected.
int haptic = 13;
long randel;                    // random delay interval

void setup() {
  pinMode(haptic, OUTPUT);      // initialize the digital pin as an output
}

void loop() {
  randel = random(500, 3000);   // generate random delay, 500-3000ms
  digitalWrite(haptic, HIGH);   // turn the motor on
  delay(500);                   // wait half a second
  digitalWrite(haptic, LOW);    // turn the motor off
  delay(randel);                // wait for a second
}

Credits

Alex Glow

Alex Glow

145 projects • 1571 followers
The Hackster team's resident Hardware Nerd. I love robots, music, EEG, wearables, and languages. FIRST Robotics kid.

Comments