Fix ino.sh script. Add pin declarations to EndstopCameraShield

This commit is contained in:
Matt McWilliams 2024-06-30 11:50:02 -04:00
parent b858c9fba0
commit 966f67882a
9 changed files with 89 additions and 3 deletions

View File

@ -0,0 +1,15 @@
#include "EndstopCameraShield.h"
EndstopCameraShield::EndstopCameraShield () : motor(motorEnablePin, motorDirectionPin, motorPulsePin, motorUsPulse, motorMicrosteps) {
}
void EndstopCameraShield::loop () {
}
void EndstopCameraShield::setup () {
motor.setup();
pinMode(emitterOpenPin, OUTPUT);
pinMode(emitterClosePin, OUTPUT);
}

View File

@ -2,6 +2,7 @@
#define EndstopCameraShield_h
#include <Arduino.h>
#include "TB6600MotorDriver.h"
/**
* Default pins
@ -18,6 +19,15 @@ class EndstopCameraShield {
const uint8_t emitterOpenPin = 4;
const uint8_t emitterClosePin = 5;
const uint8_t motorEnablePin = 6;
const uint8_t motorDirectionPin = 7;
const uint8_t motorPulsePin = 8;
const uint32_t motorUsPulse = 300;
const uint8_t motorMicrosteps = 2; //half stepping
TB6600MotorDriver motor;
public:
EndstopCameraShield();

View File

@ -0,0 +1,15 @@
#include "EndstopCameraShield.h"
EndstopCameraShield::EndstopCameraShield () : motor(motorEnablePin, motorDirectionPin, motorPulsePin, motorUsPulse, motorMicrosteps) {
}
void EndstopCameraShield::loop () {
}
void EndstopCameraShield::setup () {
motor.setup();
pinMode(emitterOpenPin, OUTPUT);
pinMode(emitterClosePin, OUTPUT);
}

View File

@ -2,6 +2,7 @@
#define EndstopCameraShield_h
#include <Arduino.h>
#include "TB6600MotorDriver.h"
/**
* Default pins
@ -18,6 +19,15 @@ class EndstopCameraShield {
const uint8_t emitterOpenPin = 4;
const uint8_t emitterClosePin = 5;
const uint8_t motorEnablePin = 6;
const uint8_t motorDirectionPin = 7;
const uint8_t motorPulsePin = 8;
const uint32_t motorUsPulse = 300;
const uint8_t motorMicrosteps = 2; //half stepping
TB6600MotorDriver motor;
public:
EndstopCameraShield();

View File

@ -0,0 +1,15 @@
#include "EndstopCameraShield.h"
EndstopCameraShield::EndstopCameraShield () : motor(motorEnablePin, motorDirectionPin, motorPulsePin, motorUsPulse, motorMicrosteps) {
}
void EndstopCameraShield::loop () {
}
void EndstopCameraShield::setup () {
motor.setup();
pinMode(emitterOpenPin, OUTPUT);
pinMode(emitterClosePin, OUTPUT);
}

View File

@ -2,6 +2,7 @@
#define EndstopCameraShield_h
#include <Arduino.h>
#include "TB6600MotorDriver.h"
/**
* Default pins
@ -18,6 +19,15 @@ class EndstopCameraShield {
const uint8_t emitterOpenPin = 4;
const uint8_t emitterClosePin = 5;
const uint8_t motorEnablePin = 6;
const uint8_t motorDirectionPin = 7;
const uint8_t motorPulsePin = 8;
const uint32_t motorUsPulse = 300;
const uint8_t motorMicrosteps = 2; //half stepping
TB6600MotorDriver motor;
public:
EndstopCameraShield();

View File

@ -1,10 +1,12 @@
#include "EndstopCameraShield.h"
#include "McopySerial.h"
EndstopCameraShield cam();
void setup () {
cam.setup();
}
void loop () {
cam.loop();
}

9
notes/LED_brightness.txt Normal file
View File

@ -0,0 +1,9 @@
15,000 mcd minimum brightness
Pack of 25 clear white LEDs
5mm diameter
Cool White color
3.0V Typical Forward Voltage, at 20mA current
15,000 mcd minimum brightness
Viewing Angle : ±12 degrees
Maximum continuous current: 20 mA

View File

@ -30,7 +30,7 @@ MCOPYSERIAL=(
mcopy_mitchell_camera
)
ENSTOPCAMERASHIELD=(
ENDSTOPCAMERASHIELD=(
mcopy_oxberry_camera
mcopy_mitchell_camera
)