Among the other parts needed:
Both a db15 male joystick and a db25 male connector. You could use the one from the original project as I tried to use different pins to avoid conflict.
Note: As always do this at you own risk, I will not be responsible for any issues. All circuits and code are untested, contract a professional if you are unsure. Note each sensor should be on a separate pin. I just used the same pin for testing purposes.
Update: I am not an electronics specialist. If you have any concern with what is done here, ask a professional. I am testing the circuits and if there are any changes needed should be done soon so this instructable will tend to get updated once in a while.
----------------------------------------------------------------
pin purpose 1 potentiometer common (Joy A) 2 button 1 (Joy A) 3 X coordinate potentiometer (Joy A) 4 button common (Joy A) 5 button common (Joy B) 6 Y coordinate potentiometer (Joy A) 7 button 2 (Joy A) 8 unused 9 potentiometer common (Joy B) 10 button 1 (Joy B) 11 X coordinate potentiometer (Joy B) 12 MIDI TXD (transmit) (computer -> midi) 13 Y coordinate potentiometer (Joy B) 14 button 2 (Joy B) 15 MIDI RXD (midi -> computer)
Also check out: http://www.instructables.com/id/Computerized-video-security-setup/
lizzysaf.bas4 KB
Remove these ads by
Signing UpStep 1How to connect a pir sensor.
Needed:
5v pir sensor Be sure and check the pin outs as not all are the same. (Ours was a R/S 276-0033 aka Parallax 555-28027)
Use http://www.ladyada.net/learn/sensors/pir.html as a guide to test your sensor.
npn transistor 2n2222 or 2n3904.
5 volt relay.
10k ohm resistor.
1n4002 diode.
Wire.
Note the forth picture is for those who like a little more safety in the circuit.
--------------------------------------------------------------------------------------
Example code:
getpirdata:
r = STRIG(2)
SELECT CASE r
CASE -1
flag = 1
CASE 0
flag = 2
CASE ELSE
GOSUB errornotice
END SELECT
RETURN
--------------------------------------------------------------------------------------
Joystick B ____ Joystick A
/ |
/ |
/ |
/ 1 |
| O------- 5 Volt
5 Volt -------O |
| 9 2 |
| O------- Button 1
Button 3 -------O |
| 10 3 |
| O------- Resistor X-axis (joystick(1))
Resistor X-axis -------O |
(joystick(2)) | 11 4 |
| O------- Ground
MIDI TXD -------O |
| 12 5 |
| O------- Ground
Resistor Y-axis -------O |
(joystick(2)) | 13 6 |
| O------- Resistor Y-axis (joystick(1))
Button 4 -------O |
| 14 7 |
| O------- Button 2
MIDI RXD -------O |
| 15 8 |
| O------- 5 Volt
\ |
\ |
\ |
\ |
\__|
Digital
pin 2 = Button 1 = Strig(0)
pin 7 = Button 2 = Strig(1)
pin 10 = Button 3 = Strig(2)
pin 14 = Button 4 = Strig(3)
Analogpin 3 = Resistor = Stick(0)
pin 6 = Resistor = Stick(1)
pin 11 = Resistor = Stick(2)
pin 13 = Resistor = Stick(3)
| « Previous Step | Download PDFView All Steps | Next Step » |
2
comments
|
Add Comment
|
Computothought (author)
says:
![]() |
Add Comment
|


















![Screenshot-Untitled [modified] ııı KolourPaint.png](http://img.instructables.com/files/deriv/FDT/JNGX/GJHVL9N5/FDTJNGXGJHVL9N5.SQUARE.jpg)
![Screenshot-Untitled [modified] ııı KolourPaint.png](http://img.instructables.com/files/deriv/FH3/BMMX/GKS0SY8G/FH3BMMXGKS0SY8G.SQUARE.jpg)



























