[{"data":1,"prerenderedAt":443},["ShallowReactive",2],{"\u002Fprojects\u002Fwireless-motion-controlled-slide-show-clicker":3,"$Xgs0RoTCP8":441},{"id":4,"title":5,"body":6,"date":426,"description":427,"extension":428,"image":429,"meta":430,"navigation":186,"path":431,"repository":432,"seo":435,"stem":436,"tags":437,"__hash__":440},"projects\u002Fprojects\u002Fwireless-motion-controlled-slide-show-clicker.md","Wireless Motion Controlled Side Show Clicker",{"type":7,"value":8,"toc":418},"minimark",[9,14,21,29,35,55,61,65,88,91,102,105,108,114,118,144,148,155,158,380,384,395,398,402,405,411,414],[10,11,13],"h2",{"id":12},"vibrating-structure-gyroscopes","💞 Vibrating Structure Gyroscopes",[15,16,17],"blockquote",{},[18,19,20],"p",{},"We spun heart-to-heart, dancing to the tunes of our forever-long story. ",[18,22,23,24,28],{},"Fundamentally, vibrating structure gyroscopes are a type of ",[25,26,27],"strong",{},"Micro-Electrical-Mechanical-Systems (MEMS)",". MEMS serve an especially unique role in that at their small size, surface area becomes much more dominant than volume. Hence, electrostatic forces, surface tension, Van der Waals forces, viscous drag, and elastic forces become much stronger than gravity. ",[18,30,31,34],{},[25,32,33],{},"Accelerometers"," function by detecting changes in capacitance. They are generally composed of fixed plates of capacitance, alongside a moving mass held in place my springs. As the object moves, the moving mass changes position, altering the electric field. This could then be used to determine the direction and magnitude of the movement. ",[18,36,37,40,41,48,49,54],{},[25,38,39],{},"Gyroscopes",", function similarly, but instead utilizes ",[42,43,47],"a",{"href":44,"rel":45},"https:\u002F\u002Fwww.vectornav.com\u002Fresources\u002Finertial-navigation-primer\u002Ftheory-of-operation\u002Ftheory-mems#:~:text=Typically%2C%20MEMS%20gyroscopes%20use%20a,proportional%20to%20the%20angular%20velocity.",[46],"nofollow","Coriolis force",". More information about gyroscopes can be found ",[42,50,53],{"href":51,"rel":52},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FVibrating_structure_gyroscope",[46],"here",". ",[56,57,58],"warning",{},[18,59,60],{},"Note that the above sections gives simplified explanations that aim to provide the bigger picture necessary to understanding the Arduino device. It is by no means \"perfectly-accurate\".",[10,62,64],{"id":63},"hardware-components","Hardware Components",[66,67,68,81],"card",{},[69,70,71,75,78],"ol",{},[72,73,74],"li",{},"MPU-9250 9-axes Gyroscope",[72,76,77],{},"ESP32 Microchip",[72,79,80],{},"9V Battery",[82,83,85],"template",{"v-slot:title":84},"",[18,86,87],{},"An Overview of the Components",[18,89,90],{},"The MPU-9250 9-axes gyroscope is capable of detecting: ",[69,92,93,96,99],{},[72,94,95],{},"acceleration in three directions - x, y, and z",[72,97,98],{},"angular Acceleration in three directions: raw, pitch, and yaw​",[72,100,101],{},"magnetic field via its magnetometer",[18,103,104],{},"The ESP32 microchip was chosen for its bluetooth functions, which is essential for remote control. ",[18,106,107],{},"The 9V battery was used to power this system. ",[109,110,111],"note",{},[18,112,113],{},"In the actual process, we found out that 9V might be a bit too much because the entire system began overheating and some components were burned. Be careful!",[10,115,117],{"id":116},"circuit-design-routing","Circuit Design & Routing",[18,119,120,121,125,126,129,130,133,134,137,138,140,141,143],{},"Since the entire system is essentially a Inte-Integrated Circuit (I2C), we connected the input of the gyroscope to ",[122,123,124],"code",{},"PIN 21"," as ",[122,127,128],{},"SDA"," (Serial Data) and ",[122,131,132],{},"PIN 22","  as ",[122,135,136],{},"SCL"," (Serial Clock). ",[122,139,128],{}," and ",[122,142,136],{}," provide all the necessary information to know the directional data provided by the gyroscope that is accompanied by a time stamp. ",[10,145,147],{"id":146},"overview-of-code","Overview of Code",[18,149,150,151,154],{},"The ",[122,152,153],{},"bleMouse"," package was used to control the mouse on the connected laptop. ",[18,156,157],{},"The main logic of the motion detection is quite self-explanatory. ",[159,160,165],"pre",{"className":161,"code":162,"filename":163,"language":164,"meta":84,"style":84},"language-C++ shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","void loop() {\n  if (!bleMouse.isConnected()) return;\n\n  mySensor.accelUpdate();\n  mySensor.gyroUpdate();\n  Serial.print(String(millis()) + \" \"+ \"-->\"+\" \");\n\n  float aX = mySensor.accelX();\n  float aY = mySensor.accelY();\n  float aZ = mySensor.accelZ();\n  float gZ = mySensor.gyroZ();\n  Serial.print(String(aX)+\" \");\n  Serial.print(String(aY)+\" \");\n  Serial.print(String(aZ)+\" \");\n  Serial.print(String(gZ) + \"\");\n  \u002F\u002FSerial.print(String(gZ)+\" \");\n  if (abs(aX) > 0.4 || abs(aY) > 0.4) {\n    int Cx = constrain(aX * 15, -10, 10);\n    int Cy = constrain(-aY * 15, -10, 10);\n    bleMouse.move(Cx, Cy);\n    delay(20);\n  }\n\n  if (aZ \u003C -1.5) {\n    bleMouse.press(MOUSE_LEFT);\n    delay(100);\n    bleMouse.release(MOUSE_LEFT);\n  }\n  if (gZ > 100) {\n    bleMouse.press(MOUSE_RIGHT);\n    delay(100);\n    bleMouse.release(MOUSE_RIGHT);\n  }\n\n Serial.println(\"\\n\");\n}\n","wireless_mouse_clicker.ino","C++",[122,166,167,175,181,188,194,200,206,211,217,223,229,235,241,247,253,259,265,271,277,283,289,295,301,306,312,318,324,330,335,341,347,352,358,363,368,374],{"__ignoreMap":84},[168,169,172],"span",{"class":170,"line":171},"line",1,[168,173,174],{},"void loop() {\n",[168,176,178],{"class":170,"line":177},2,[168,179,180],{},"  if (!bleMouse.isConnected()) return;\n",[168,182,184],{"class":170,"line":183},3,[168,185,187],{"emptyLinePlaceholder":186},true,"\n",[168,189,191],{"class":170,"line":190},4,[168,192,193],{},"  mySensor.accelUpdate();\n",[168,195,197],{"class":170,"line":196},5,[168,198,199],{},"  mySensor.gyroUpdate();\n",[168,201,203],{"class":170,"line":202},6,[168,204,205],{},"  Serial.print(String(millis()) + \" \"+ \"-->\"+\" \");\n",[168,207,209],{"class":170,"line":208},7,[168,210,187],{"emptyLinePlaceholder":186},[168,212,214],{"class":170,"line":213},8,[168,215,216],{},"  float aX = mySensor.accelX();\n",[168,218,220],{"class":170,"line":219},9,[168,221,222],{},"  float aY = mySensor.accelY();\n",[168,224,226],{"class":170,"line":225},10,[168,227,228],{},"  float aZ = mySensor.accelZ();\n",[168,230,232],{"class":170,"line":231},11,[168,233,234],{},"  float gZ = mySensor.gyroZ();\n",[168,236,238],{"class":170,"line":237},12,[168,239,240],{},"  Serial.print(String(aX)+\" \");\n",[168,242,244],{"class":170,"line":243},13,[168,245,246],{},"  Serial.print(String(aY)+\" \");\n",[168,248,250],{"class":170,"line":249},14,[168,251,252],{},"  Serial.print(String(aZ)+\" \");\n",[168,254,256],{"class":170,"line":255},15,[168,257,258],{},"  Serial.print(String(gZ) + \"\");\n",[168,260,262],{"class":170,"line":261},16,[168,263,264],{},"  \u002F\u002FSerial.print(String(gZ)+\" \");\n",[168,266,268],{"class":170,"line":267},17,[168,269,270],{},"  if (abs(aX) > 0.4 || abs(aY) > 0.4) {\n",[168,272,274],{"class":170,"line":273},18,[168,275,276],{},"    int Cx = constrain(aX * 15, -10, 10);\n",[168,278,280],{"class":170,"line":279},19,[168,281,282],{},"    int Cy = constrain(-aY * 15, -10, 10);\n",[168,284,286],{"class":170,"line":285},20,[168,287,288],{},"    bleMouse.move(Cx, Cy);\n",[168,290,292],{"class":170,"line":291},21,[168,293,294],{},"    delay(20);\n",[168,296,298],{"class":170,"line":297},22,[168,299,300],{},"  }\n",[168,302,304],{"class":170,"line":303},23,[168,305,187],{"emptyLinePlaceholder":186},[168,307,309],{"class":170,"line":308},24,[168,310,311],{},"  if (aZ \u003C -1.5) {\n",[168,313,315],{"class":170,"line":314},25,[168,316,317],{},"    bleMouse.press(MOUSE_LEFT);\n",[168,319,321],{"class":170,"line":320},26,[168,322,323],{},"    delay(100);\n",[168,325,327],{"class":170,"line":326},27,[168,328,329],{},"    bleMouse.release(MOUSE_LEFT);\n",[168,331,333],{"class":170,"line":332},28,[168,334,300],{},[168,336,338],{"class":170,"line":337},29,[168,339,340],{},"  if (gZ > 100) {\n",[168,342,344],{"class":170,"line":343},30,[168,345,346],{},"    bleMouse.press(MOUSE_RIGHT);\n",[168,348,350],{"class":170,"line":349},31,[168,351,323],{},[168,353,355],{"class":170,"line":354},32,[168,356,357],{},"    bleMouse.release(MOUSE_RIGHT);\n",[168,359,361],{"class":170,"line":360},33,[168,362,300],{},[168,364,366],{"class":170,"line":365},34,[168,367,187],{"emptyLinePlaceholder":186},[168,369,371],{"class":170,"line":370},35,[168,372,373],{}," Serial.println(\"\\n\");\n",[168,375,377],{"class":170,"line":376},36,[168,378,379],{},"}\n",[10,381,383],{"id":382},"additional-information","Additional Information",[18,385,386,387,390,391,394],{},"This project was developed for the ",[25,388,389],{},"Nanotechnology"," course at the ",[25,392,393],{},"Engineering Summer Academy at Penn"," summer program that I took during the summer of 2025.",[18,396,397],{},"More pictures and information will be added to this page as I slowly organize them. ",[10,399,401],{"id":400},"disclaimer","Disclaimer",[18,403,404],{},"This device was developed for educational purposes as part of the Engineering Summer Academy at Penn (summer 2025). Both methods are experimental and have known limitations.",[18,406,407,410],{},[25,408,409],{},"The code and explanations are provided \"as-is\" without any warranty."," Users are solely responsible for validating results for their specific applications. The author(s) are not liable for any errors, inaccuracies, or damages arising from the use of this software.",[18,412,413],{},"For critical research applications, please independently verify all measurements and consult established methodologies in the field.",[415,416,417],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":84,"searchDepth":177,"depth":177,"links":419},[420,421,422,423,424,425],{"id":12,"depth":177,"text":13},{"id":63,"depth":177,"text":64},{"id":116,"depth":177,"text":117},{"id":146,"depth":177,"text":147},{"id":382,"depth":177,"text":383},{"id":400,"depth":177,"text":401},"2025-10-31","An Arduino-based device built on the ESP32 microchip that  remotely controls any Slide Show via hand gesture detection. ","md",null,{},"\u002Fprojects\u002Fwireless-motion-controlled-slide-show-clicker",{"repoUsername":433,"repoName":434},"AnsonZhang2009","wireless-motion-controlled-slide-show-clicker",{"title":5,"description":427},"projects\u002Fwireless-motion-controlled-slide-show-clicker",[438,439],"ESAP","Engineering","GGZ7VXcqrSyoCI1nKlNx_PBebW4Hl9Am1l5HisuhRkY",[429,442],{"title":5,"path":431,"stem":436,"children":-1},1777421406152]