- A Laptop
- A Camera that is compatible with gphoto
- An Arduino
- A Force Resistant Sensor (FSR)
- Install gphoto2 on macOS (See here for instructions)
- Connect the camera to the laptop using an appropriate USB cable. Verify the connection with the command
gphoto2 --auto-detect
. Connect and unconnect the camera to see the port list changes. - Try to take photo through gphoto2 and command line with the
test_gphoto.sh
script. Change port parameters accordingly - Construct the Arduino / FSR unit according to a schema (To be updated)
- Flash Arduino with a Firmata firmware that is compatible with JonnyFive (See Johnny Five docs for detail). For Arduino UNO, it's the StandardFirmata Plus.
- Clone this repository
npm install
- Open two terminal sessions. One running
npm run arduino
- Another terminal runs
npm run dev
- Goto http://localhost:3000 and try to step on the FSR.
- Nikon D5300
- gphoto2 responded with PTPTimeout: The transfer of image to your computer might have taken too long. Try reduce the size of the image in the camera.
- gphoto2 cannot connect to the camera: Some machine will have a default PTP service running. Try disable that with the
kill_default_ptp.sh
script.
The force threshold for activation could be set in arduino.js