mcopy/ino/mcopy_JKMM99_intval/mcopy_JKMM99_intval.ino

340 lines
7.8 KiB
C++

/*
* Sketch containing firmware for the JKMM99
* A collaboration between MONO NO AWARE and mcopy.
* Compatible with JK106 hardware.
*
* Uses an Arduino Uno compatible board and a
* protoshield.
* Relay module for the cam :
* Solid state relay module for proj :
Wiring
CAMERA + CAMERA_DIR
Camera controller is a modified intval2
model with a 60RPM motor.
PINS FOR CAM WIRE
(# = Connector #)
Arduino # Wire In case Device
=========================================
PIN2 3 - Green = White = L298N 1
PIN3 1 - Yellow = Grey = L298N 2
PIN4 2 - Red = Purple = MICRO
GND 4 - Black = Black = GND
PROJECTOR + PROJECTOR_DIR
Wire to corresponding pins
Arduino 9 10 5V GND
Relay 1 2 VCC GND
For controling JK Projectors 106 models
Solid state relays connect to:
2uf run capacitory
400 Ohm Resistor (50W)
PINS FOR PROJ WIRE
#
1 -
2 -
3 -
4 -
Relay 1 corresponds to FWD
Relay 2 corresponse to BWD
*/
boolean debug_state = false;
//unsigned long now; //to be compared to stored values every loop
//CAMERA CONSTANTS
const int CAMERA_FORWARD = 2;
const int CAMERA_BACKWARD = 3;
const int CAMERA_MICROSWITCH = 4;
const int CAMERA_MOMENT = 240;
const int CAMERA_FRAME = 600;
//PROJECTOR CONSTANTS