Compare commits
2 Commits
9d0545aa4f
...
3f759f5678
Author | SHA1 | Date |
---|---|---|
|
3f759f5678 | |
|
6582154ec6 |
|
@ -362,6 +362,16 @@ class Devices {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (type === 'capper') {
|
||||||
|
this.connected.capper = device;
|
||||||
|
try {
|
||||||
|
connectSuccess = await this.arduino.connect('capper', device, false);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
this.log.error('Error connecting capper', err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (type === 'camera,capper') {
|
else if (type === 'camera,capper') {
|
||||||
this.connected.camera = device;
|
this.connected.camera = device;
|
||||||
this.connected.capper = device;
|
this.connected.capper = device;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
#include <Servo.h>
|
#include <Servo.h>
|
||||||
|
|
||||||
boolean debug_state = true;
|
boolean debug_state = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
|
@ -21,7 +21,7 @@ as servos for development
|
||||||
* ------------------------------------------------*/
|
* ------------------------------------------------*/
|
||||||
//Arduino Duemilanove +
|
//Arduino Duemilanove +
|
||||||
//Arduino Uno
|
//Arduino Uno
|
||||||
const int PIN_SERVO = 9;
|
const int PIN_SERVO = 6;
|
||||||
|
|
||||||
volatile boolean running = false;
|
volatile boolean running = false;
|
||||||
volatile boolean cap_state = false;
|
volatile boolean cap_state = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Servo.h>
|
#include <Servo.h>
|
||||||
|
|
||||||
const int PIN_SERVO = 9;
|
const int PIN_SERVO = 6;
|
||||||
Servo servo;
|
Servo servo;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -25,7 +25,10 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
delay(1000);
|
||||||
|
servo.write(153);
|
||||||
|
delay(1000);
|
||||||
|
servo.write(93);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Servo_init () {
|
void Servo_init () {
|
||||||
|
|
|
@ -351,6 +351,14 @@ class Devices {
|
||||||
this.log.error('Error connecting to camera, camera_second, projector and projector_second', err)
|
this.log.error('Error connecting to camera, camera_second, projector and projector_second', err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
} else if (type === 'capper') {
|
||||||
|
this.connected.capper = device
|
||||||
|
try {
|
||||||
|
connectSuccess = await this.arduino.connect('capper', device, false)
|
||||||
|
} catch (err) {
|
||||||
|
this.log.error('Error connecting capper', err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
} else if (type === 'camera,capper') {
|
} else if (type === 'camera,capper') {
|
||||||
this.connected.camera = device
|
this.connected.camera = device
|
||||||
this.connected.capper = device
|
this.connected.capper = device
|
||||||
|
|
Loading…
Reference in New Issue