mirror of
https://github.com/isaac879/Pan-Tilt-Mount.git
synced 2026-08-16 13:03:15 +02:00
Add files via upload
This commit is contained in:
@@ -886,6 +886,21 @@ void timelapse(unsigned int numberOfPictures, unsigned long msDelay){
|
|||||||
|
|
||||||
void serialData(void){
|
void serialData(void){
|
||||||
char instruction = Serial.read();
|
char instruction = Serial.read();
|
||||||
|
if(instruction == INSTRUCTION_BYTES_PAN_SPEED){
|
||||||
|
int count = 0;
|
||||||
|
while(Serial.available() < 2){//Wait for six bytes to be available. Breaks after ~200ms if bytes are not received.
|
||||||
|
delayMicroseconds(200);
|
||||||
|
count++;
|
||||||
|
if(count > 1000){
|
||||||
|
serialFlush();//Clear the serial buffer
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int panStepSpeed = (Serial.read() << 8) + Serial.read();
|
||||||
|
stepper_pan.setSpeed(panStepSpeed);
|
||||||
|
stepper_pan.runSpeed();
|
||||||
|
}
|
||||||
|
|
||||||
delay(2); //wait to make sure all data in the serial message has arived
|
delay(2); //wait to make sure all data in the serial message has arived
|
||||||
ledBatteryLevel(getBatteryPercentage());
|
ledBatteryLevel(getBatteryPercentage());
|
||||||
memset(&stringText[0], 0, sizeof(stringText)); //clear the array
|
memset(&stringText[0], 0, sizeof(stringText)); //clear the array
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
#define SHUTTER_DELAY 200
|
#define SHUTTER_DELAY 200
|
||||||
|
|
||||||
|
#define INSTRUCTION_BYTES_PAN_SPEED 1
|
||||||
#define INSTRUCTION_STEP_MODE 'm'
|
#define INSTRUCTION_STEP_MODE 'm'
|
||||||
#define INSTRUCTION_PAN_STEPS 'P'
|
#define INSTRUCTION_PAN_STEPS 'P'
|
||||||
#define INSTRUCTION_TILT_STEPS 'T'
|
#define INSTRUCTION_TILT_STEPS 'T'
|
||||||
@@ -132,7 +133,7 @@
|
|||||||
#define NUM_LEDS 1
|
#define NUM_LEDS 1
|
||||||
#define BRIGHTNESS 255
|
#define BRIGHTNESS 255
|
||||||
|
|
||||||
#define VERSION_NUMBER "2.1.1"
|
#define VERSION_NUMBER "2.2.1"
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user