Here's a quick demo of running a hexagonal mirror scavenged from a laser printer. The chip that does the actual motor control is an LB11872.
The interface requires just one signal, the clock input. Varying the clock frequency controls the mirror rotation speed. There is also a start/stop signal that can be used (or you can ground that pin) and the controller provides a lock output to indicate when the mirror is spinning at the requested speed.
Here's some sample code. If you remove the delays, the motor spins at a frightening speed.
int ssPin = 2; // Start/Stop output at dgital pin 2
int lockPin = 3; // PLL locked input at digital pin 3
int clockPin = 4; // Rotation speed clock output at digital pin 4
int ledPin = 13; // Show "lock" on LED output
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(ssPin, OUTPUT);
digitalWrite(ssPin, LOW);
pinMode(lockPin, INPUT);
pinMode(clockPin, OUTPUT);
digitalWrite(clockPin, LOW);
pinMode(ledPin , OUTPUT);
digitalWrite(ledPin, LOW);
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()
{
digitalWrite(clockPin, HIGH); // set the LED on
delay(1); // wait for a second
digitalWrite(clockPin, LOW); // set the LED off
delay(1); // wait for a second
}
> --
> To post to this group, send email to hive76-d...@googlegroups.com
> To unsubscribe send email to hive76-discuss...@googlegroups.com
> For more awesome goto http://groups.google.com/group/hive76-discussion?hl=en
--
Sent from my mobile device
-Chris
visit me at http://eagleapex.com
Sent via iPhone
--
To post to this group, send email to hive76-d...@googlegroups.com
To unsubscribe send email to hive76-discuss...@googlegroups.com
For more awesome goto http://groups.google.com/group/hive76-discussion?hl=en