NPM Inputs & Outputs

In this assignment, I used two buttons as the inputs, and the pi camera attached to a servo and an led as the outputs. The two NPM that I used are Pi-blaster and Camerapi. When button 1 is pushed, the LED will be turned on and the camera will take a pictures that will be saved to Desktop, or whatever directory that’s indicated in the code. When button 2 is pushed, the servo will turn 180 degrees and the camera will also turn accordingly to take pictures from different angles. However, I think the for-loop in my code in order to turn the servo has problems, which I would like to solve after class tomorrow.

Here’s the github code: https://github.com/yumengwang03/Lab-Systems—Homework/blob/master/npmHW.js

IMG_4793This video shows how it works and the problems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *