📄 index1.html#
字号:
style='margin-top:0in;margin-right:-6.85pt;margin-bottom:0in;margin-left: .5in;margin-bottom:.0001pt;text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:10.5pt;font-family:Symbol;mso-fareast-font-family:Symbol; mso-bidi-font-family:Symbol;color:#666699'><span style='mso-list:Ignore'>span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:10.5pt;font-family:Arial;color:#666699'>Receive<o:p></o:p></span></pre><pre style='margin-top:0in;margin-right:-6.85pt;margin-bottom:0in;margin-left: .5in;margin-bottom:.0001pt;text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:10.5pt;font-family:Symbol;mso-fareast-font-family:Symbol; mso-bidi-font-family:Symbol;color:#666699'><span style='mso-list:Ignore'><span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:10.5pt;font-family:Arial;color:#666699'>Sets up ISR, which then does all the work of getting a command<o:p></o:p></span></pre> <p class=MsoNormal style='margin-right:-6.85pt;tab-stops:list .5in left 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span style='font-size:10.5pt;font-family:"Courier New";color:#666699'>void puts_int(void)<o:p></o:p></span></p> <ul style='margin-top:0in' type=disc> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Transmit<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Sets up ISR, which then sends one character<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>ISR does all the work<o:p></o:p></span></li> </ul> <pre style='margin-right:-6.85pt'><span style='font-size:10.5pt;color:#666699'>void calc_percent(int my_letter, int pos[5])<o:p></o:p></span></pre> <ul style='margin-top:0in' type=disc> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Calculates finger % differences between signed letter and prompted letter<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>% for each finger = ((actual current)/actual) * 100, where 揳ctual represents the values stored in EEPROM<o:p></o:p></span></li> </ul> <pre style='margin-right:-6.85pt'><span style='font-size:10.5pt;color:#666699'>void plusminus()<o:p></o:p></span></pre> <ul style='margin-top:0in' type=disc> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Displays +/- to LCD to indicate which way to flex each finger<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Negative (-) % means bend fingers to get correct positions<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Positive (+) % means straighten fingers<o:p></o:p></span></li> </ul> <pre style='margin-right:-6.85pt'><span style='font-size:10.5pt;color:#666699'>int match(int pos[])<o:p></o:p></span></pre> <ul style='margin-top:0in' type=disc> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Matches finger positions to appropriate letter in master alpha matrix<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Returns int of letter matched (a=0, z=25) or NOTFOUND (-1) if not found<o:p></o:p></span></li> </ul> <p class=MsoNormal style='margin-right:-6.85pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span style='font-size:10.5pt;font-family:"Courier New";color:#666699'>void set_values(letter l, int arr[])<o:p></o:p></span></p> <ul style='margin-top:0in' type=disc> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Stores programmed finger positions into master alpha matrix<o:p></o:p></span></li> <li class=MsoNormal style='color:#666699;margin-right:-6.85pt;mso-list:l3 level1 lfo3; tab-stops:list .5in'><span style='font-size:10.5pt;font-family:Arial'>Also records order of letters saved to EEPROM in index_set<o:p></o:p></span><span style='font-size:10.5pt;font-family:Arial;mso-fareast-font-family:"Times New Roman"; color:#666699'><o:p></o:p></span></li> </ul> <p class=MsoNormal style='margin-right:-6.85pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><b style='mso-bidi-font-weight:normal'><span style='font-size:18.0pt;font-family: Arial;color:#666699'>Major Issues<o:p></o:p></span></b></p> <p class=MsoNormal style='margin-right:-6.85pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span style='font-size:10.5pt;font-family:Arial;mso-fareast-font-family:"Times New Roman"; color:#666699'><br> Below are several main issues, which we encountered during the programming of the SLC, and how we resolved them. <br> <br> TEACH mode. Instead of hard-coding the five finger positions for each ASL letter, we implemented a 揟eachmode in which the MCU stores the user抯 finger positions and associate it with the user specified ASL letter. The issue with this mode is that the user抯 finger positions are not perfectly still during the storing process. To resolve this issue, we allow the user 3 seconds of preparation time. In addition, we take four consecutive samples of his hand positions and average the values of each finger position to more accurately detect the sign language. <o:p></o:p></span><span style='font-size:10.0pt;mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p> <p class=MsoNormal style='margin-right:-6.85pt'><span style='font-size:10.5pt; font-family:Arial;color:#666699'>Jameco has a patent on flex sensors which we used 5 of in our project; however, this does not conflict with the interest of our project.<span style='mso-spacerun:yes'></span>We are simply using their product in order to implement our glove.<o:p></o:p></span><span style='font-size:10.5pt; font-family:Arial;color:#666699'><o:p></o:p></span></p> <p class=MsoNormal style='margin-right:-6.85pt'><span style='font-size:10.5pt; font-family:Arial;color:#666699'><o:p></o:p></span></p> <p class=MsoNormal style='margin-right:-6.85pt'><span style='font-size:10.5pt; font-family:Arial;color:#666699'><o:p><span style='font-size:10.0pt;font-family:"Courier New";color:#33CC99'>printf("Set up your hand position...\n\r"); <br>printf("You have 3 seconds to prepare your hand...\n\r"); <br>task4(); //delay 1 seconds <br>task4(); //delay 1 seconds <br>task4(); //delay 1 seconds <br><br><br>printf("Begin calibrating...\n\r"); <br>//parse ADC0-ACD4 <br>for (j=0; j < 6; j++) begin <br> for (i=0;i<br><5;i++)begin > ADMUX=0x60+i; <br> Ain = ADCH; //get the sample <br> ADCSR.6=1; //start another conversion <br> while(ADCSR.6==1); <br> pos[j][i]=Ain; <br> end <br> task4(); <br> end <br> printf("End Calibrating...\n\r");</span><span class="style9"><o:p></o:p><o:p></o:p></span><o:p></o:p></o:p></span></p> <p class=MsoNormal style='margin-right:-6.85pt'><span style='font-size:10.5pt; font-family:Arial;color:#666699'><o:p><o:p></o:p></o:p></span></p> <p class=MsoNormal style='margin-right:-6.85pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span style='font-size:10.5pt;font-family:Arial;mso-fareast-font-family:"Times New Roman"; color:#666699'><span style='font-size:10.5pt;font-family:Arial;color:#666699'>Re-TEACH. If the user needs to modify the hand position of a certain letter, he can overwrite it by re-recording his hand position and the associated letter. However, once he finishes teach mode and programmed the chip, he cannot re-teach the ASL to the MCU because the data is stored in eeprom. This means that the data can only be erased by reprogramming the chip, which prevents unintentional data corruption. <br> <br>Matching Algorithm. We need an efficient algorithm which parses the five finger position and matches each position to the appropriate ASL. The finger position for each letter is stored in a 2 dimensional array of 26 x 5 because there are 5 finger positions for each of the 26 letters of the alphabet. We cannot parse through each element of the array, which will take a total of 130 parsings per hand position. If we analyze this algorithm, it requires, in Big-O notation, O(n) time, where n is the number of elements in the 2-Darray. Clearly this is inefficient. If we use a hash-table, which require constant time to fetch the data, we run into multiple collisions.</span><span style='font-size:10.5pt;font-family:Garamond;color:#666699'> <o:p></o:p></span></o:p></span></p> <h2 style='margin-top:0in;margin-right:-6.85pt;margin-bottom:0in;margin-left: 0in;margin-bottom:.0001pt;tab-stops:list .5in left 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span style='font-family:Arial;mso-fareast-font-family:"Times New Roman"; color:#666699'>Hardware Details<o:p></o:p></span></h2> <h2 style='margin-top:0in;margin-right:-6.85pt;margin-bottom:0in;margin-left: 0in;margin-bottom:.0001pt;tab-stops:list .5in left 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span style='font-size:10.5pt;font-family:Arial;mso-fareast-font-family:"Times New Roman"; font-weight:normal;mso-bidi-font-weight:bold'><br> <u><span style='color:#666699'>Flex Sensor Circuit. </span></u><span style='color:#666699'>We built the prototype board for the glove-MCU interface. The circuit consisted of five modules, one for each finger. Each module (see Figure below) contained a flex sensor feed into a LM7111 operational amplifier to achieve a desired gain and resolution. We do this by choosing the appropriate resistor values. The output of each op amp is the voltage divider Vout = Vin(R2/(R1+R2)), which we chose R1 to be 1k and R2 is 33kohms, the input voltage will be 5V. So the output voltage will range from 2.8 to 4V.</span></span><span style='mso-fareast-font-family:"Times New Roman"'> <br> <br> </span><u><span style='font-size:10.5pt;font-family:Arial;mso-fareast-font-family:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -