Naya Lee
Published

Smart Study Desk

Let's build a Smart Study Desk with a team of students from Hebei University of Technology!

IntermediateShowcase (no instructions)5 hours344
Smart Study Desk

Things used in this project

Hardware components

Grove - Light Sensor
Seeed Studio Grove - Light Sensor
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
SparkFun Thumb Joystick Breakout
SparkFun Thumb Joystick Breakout
×1
SERVO Module Board 12 Channels
M5Stack SERVO Module Board 12 Channels
×1
0.96" OLED 64x128 Display Module
ElectroPeak 0.96" OLED 64x128 Display Module
×1
NeoPixel Ring: WS2812 5050 RGB LED
Adafruit NeoPixel Ring: WS2812 5050 RGB LED
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Code

Code

C/C++
#include<Servo.h>
Servo myservo;
mord
void setup() {
  // put your setup code here, to run once:
  myservo.attach(9);
  Serial.begin(9600);
}
int pos=0;
void loop() {
  // put your main code here, to run repeatedly:
  int sv1=analogRead(A0);
  int sv2=analogRead(A1);

  myservo.write(map(sv2,220,780,80,104));
  Serial.print("x and y coordinate is:");
  Serial.print(sv1,DEC);
  Serial.println(",");
  Serial.print(sv2,DEC);
  Serial.println(" ");
  
  delay(10);
}

Credits

Cheng Huixian, Gu Yanchen, Bai Hanyang, Liu Jiayu, Kang Tianhao

Posted by Naya Lee

Comments