Jump to content

Recommended Posts

Posted

Hi!

I came across Rasteris scratch controller on youtube and i'm now in the works of making one myself. My first prototype is almost done but I'm having some problems getting the sensors to work. The core module is up and working and the x-fader works properly. I have wired everything up according to the schematics (attached) but the touch sensor Isn't working at all, no I/O in Mios studio when touched.

The second concern i have is with the IR-photo diode setup. I took my IR sensor out of a ball-type mouse and from what I understand its a two phototransistor setup with shared pin for the collector. Where can I get a photo diode that will work or how can I adapt the scheme and code to work with the photo transistors.

I'm new to the whole midibox thing, I would greatly appreceate any help.

/Jonas

post-7377-126989465515_thumb.png

Posted

Ok, solved problem nr one, IR sensors now working. But problem with the touch sensor remains. I wired everything according to the scheme and tried different size resistors but still no output. Any Ideas?

Im guessing the problem lies in the wiring but heres the code in case it helps figuring it out:

/
* Strobe + check touch sensor. Nasty hack. */

PORTDbits.RD4=1;

for (average=0; average<TOUCHSENSOR_DELAY; average++){} // delay loop

capsense+=PORTDbits.RD0;

PORTDbits.RD4=0;

/* Check last 5 touch sensor readings */

delaycount++;

if (delaycount==5){

if (capsense>=4) touchval=0;

else touchval=1;

if (touchval != oldtouchval){

MIOS_MIDI_TxBufferPut(0x90);

MIOS_MIDI_TxBufferPut(60);

MIOS_MIDI_TxBufferPut((touchval)*127);

oldtouchval=touchval;

}

delaycount=0;capsense=0;

}

post-7377-127049126843_thumb.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...