simple metro

For students in the 11217 introduction to construction class;Here is an example of a simple metronome counter which moves a line up and down a sketch window over a period of time.  You should be able to follow the comments included to see how you might plug your sensors and motors into this sketch to easily arrange for your motors to move a) automatically left/right over a period of time and b) increasing in intensity based on a reading from your slider/light/proximity sensors.For the purposes of instruction and demonstration, i’ve connected the line movement to simple mouse input – move the mouse left/right to influence up/down motion – so you can see how your sensors might influence pre-programmed movement.Give this sketch a try…Give it a try, it should help in automating your systems, note also that this will mainly work with the simple motors we’ve given you (that cannot move through more than 360 degrees), not continuous movement motors.[UPDATE] this is the same sketch, embedded using the superb combination of hascanvas + processingjs using processingjs. Move your mouse left and right over the sketch window to modify the metronome speed of the line.

Related Posts:

Comments are closed.