POGO SIMON

Here is a video clip of one of our user tests.

here are more pix of our progress towards giving our first user test

:

and here are our users trying to pogo.

helmets are a good idea...

crash and burn:

below is the Pic code that takes 8 analog inputs and sends 
there values out via midi as velocities for 8 predetermined notes


'****************************************************************
'* Name : PogoSimon *
'* Author : [LCC284] *
'* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 9/20/2005 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
DEFINE OSC 20
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS
DEFINE HSER_BAUD 31250 ' set the baud rate


Potvar VAR WORD ' Create variable to store result
incVar var byte
pitchVar var word
freqVar var word
avar1 var word
avar2 var word
avar3 var word
avar4 var word
avar5 var word
avar6 var word
avar7 var word
avar8 var word

Savar1 var byte
Savar2 var byte
Savar3 var byte
Savar4 var byte
Savar5 var byte
Savar6 var byte
Savar7 var byte
Savar8 var byte




TRISA = %11111111 ' Set PORTA to all input
TRISB = %11111111 ' set portB to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify result
Pause 500 ' Wait .5 second

Start:

OUTPUT PORTD.2
output portd.1
HIGH PORTD.2
PAUSE 150
LOW PORTD.2
PAUSE 110
HIGH PORTD.2
PAUSE 150
LOW PORTD.2
PAUSE 110
HIGH PORTD.2
PAUSE 150
'flash the lights to let me know the chip is working


MAIN:
ADCIN 0, avar1 ' Read channel 0 to avar1
ADCIN 1, avar2 ' Read channel 1 to avar2
ADCIN 2, avar3 ' Read channel 2 to avar3
ADCIN 3, avar4 ' Read channel 3 to avar4
ADCIN 4, avar5 ' Read channel 4 to avar5
ADCIN 5, avar6 ' Read channel 5 to avar6
ADCIN 6, avar7 ' Read channel 6 to avar7

Savar1 = avar1 / 8
Savar2 = avar2 / 8
Savar3 = avar3 / 8
Savar4 = avar4 / 8
Savar5 = avar5 / 8
Savar6 = avar6 / 8
Savar7 = avar7 / 8
Savar8 = avar8 / 8
' change them words to bytes and scale them down to a range of 0-127


'serout2 PORTC.6, 16468, [ 144, savar1, savar2,
Savar3,Savar4,Savar5,Savar6,Savar7, 13, 10]
'debugging code...

hserout [$90, 60, Savar1]
hserout [$90, 65, Savar2]
hserout [$90, 70, Savar3]
hserout [$90, 75, Savar4]
hserout [$90, 80, Savar5]
hserout [$90, 85, Savar6]
hserout [$90, 90, Savar7]
hserout [$90, 95, Savar8]

pause 10
'don¹t cook the midi buffer...

GOTO MAIN

 

here is the pic code that listens to serial and lights the lights:

'****************************************************************
'* Name : POGOLIGHTS THE LIGHTS.BAS *
'* Author : [LCC284 & CCH258] *
'* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 10/18/2005 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
DEFINE OSC 4

inVar var byte

 Start:

OUTPUT PORTB.7
output portB.4
OUTPUT PORTB.1
output portd.7
OUTPUT PORTD.4
output portd.2


HIGH PORTB.7
PAUSE 150
LOW PORTB.7
PAUSE 110
HIGH PORTB.4
PAUSE 150
LOW PORTB.4
PAUSE 110
HIGH PORTB.1
PAUSE 150
LOW PORTB.1
PAUSE 110
HIGH PORTD.7
PAUSE 150
LOW PORTD.7
PAUSE 110
HIGH PORTD.4
PAUSE 150
LOW PORTD.4
PAUSE 110
HIGH PORTD.2
PAUSE 150
LOW PORTD.2
PAUSE 110



main:

serin2 portc.7, 16468, [inVar]

'please some one remind me how to do this better....
'....

if inVar == 66 then
High portB.7
endif

if inVar == 65 then
Low portB.7
endif

if inVar == 71 then
High portB.4
endif

if inVar == 70 then
Low portB.4
endif

if inVar == 76 then
High portB.1
endif

if inVar == 75 then
Low portB.1
endif

if inVar == 81 then
High portD.7
endif

if inVar == 80 then
Low portD.7
endif

if inVar == 86 then
High portD.4
endif

if inVar == 85 then
Low portD.4
endif

if inVar == 91 then
High portD.2
endif

if inVar == 90 then
Low portD.2
endif

if inVar == 96 then
High portC.2
endif

if inVar == 95 then
Low portC.2
endif



GOTO main

the below max code controls the lights via serial

 

max v2;
#N vpatcher 15 55 733 582;
#P window setfont "Sans Serif" 9.;
#P number 106 43 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 18.;
#P comment 486 57 131 9109522 POGO LIGHTS;
#P window setfont "Sans Serif" 9.;
#P comment 173 80 100 9109513 Pitches from Adams sequencer and/or note generator;
#N comlet pitches control lights...;
#P inlet 158 79 15 0;
#P toggle 35 46 15 0;
#P window setfont "Sans Serif" 18.;
#N coll notes_in_scale_to1-7;
#T flags 1 0;
#P newobj 158 131 210 9109522 coll notes_in_scale_to1-7;
#P newex 35 204 36 9109522 t i b;
#P newex 35 116 82 9109522 random 7;
#P newex 35 77 87 9109522 metro 400;
#P newex 35 249 427 9109522 gate 7;
#P window setfont "Sans Serif" 9.;
#P comment 516 264 100 9109513 milliseconds between on and off.;
#P window setfont "Sans Serif" 18.;
#P number 480 265 35 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 35 417 35 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 429 366 43 9109522 + 95;
#P user led 429 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 1 5 0;
#P connect 4 0 5 0;
#P connect 4 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 429 329 61 9109522 p b-tim;
#P newex 365 366 43 9109522 + 90;
#P user led 365 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 1 5 0;
#P connect 4 0 5 0;
#P connect 4 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 365 329 61 9109522 p b-tim;
#P newex 302 366 43 9109522 + 85;
#P user led 302 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 1 5 0;
#P connect 4 0 5 0;
#P connect 4 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 302 329 61 9109522 p b-tim;
#P newex 239 366 43 9109522 + 80;
#P user led 239 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 1 5 0;
#P connect 4 0 5 0;
#P connect 4 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 239 329 61 9109522 p b-tim;
#P newex 172 366 43 9109522 + 75;
#P user led 172 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 1 5 0;
#P connect 4 0 5 0;
#P connect 4 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 172 329 61 9109522 p b-tim;
#P newex 104 366 43 9109522 + 70;
#P user led 104 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 1 5 0;
#P connect 4 0 5 0;
#P connect 4 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 104 329 61 9109522 p b-tim;
#P newex 35 366 43 9109522 + 65;
#P user led 35 306 17 17 1 200;
#N vpatcher 25 70 658 546;
#P window setfont "Sans Serif" 18.;
#P newex 140 54 98 9109522 loadmess 1;
#P newex 25 351 34 9109522 !- 1;
#P toggle 34 59 26 0;
#P newex 71 57 42 9109522 gate;
#P outlet 92 342 15 0;
#P inlet 284 51 15 0;
#P toggle 90 319 15 0;
#P newex 37 244 42 9109522 t 0 0;
#P newex 37 196 66 9109522 del 200;
#P newex 86 127 42 9109522 t b 1;
#P inlet 85 29 15 0;
#P button 85 98 15 0;
#P connect 5 0 10 0;
#P fasten 11 0 9 0 145 88 127 88 127 23 39 23;
#P fasten 10 0 9 0 30 387 9 387 9 29 39 29;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P fasten 9 0 8 0 39 90 65 90 65 52 76 52;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 4 1 5 0;
#P connect 4 0 5 0;
#P connect 2 1 5 0;
#P connect 5 0 7 0;
#P connect 6 0 3 1;
#P connect 1 0 8 1;
#P pop;
#P newobj 35 329 61 9109522 p b-tim;
#P newex 35 451 110 9109522 serial a 9600;
#P window setfont "MS Sans Serif" 10.;
#P comment 487 89 132 8585226 Ligth flash controls when triggered a one is sent followed by a zero a few hundred milliseconds later. the one and zero are off set by a number so that we can address each light. for example 66 turns on light one 65 turns it back off;
#P window setfont "Sans Serif" 9.;
#P comment 167 163 189 9109513 Use this coll file to associate specific lights with specific notes....;
#P user panel 481 85 142 139;
#X brgb 242 242 255;
#X frgb 214 214 214;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 33 0 29 0;
#P connect 29 0 30 0;
#P connect 30 0 31 0;
#P fasten 32 0 31 0 163 180 40 180;
#P connect 31 0 28 0;
#P connect 28 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 6 0;
#P fasten 24 0 25 0 434 406 40 406;
#P fasten 21 0 25 0 370 406 40 406;
#P fasten 18 0 25 0 307 406 40 406;
#P fasten 15 0 25 0 244 406 40 406;
#P fasten 12 0 25 0 177 406 40 406;
#P fasten 9 0 25 0 109 406 40 406;
#P fasten 6 0 25 0 40 406 40 406;
#P connect 25 0 3 0;
#P fasten 26 0 4 1 485 300 91 300;
#P connect 28 1 8 0;
#P connect 8 0 7 0;
#P connect 7 0 9 0;
#P connect 37 0 29 1;
#P fasten 26 0 7 1 485 300 160 300;
#P fasten 34 0 32 0 163 126 163 126;
#P connect 28 2 11 0;
#P connect 11 0 10 0;
#P connect 10 0 12 0;
#P fasten 26 0 10 1 485 300 228 300;
#P connect 28 3 14 0;
#P connect 14 0 13 0;
#P connect 13 0 15 0;
#P fasten 26 0 13 1 485 300 295 300;
#P connect 28 4 17 0;
#P connect 17 0 16 0;
#P connect 16 0 18 0;
#P fasten 26 0 16 1 485 300 358 300;
#P connect 28 5 20 0;
#P connect 20 0 19 0;
#P connect 19 0 21 0;
#P fasten 26 0 19 1 485 300 421 300;
#P connect 28 6 23 0;
#P connect 23 0 22 0;
#P connect 22 0 24 0;
#P fasten 31 1 28 1 66 239 457 239;
#P fasten 26 0 22 1 485 310 485 310;
#P pop;

woo hah. advanced prototype time:

Here is the project box for the Buttons to Midi/Serial interface. the buttons/momentary switches connect to this interface via the dsub9 terminal on the left hand side. The switches are then transmitted as note numbers 60, 65, 70, 75, 80, 85, 90 ect.When a button is pressed the note is sent at full velocity (127) and when its released its sent at zero velociy.

and the inside of the box.

Here is a basic prototype to test the PC to Pic connection. For simplification of Pic sheduling and developement in pararel, we are using two chips, one to transmit to the computer and one to recieve info from the computer.

 

below is a picture of some max patching we will use to test some things. brief explination: the metro object polls the serial object every 10 milliseconds, the serial object outputs what ever is in the serial buffer as integers when ever polled. these numbers are then translated into triggers which cause notes to sound. These notes are associated with each button on the little botton box prototype. the buttons will eventually be replaced by floor switches that the pogo-ee will press by pogo-ing. also just for quick developement of the simon game we have a simple random number generator, that is polled by another metro object, which you may have guessed polls the random object every 500 milliseconds (0.5 s). the random numbers between 0 and 5 or 6(j'ai pas), then are routed to 6 buttons in and then to the 6 different notes. We will eventually wire this up to a midi or serial out so that we can control the lights and sound simultaniously and yippy skippy we will have a basic Simon algorithm.

for those who dont know midi, its our friend. mmm MIDI.

 

for those of you who know Max below is the text file, you know the routine, copy pasted into a Max text file, save as then open as a patcher... oh yah you will need to replace my custom delay and audio output patches. sorry those aren't free.

max v2;
#N vpatcher 15 55 341 677;
#P origin 58 0;
#P window setfont "Sans Serif" 18.;
#N vpatcher 15 55 615 455;
#P window setfont "Sans Serif" 18.;
#P newex 19 158 220 9109522 pack 0 0 1 10 0.5 50 0 300;
#P newex 22 217 46 9109522 line~;
#P newex 111 253 27 9109522 *~;
#P newex 316 176 48 9109522 rect~;
#P newex 313 132 41 9109522 mtof;
#P outlet 223 363 15 0;
#P newex 105 298 214 9109522 lang.pingpongdelay~ 50 0;
#P outlet 74 368 15 0;
#P inlet 57 68 15 0;
#P newex 49 93 36 9109522 t b i;
#P connect 0 0 9 0;
#P connect 9 0 8 0;
#P connect 1 0 0 0;
#P connect 3 0 2 0;
#P connect 7 0 3 0;
#P connect 8 0 7 0;
#P connect 6 0 7 1;
#P connect 3 1 4 0;
#P fasten 0 1 5 0 81 123;
#P connect 5 0 6 0;
#P pop;
#P newobj 30 350 65 9109522 p synth;
#N vpatcher 302 55 1098 676;
#P origin -53 -28;
#P window setfont "Sans Serif" 18.;
#P number 620 129 202 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 891 327 74 0;
#P button 815 329 74 0;
#P button 730 326 74 0;
#P button 654 328 74 0;
#P button 576 330 74 0;
#P button 500 332 74 0;
#P newex 525 279 352 9109522 gate 6;
#P newex 521 236 30 9109522 t i i;
#P newex 521 185 82 9109522 random 6;
#P toggle 522 98 15 0;
#P newex 521 128 87 9109522 metro 500;
#P button 444 454 39 0;
#P newex 427 499 37 9109522 t 85;
#N vpatcher 15 55 615 455;
#P outlet 127 201 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 172 34 9109513 sel 127;
#P newex 125 116 40 9109513 change;
#P inlet 111 55 15 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 445 140 66 9109522 p 1shot;
#P outlet 185 597 15 0;
#P inlet 72 53 15 0;
#P newex 182 556 22 9109522 t i;
#P newex 335 502 37 9109522 t 80;
#P newex 261 495 37 9109522 t 75;
#P newex 204 497 37 9109522 t 70;
#P newex 129 496 37 9109522 t 65;
#P newex 63 494 37 9109522 t 60;
#P button 337 455 39 0;
#P button 268 452 39 0;
#P button 201 446 39 0;
#P button 132 446 39 0;
#P button 63 443 39 0;
#N vpatcher 15 55 615 455;
#P outlet 127 201 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 172 34 9109513 sel 127;
#P newex 125 116 40 9109513 change;
#P inlet 111 55 15 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 342 141 66 9109522 p 1shot;
#N vpatcher 15 55 615 455;
#P outlet 127 201 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 172 34 9109513 sel 127;
#P newex 125 116 40 9109513 change;
#P inlet 111 55 15 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 270 143 66 9109522 p 1shot;
#N vpatcher 15 55 615 455;
#P outlet 127 201 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 172 34 9109513 sel 127;
#P newex 125 116 40 9109513 change;
#P inlet 111 55 15 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 199 143 66 9109522 p 1shot;
#N vpatcher 15 55 615 455;
#P outlet 127 201 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 172 34 9109513 sel 127;
#P newex 125 116 40 9109513 change;
#P inlet 111 55 15 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 130 142 66 9109522 p 1shot;
#N vpatcher 15 55 615 455;
#P outlet 127 201 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 129 172 34 9109513 sel 127;
#P newex 125 116 40 9109513 change;
#P inlet 111 55 15 0;
#P connect 0 0 1 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P pop;
#P newobj 58 141 66 9109522 p 1shot;
#N vpatcher 15 55 656 532;
#P outlet 315 368 15 0;
#P outlet 266 364 15 0;
#P outlet 226 375 15 0;
#P outlet 177 371 15 0;
#P outlet 134 369 15 0;
#P outlet 85 365 15 0;
#P inlet 88 60 15 0;
#P window setfont "Sans Serif" 18.;
#P number 491 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 446 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 401 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 356 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 311 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 266 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 221 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 176 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 127 179 36 9109522 t b i;
#P number 84 103 93 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 131 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 86 335 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 86 293 416 9109522 gate 10;
#P newex 86 181 28 9109522 t 1;
#N counter;
#X flags 0 0;
#P newobj 86 226 67 9109522 counter;
#P newex 86 140 65 9109522 sel 144;
#P connect 16 0 6 0;
#P connect 4 0 17 0;
#P connect 6 0 0 0;
#P connect 0 0 2 0;
#P connect 7 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 4 0;
#P connect 0 1 7 0;
#P connect 2 0 1 3;
#P connect 3 1 5 0;
#P connect 5 0 18 0;
#P connect 3 2 8 0;
#P connect 8 0 19 0;
#P connect 3 3 9 0;
#P connect 9 0 20 0;
#P connect 3 4 10 0;
#P fasten 10 0 21 0 271 363;
#P connect 3 5 11 0;
#P connect 11 0 22 0;
#P connect 3 6 12 0;
#P connect 3 7 13 0;
#P connect 3 8 14 0;
#P connect 3 9 15 0;
#P fasten 7 1 3 1 158 280 155 280 497 280;
#P pop;
#P newobj 56 90 266 9109522 p likeMidi;
#P connect 17 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 6 0;
#P connect 27 0 6 0;
#P connect 6 0 11 0;
#P connect 7 0 12 0;
#P connect 0 1 2 0;
#P connect 2 0 7 0;
#P connect 28 0 7 0;
#P connect 15 0 16 0;
#P connect 14 0 16 0;
#P connect 13 0 16 0;
#P connect 12 0 16 0;
#P connect 11 0 16 0;
#P connect 20 0 16 0;
#P connect 16 0 18 0;
#P connect 0 2 3 0;
#P connect 3 0 8 0;
#P connect 29 0 8 0;
#P connect 8 0 13 0;
#P connect 9 0 14 0;
#P connect 4 0 9 0;
#P connect 30 0 9 0;
#P connect 0 3 4 0;
#P connect 10 0 15 0;
#P fasten 5 0 10 0 347 172;
#P connect 31 0 10 0;
#P connect 0 4 5 0;
#P connect 21 0 20 0;
#P connect 19 0 21 0;
#P connect 32 0 21 0;
#P connect 0 5 19 0;
#P connect 26 0 27 0;
#P connect 23 0 22 0;
#P connect 22 0 24 0;
#P connect 24 0 25 0;
#P connect 25 0 26 0;
#P connect 26 1 28 0;
#P fasten 33 0 22 1 623 154;
#P connect 26 2 29 0;
#P connect 26 3 30 0;
#P connect 26 4 31 0;
#P connect 25 1 26 1;
#P connect 26 5 32 0;
#P pop 1;
#P newobj 29 246 126 9109522 p dataToNotes;
#P user kslider 29 279 54 0 48 36 31 12 0 255 0 0 255 0 0 255 255 255 0 0 0 0 0 0;
#P bpatcher 29 409 133 183 0 -20 lang.audio.out2 0;
#P user multiSlider 145 156 315 67 -30. 260. 1 3177 15 0 0 2 0 0 0;
#M frgb 75 175 255;
#M brgb 0 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P number 29 202 42 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 29 48 15 0;
#P newex 29 156 110 9109522 serial a 9600;
#P newex 29 86 77 9109522 metro 10;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 7 0;
#P connect 7 0 6 0;
#P connect 8 0 5 0;
#P fasten 6 0 8 0 34 346 35 346;
#P connect 8 1 5 1;
#P fasten 3 0 4 0 34 243 150 243;
#P pop;

// end that there max code

Ok here is the latest pic code. this now works kinda well. now i just gotta get those buttons to play nice with the chip. right now one of them doesnt work so well. it may be that they are wired wrong (see improvised soldering session below)... or that there is that issue of interference or somthing like cross-talk, as was the case with the two pots right next to each other.

'****************************************************************
'* Name : TrixAreForKids_LCC.BAS *
'* Author : [LCC284] *
'* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 9/20/2005 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
DEFINE OSC 4
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

Potvar VAR WORD ' Create variable to store result
incVar var byte
pitchVar var word
freqVar var word
avar1 var word
avar2 var word
avar3 var word
avar4 var word
avar5 var word
avar6 var word
avar7 var word
avar8 var word

Savar1 var byte
Savar2 var byte
Savar3 var byte
Savar4 var byte
Savar5 var byte
Savar6 var byte
Savar7 var byte
Savar8 var byte




TRISA = %11111111 ' Set PORTA to all input
TRISB = %11111111 ' set portB to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify result
Pause 500 ' Wait .5 second

Start:

OUTPUT PORTD.2
output portd.1
HIGH PORTD.2
PAUSE 150
LOW PORTD.2
PAUSE 110
HIGH PORTD.2
PAUSE 150
LOW PORTD.2
PAUSE 110
HIGH PORTD.2
PAUSE 150


MAIN:
ADCIN 0, avar1 ' Read channel 0 to avar1
ADCIN 1, avar2 ' Read channel 1 to avar2
ADCIN 2, avar3 ' Read channel 2 to avar3
ADCIN 3, avar4 ' Read channel 3 to avar4
ADCIN 4, avar5 ' Read channel 4 to avar5
ADCIN 5, avar6 ' Read channel 5 to avar6
ADCIN 6, avar7 ' Read channel 6 to avar7

Savar1 = avar1 / 8
Savar2 = avar2 / 8
Savar3 = avar3 / 8
Savar4 = avar4 / 8
Savar5 = avar5 / 8
Savar6 = avar6 / 8
Savar7 = avar7 / 8
Savar8 = avar8 / 8
' change them words to bytes and scale them down to a range of 0-127


serout2 PORTC.6, 16468, [ 144, savar1, savar2, Savar3,
Savar4,Savar5,Savar6,Savar7, 13, 10]




GOTO MAIN

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Week Two:

Basic Prototype:

weeeeeehaaahhh.

ok so we gotta connect a lot of stuff to a pic chip. but this stuff is going to be far a way from the chip and/or the computer with which it will be communitcating. So after some disccussion we decided a serial cable may be a convienent way to get all those separate connetions from one part of the project to the other. So here is a testing prototype...

ok so black is ground, red is five volts. then things get tricky. there are 7 other pins and only 4 other colors. Blue Yellow and White got used twice (h.s. colors GO ROYALs!) I twisted things together in threes. Black, Blue1 and Green are together and are in the normal serial connections (pins 1, 3 & 4). Red, White1 and Yellow1 are together (pins 5, 2 & 6). White2, Blue2 and Yellow2 are together (pins 7, 8 & 9).

Man this connetion layout was arbitrary.... so i made this chart to help me keep track... In retrospect i would have rather made the chart first then put things together. Yah that would have been smart(er).

Botton Pin Color pic  

top left

8 Blue2 B.2  
top center 7 White2 B.3  
top right 4 Green B.4  
bottom left 3 Blue1 B.5  
bottom center 2 White1 B.6  
bottom right 6 Yellow1 B.7  
         
         

 

 

 

I will be using the Box of Buttons to test and prototype the pic chip/serial/midi interface.

OOOPPS... little forgetfulness here. the serial cable is female on one end male on the other. Dag-Nab hetro cables. Now i gotta give this box a sex change....

 

and then there is this issue with my bread board. my voltage regulators would get very hot if i plugged them into the area marked in black. now i have one on the other end of the board. it gets warm but not sizzling figertips hot. and yah. today was Lost Sailor who "found" the western Hemisphere and helped lead to the irradication of the indiginous people. so i took the day off from programming to morn the loss of the Native American civilizations.

Besides the E.R. was closed today so i couldnt do any pic programming anyway.

More on this project later.

[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]

'****************************************************************
'* Name : TrixAreForKids_LCC.BAS *
'* Author : [LCC284] *
'* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 9/20/2005 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
DEFINE OSC 4
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

Potvar VAR WORD ' Create variable to store result
incVar var byte
pitchVar var word
freqVar var word
avar1 var word
avar2 var word
avar3 var word
avar4 var word
avar5 var word
avar6 var word
avar7 var word
avar8 var word


TRISA = %11111111 ' Set PORTA to all input
TRISB = %11111111 ' set portB to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify result
Pause 500 ' Wait .5 second

Start:

OUTPUT PORTD.2
output portd.1

MAIN:
ADCIN 0, avar1 ' Read channel 0 to avar1
ADCIN 1, avar2 ' Read channel 1 to avar2
ADCIN 2, avar3 ' Read channel 2 to avar3
ADCIN 3, avar4 ' Read channel 3 to avar4
ADCIN 4, avar5 ' Read channel 4 to avar5
ADCIN 5, avar6 ' Read channel 5 to avar6
ADCIN 6, avar7 ' Read channel 6 to avar7

serout2 PORTC.6, 16468, [DEC avar1, 32, DEC avar2,32,DEC avar3, 32,DEC
avar4, 32, DEC avar5, 32, DEC avar6, 32, DEC avar7, 13, 10]

HIGH PORTD.2
PAUSE 150
LOW PORTD.2
PAUSE 110


GOTO MAIN

week one:

Observation and Brain storming: