Example #2: Moves a stereo slider when Dragonframe switches between left-eye and right-eye positions. This would work with the Mark Roberts S3 Stereoscopic Stepper, for example.
/*
* Dragonframe stereo slider example for Arduino.
*/
// output pin wired to stereo slider
#define STEREO_TRIGGER_PIN 7
// track the stereo position
char stereoPosition = 'L';
// Create global object to communicate with Dragonframe
DFRemote df_remote = DFRemote();
/*
* Arduino calls this function once, at the start of your program.
*/
void setup()
{
// set up serial port to 57600 kbps
Serial.begin(57600);
/*
* Configure output pin for triggering stereo slider.
*/
pinMode(STEREO_TRIGGER_PIN, OUTPUT);
digitalWrite(STEREO_TRIGGER_PIN, LOW);
}
/**
* Arduino calls this function repeatedly as the main program loop.
*/
void loop()
{
// tell df to check for inputs and send messages to Dragonframe if needed
df_remote.processPins();
// read serial messages from Dragonframe
int cmd = df_remote.processSerial();
/**
* Send pulse to stereo slider based on exposure name.
* This example sets a digital I/O pin high for 0.5 seconds.
*/
if (cmd == DF_POSITION_MSG)
{
if (df_remote.commandExposureName[0] != stereoPosition)
{
digitalWrite(STEREO_TRIGGER_PIN, HIGH);
delay(500);
digitalWrite(STEREO_TRIGGER_PIN, LOW);
stereoPosition = df_remote.commandExposureName[0];
}
}
}
Our Products |
our company |
help and support |
social Networking |
|||
| Dragonframe Software Dragonframe Keypad Controller ddmx-s2 light automation iota 3d stereoscopic slider |
about us contact information who uses our products what they do with it |
Support Center Find your license video tutorials supported cameras discussion forum |
![]() ![]() |
|||