100 likes | 219 Views
Team 3 Piano Glove. Software Design Considerations Carolyn McMican Daniel Stein Jonathan Kuntzman Mihir Shah. Project Specific Success Criteria. An ability to quantify the position of the glove relative to the processing unit.
E N D
Team 3Piano Glove Software Design Considerations Carolyn McMican Daniel Stein Jonathan Kuntzman Mihir Shah
Project Specific Success Criteria • An ability to quantify the position of the glove relative to the processing unit. • An ability to combine finger press data and glove position to determine which virtual key has been pressed. • An ability to utilize SpeakJet from GPIOs to produce various sounds. • An ability to collect analog data from force and stretch sensors, digitize it, and correctly format packets for wireless transmission. • An ability to detect different pressure levels to control volume.
Design Constraints • Memory Constraints • Data storage is limited to one package on either glove or base and a few miscellaneous variables • Time Constraints • Software should run fast enough to provide illusion of instantaneous sound from finger press
Utilization of Integrated Peripherals • Analog to Digital • Will be used for sampling the sensors on the glove • Serial Peripheral Interface • Will be used for printing messages to the lcd screen • Timer • Will be used to generate interrupts for time based actions • Will be used to time ping duration
Glove Software • Check for finger presses on a set time interval • If finger pressed check stretch sensor • Format data package for easy decoding • Transmit the data package • Software will be interrupt driven
Glove Pseudo-Code Main(){ initializeReg(); while(true){ /*Wait for timer interrupts*/ } } TimerServiceRoutine(){ data[]=sampleATD(); formatData(data); transmitData(data); }
Base Software • Ping the glove on a set time interval • Time duration of ping • Convert time to distance to glove • If a data package is received • Check if the data package is valid • Calculate notes pressed based on data package and distance • Use Speakjet to produce appropriate sounds • Software will be formatted as a polling loop
Base Pseudo-Code Main(){ intializeReg(); while(true){ /*Timer interrupts for generating pings.*/ if(haveData()){ data[]=recieveData(); mapToKeys(data); produceNotes(data); } } } TimerSeriveRoutine(){ time=pingGlove(); Distance=convert(time); Return(distance); }