Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example which creates gif from spin.media.mit.edu hardware #21

Open
jywarren opened this issue Nov 28, 2016 · 1 comment
Open

add example which creates gif from spin.media.mit.edu hardware #21

jywarren opened this issue Nov 28, 2016 · 1 comment

Comments

@jywarren
Copy link
Member

https://www.webrtc-experiment.com/msr/gif-recorder.html

Spin is a SoftModem-based 360 degree spinning photo table for making gifs: http://spin.media.mit.edu

To make a purely web based version, we could use the above code interspersed with webjack-firmata commands to move the platform. We'd have to add some more timing code though.

Spin easyDriver motor pins are 9 and... 13? Gotta look that up but shouldn't be hard.

@jywarren
Copy link
Member Author

Notes from last night's tests: stepping the stepper is done manually in the Spin Arduino sketch by flipping pin 9 on and off. In JS, we should be able to:

var dir = 1, 
interval = setInterval(function () { 
  Demo.board.digitalWrite(9, dir);
  dir = dir === 0 ? 1 : 0;
}, 300);

But this doesn't seem to be working; perhaps USB power isn't enough for the stepper EasyDriver?

Also -- I found that firmata.js has a stepperStep function:

// Board.prototype.stepperStep = function(deviceNum, direction, steps, speed, accel, decel, callback)

// example use:
Demo.board.stepperStep(2, Demo.board.STEPPER.DIRECTION.CCW, 10000, 2000, function(complete) { console.log('complete'); })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant