nzmsim Posted March 29, 2010 Report Share Posted March 29, 2010 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 Quote Link to comment Share on other sites More sharing options...
nzmsim Posted April 5, 2010 Author Report Share Posted April 5, 2010 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; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.