Home
Capstone Final Report.docx - ECE
Contents
1. F4 7957747252747 70 02 RIOD DO PATISOTI STS A ALSSALSOSAESSAG R AES TERS L ARG LAN 56 LIAISEANAISAA 75 AOE STIROI SESS 77 QUVSTIINON7 7 EDS EAT 20972917 7095 1990 255 MSG ISAIA amp 3569143593764 T7 289377239 77364673 1339 99S 2902 MOLL 1999 2050 1979 6537 ITELI 1 0792079207320 P 46520653065165 B 455A SA15 SARs S7 1AMESTIAIESTL 73 62597 O TSOC METH 0 SOPO OS PAIS TAIS TADS TS 0 534535 S6 7E5655 24 1252747252747 7F 65567 6556777 617 2939 210 2904 THE DG 255 4310 38D p Mb TMAATTOSIES 72 0027 72OVITIID 77 GSGTIOSIITT PAST SSL JOO 2094 TOSS 1700 20535 4777 30950007033 2 0001900100090 0 SOOT SEO LIOGL IES 3 SAR MESOON 30 77915 EM BALL 1905 INIA LRSL THPOGIT HLT 1 PISA ORE VEAD O AISTAISTADS TAS JICZITEZIPEZIA 55 6715567 1655 7 BIGII IEIET IE 70 O2EATRADIOTAIIOIT 1958 9995 2331 20t ASRLDGS S6 775567765568 73 626276269736 77 GISETPSSSSIITISIT 3M5 DERI ON TAS NOT NSS 4281 47SA3007213 1 OLIMMLIBOLIBNL 455340594059406 29564 755435644 19617 1953 2101 J502 GS TFG 24S 5E SES IPOOT STD 0 PETITE A SPSS DAIS ISIS E 45544554455440 57 S4IESP ALES TL FA 15071359974 77 6556 PHSSET TT 20S 1 FIOI O AAAA A ASSAS SDI ST LADY IAIESTI F III VAAIGA TT IBGIIIIWIITT IAT 1957 Z1SS 7IVS OAD E900 J054 4775 M3000075 0 7603900300800 8 TRS2PAPASAIAT 77 MAATPNOGITTIAIPD7 1999 1099 2909 PALS 199S AVG
2. 1445509781 Figure 1 The neatly formatted file viewed in excel becomes a mess when viewed as plain text The plain text file is in a series of comma delimited numbers in the same way that excel formats the file by column Our initial thought was to simply read all of the data into memory however some quick math shows us why that is a bad idea Page 5 Sampling Rate 51 Hz Line Buffer Size 256 Bytes Memory usage per second 256 Bytes 51 Hz 13 056 kB s In half an hour of use storing every value from the file would use 23 5 MB of memory or almost 1 MB min Necessary Data 18 Necessary Data Total Data Total Data 82 Figure 2 Necessary data only occupies 18 of the total data we re sampling As we can see from figure 2 we only actually require 18 of the total amount of data written into the file Therefore by only storing values which we need we can reduce the amount of memory we use by a factor of 5 5 Memory usage per second 0 18 x 256 Bytes 51 Hz 2 35 kB s Unfortunately this massive reduction in memory usage does not directly translate into increased performance due to the fact that memory is extremely large However this increased efficiency can be applied to more sophisticated systems where higher sampling rates provide more accurate readings and by extension have higher memory overheads We had successfully read from the file and now we were faced with
3. 8 EYE EEG Test Datasets EYE EEG Download Test Datasets EyeLink n d Web 05 May 2014 Code Controller c Contains the main function program entry point as well as functions that implement our two factor threshold algorithm converting numbers to keystrokes explained in my part of the report Also contains functions that actually press the keys This is the core of the program and also contains code that syncs the input to the output include shimmer h include lt stdio h gt include lt stdlib h gt include lt windows h gt INPUT ip int count 0 Presses key specified by virtual key code int keydown int key ip ki wVk key ip ki dwFlags 0 Sendlnput 1 amp ip sizeof INPUT Releases key specified by virtual key code int keyup int key ip ki dwFlags KEYEVENTF_KEYUP Page 12 Sendlnput 1 amp ip sizeof INPUT Translates a value to a virtual key code int tk char key key tolower key switch key case 0 return VK_UP case 1 return VK_DOWN case 2 return VK_LEFT case 3 return VK_RIGHT case 4 Z jump return Ox5A case 5 X run fireballs return 0x58 default return 0 function to evalute which key was pressed based on value int sneakpeek int j int v switch j case 0 if v gt 2100 amp amp v lt 2500 walk left return 2 else if v gt 1350 amp amp v lt 1800 walk right return 3 break c
4. two additional challenges translating the numbers into keystrokes and synchronizing the timing between reading the values and relaying the corresponding keystrokes to the program Both of these issues are very important to the integrity of the project The translation from head movement to keystroke needed to be a simple motion to pick up but robust enough to compete with a traditional video game controller The synchronization of the timing between head movements and generated Page 6 keystrokes needed to be very precise or else the system would experience a large amount of continually increasing or decreasing latency In order to translate the numerical readings into keystrokes we developed a two factor threshold algorithm Figure 3 Finite state machine representation of our algorithm In this algorithm the system begins in the waiting state SO If a key is generated the system moves to state S1 and presses the key represented by KO If in the next cycle a different key K1 is generated the system releases KO and begins to press K1 If the system is in state S1 and the same key KO is generated again then the system moves to state S2 where KO is held for another cycle then the system returns to SO Figure 4 Pseudo code representation of our algorithm while 1 k getKey i knext getKey itl if k knext pressKey k Wait for 20ms releaseKey k Page 7 The most important part of our project was re
5. 36 DODA D53 1598 ASO IMPETIIT 1 0 55 li PI26FA T 4230769230765556 1999 DIAE JONG AS 1997 2653 1703 OF ELS 0 341183115311632 0 PAGATIA TION 2 J560 IAIA E5 41NDSEA1dIS64 73S 799679 D i E25 225P00IELI 1 QOONRDOMIOIOML 0 S54605445544555 0 AESSAES SATS I0G 57 JADSSTIAIENTS 75 CDALTSAIAL PSE 77 200177200577300190 2952 2004 ING JOT J001 2057 1044 EY ESM 56 4307564I0I MS 73 PERG PODAT 37 DEWPT ZOGIIT MAING LHS TERE TID PALL DOOD OLD 1001 SEAPPENTE ID H PAP A CPVTEIG IAI FRAMES 57 POD 2068 1949 2053 2679 13298007813 16831683263 0 42S PAIS TRISTE B ASSSAS SAG eaS 57 LEPISTIAIESTS 75 OPLSTSMIISTSL PS 92IPTHIDIGTPIZII 1941 D306 2306 DOL A55 g Soma seasseass 5 ADEST PESTPAPISIISS PS GTIVNOTII ILI 1949 20950 2051 2065 1 DESS Iri SHE ELY 0 3601300100138 0 415s 1 SeaT Bats 6 346 1907 3054 2135 SIBLIOTSIS 0 90010002 AATAS 8 SIASSIAES1GSS2 56 ADOTSOAIOISES F4 7252747757767 77 20037 770 377311553 1954 70908 7720 MAA LOST 205 B AISA ISHS SEAS S6 AIAISEADAT SSS 14 YPSTAIGEONLL 77 289 77289377 1579 IAE JOGL 7893 2035 1996 MISE 2469 75PRPIOTBI AIIGAIOPAIDRL A 126772673267327 3 1667 T ROC it DAt 1499 2951 2506 9445500TRtI t 0 JIE2I7623752375 6 S4455445544554 57 1420571428572 75 45787S457B755 M6 198E THIS DIGG D 1968 2095 2011 204 200 D TATA SLRS IAOS 05e 9 TALES PLATES 71 79 AS PEPSAS
6. AEST SEOPRATRLD I OPMIIATIZATING SAIISOMISOIINNS 8 S2I7SAIIGAIIGD FS G77USMSTIOSST 73 99267390 255 278 75780387813 1 G22 7622 72I7EM ASBADS RSLS RAD S7 SOILSTSAIISIS 75 POLSISEVISTST 77 65567755567773D417 19351 2053 2565 2063 1995 1853 4999 DIESEL PASSO TOSSEE 74 SEO ISHII 76 SET MASO PIES SEIS 18S EP IOS DAY 1979 2054 5106 APSE O71 5 1_ OIVEOIIOOLMOS O SDO SOSS 44551689 1405048 7 14385214 MG 290M POAT TOAD 29055 5773 GEST IOOTELD Q A PINT PTL 47SIATSIATI IONS B SLAESLAUSIAESZ S7 OLS ISMPLETS 75 ASTOISASTETSS 77 OSU TTOSSETT PADI 196 DAVY 2907 minaman A SOAYSASISATIS SF LAIOSTEA IGS ID 7 7252745 76 LIGLNG DIATE RSIS 7 1957 2093 2905 MOAT 1959 2055 SIER JED0900731I A 90I A A5 520554 OMPBS17 1958 20 2690 2895 1996 WSS SAT SESSIES 0 57029702570237 0 415341594158416 9 4159415941534 56 BISRE 73 eevee a 77 65567M 556777457 MIOTAIS 0 IBPLIBTLIBPLINT 8 3663206 1966397 36 0499500459501 79 02637 95 I0772 77 4907 ESW7TT PINT 1957 JIGS IOTH 2047 1906 2055 S614 30853007015 1 ONE a TE IMOOTAIMITEE 77 GHGTIOVIITIMETS 1054 TALI ARAL LIOR PISS STM A750078 2 FMOPREOMIEON STSIETSINTI IETS SAAVESAES ALES 56 TOSSA T MSM 73 89 3307317 0 3053A IASS A SASISASSSOGISOS FAIS TADS TAPS ILS 56 7765567765568 TS 7252747252747 M PEWAPEMLIATEAEIT 7 1958 TARE 2301 MS 2002 2057 5051
7. Rutgers University Electrical and Computer Engineering Capstone Neuro Kinetic Virtual Control System Advisor Professor Dario Pompili Group 4 Asim Alvi Frank Bohn Giovanni DeGrande Eric Lee Sangit Patel Abstract Many people with different forms of paralysis and degenerative diseases such as Muscular Dystrophy Osteoarthritis and Diabetes struggle with interacting with computers and control systems Simple things such as turning on and off lights moving and using computer applications are extremely difficult Our goal was to combine the use of electroencephalograms and kinematic technology to control some of the aforementioned systems To prove this concept we used a shimmer sensor The shimmer sensor has a built in accelerometer and gyroscope The sensor is attached to the user s head and through various movements they can activate particular keys on a keyboard Through the use of an EEG data we would be able to obtain a larger number of control signals than interpreting accelerometer and gyroscope data Our proof of concept uses a shimmer sensor to simulate keystrokes on the computer We use these keystrokes to play a game of Mario Current technology focuses on one input method They either use EEG data or gyroscopic and accelerometer data Our method improves on this by harnessing both methods and requires only a working head and neck to implement There is a lot of room to expand on what we did Future work could include improving the met
8. TOISS 7E C2I9PSETIGIETT IS 1953 DONS TOD 20535 1975S 15 2725 GOSS METALS 0 MOSSOS 0 40554455445540 82 ST 1958 OP 2050 201A 2000 2055 TD PRIN 0 DILTON LOOIL DO ADSM ISTAISTAIC 0 LATICO 57 PISTIOOLNTL 76 WISETAIIOOTEA 77 GUSATIESSS7ITIOIOS 05 BALSALL SES A GISES SES MESS 56 G4I9SHRLIISEL 73 DET JIGRI TR ST1IPMRZEPTRIIOTI 1959 2034 PANE DOT L998 MSA 2977 56950007313 SMIDIOMIO E5555 ALSS M2SPRETLIPEIGETS 1955 204 903 1055 LOPE 2957 II PSTOROTAL A SAI7PSDIPSTOPIT1 455465544554455 4 06524553465 146 57 SOPLSTSOSIS TS 7S 081556515751 78 36885 FELD O10801059109911 0_ S74 297624762576 SOSOTESNIIES S6 0520560429502 S 001S 790015 751 15 02197S02197RSOISS IML I0 2909 7047 2001 2054 TIT ASAIO MT 2 0 TAMATIES 360 FS OVILPMOOLSTS 77 655677855677744 0 1057 JOSI IAE 704P 1700 NSA IM GESI IOONI SAUL LEM TOL EAM O VEL IGE UGE E IJERILERTLSOE 57 1470371 107 2998 2946 t938 2053 J465 65000713 A INTIMTINTIA a 584153415841584 6 51485848514652 56 TIOSSETMSS6F MA ISBITL ISHN Ne SZ TET MOTE B57 1949 2201 291 SASSSRS9SB89S d 4257425742574 5 1428570420572 72 6263 36263726 77 655671 556 7752513 2953 GE JNO ES 1997 2053 MO SESSIONI 0 AASS ISNS TFT GSS I IUSSIT 30353 1903 NS PINT AMI 2000 2250 1719 JS APT TELS 0 0521901700190 673167514732675 B ASS4AS4AS EEO ST S0OLI73091573
9. act that most of our solution involves a software aspect The only significant expense would be the shimmer sensors which cost about 350 each The use of the shimmer sensor is then all done on the software side which doesn t bring up the cost of the product In the future if we want to mass produce these it would much cheaper for us to use accelerometer and gyroscope computer chips as opposed to the prebuilt shimmer sensor This would lower the cost of producing our product significantly as you can get triple access accelerometer microchips for around 17 each but if bought in mass quantities it would cost pennies on the dollar The same goes for the gyroscope microchips which are roughly 25 a piece but will be significantly cheaper if bought in large quantities Thus allowing us to produce our capstone design fairly cheaply As far as sustainability is concerned the product can continue to be produced as long as shimmer sensors or at least a gyroscope and an accelerometer are still available in mass quantities Looking into future applications and possibly the addition of an EEG headset to allow for more control and accuracy we can see that in the big picture the costs won t change by much The EEG headset will cost around 750 The breakdown of total cost for products are as follows Our demo implementation 350 per Shimmer Sensor 750 EEG headset 200 Laptop 14000 Software Development total 15300 The Software development
10. ami baat aii fe zsatiye Maam wee im 302 m xa 1957 as issi rass arana DALES cM 3041009041 TL2MOTSIE 77 03367704 Giad 1087 a Doed ist ae IST aie a eh al IONII 5 nasa T MOTTE T I sais ise 205 in i me n 150 25083 1 Gacsheesjs RNS 575091575 Teese MSE srmo ws am mo beaa iw ms 1015 30 Aya TANN Sse S747 T3 am37309 Mnwa OF La zm 210 2 ims 1625 91003 1 DOs Teles AAI a usA mame Tr sane we i 0 se oa ise itassa OORLISSLOP MMRRAMGSS ASDA SEDIE TROSTA 77 20897728 son si 29e 20t 1 19 x5 16837585 Eia kiaad 2 sbesee23 sserows S lezesye MPS MAE AD sus Ie im me 197 33 1a 708 L Iarnal Dseeesseee aM 34 cat2seaL Th FT 7802307902 VAR ite cal Te za 1957 wmm 1T aa OOALLERIIG I EEIE ire 56 4109564 TLT 06 19D TN Sted 1957 3 soe 5 ist 5 in sase Danaa MESME AJESn Seane TAOTI TASS sto ims 2333 mm 2344 ime iretiooss cose ossasseess sae Sa Tears Ta eyrete tresser se inn 2080 ao 195 3353 iesnu amanu pals sae EOSTA ish P6 72127873 78 EII we ine 2 ao pee ine W 176 1630 3 00450009 TANhd Tbe OSMTGMTE 56 DiG TLETT wma s e 194 i mu 253 ie 55 1805 Sass Oaai Seedri S SAESHASS SHOT TRESS Te sseprese TP ESSAI 5 pk ioe bem tty gnsener 1 So demer i Shimer r Vilamer i i iewer 1 Shimer 1 Miler 4 Wier j Slr l Shianer 1 ieee i Riser px Stier 1 Silene FTieertamp Acre lercmrter x he 1 11958007823 1 6 jacana r3ee39s 8 41574257425743 S5 41825680864 73 DTSOT TS 77 233377259377352129 1947 20095 2893 20
11. ase 1 if v lt 1800 down crouch return 1 Page 13 else if v gt 2300 jump return 4 break default return 1 break function to evalute which key was pressed based on value int eval int j int v switch j case 0 if v gt 2100 amp amp v lt 2500 walk left keydown tk 2 printf walk left n return 2 else if v gt 1350 amp amp v lt 1800 walk right keydown tk 3 printf walk right n return 3 break case 1 if v lt 1800 down crouch keydown tk 1 printf down n return 1 else if v gt 2300 jump keydown tk 4 printf jump n return 4 break default return 1 Page 14 break int vtok int n int i j x xnext y ynext int cur 2 int next 2 for i 0 i lt n 15 i x valuesx i xnext valuesx i 1 y valuesy i ynext valuesy i cur 0 eval 0 x next 0 sneakpeek 0 xnext cur 1 eval 1 y next 1 sneakpeek 1 ynext Sleep 20 for j 0 j lt 2 j if cur j next j keyup tk cur j int main Wait 1 second gives us time to get into our program Sleep 1000 offset 0 ip tyoe INPUT_KEYBOARD ip ki wScan 0 ip ki time 0 ip ki dwExtralnfo 0 Get rid of junk data valuesx malloc sizeof int 3000 valuesy malloc sizeof int 3000 Page 15 int numvals 0 initRead while 1 numval
12. cost however only applies to the initial device development The flat software development cost would not apply to each additional device after the first meaning it would cost 1300 for each additional device Current technologies Steven Hawking currently has arguably the most advanced wheelchair Hawking s wheelchair works through a keyboard he can operate with his thumb Hawking is a case where he still has the ability to operate a device with his hands The technology in Hawking s wheelchair cost over 40 000 There is still room for improvement in our technology Many modern phones contain gyroscopes and accelerometers These phones vary in price from 500 to 700 There are however many benefits of using a phone over a shimmer sensor Getting the technology to reach the marketplace is significantly easier through the use of cell phones because 56 of Americans Page 9 already own smart phones As phones get more advanced the cost to purchase a phone which supports the technology we require will become cheaper Our idea has very high sustainability As time passes our idea becomes more feasible and there is room for improvement As Ram capacity increases our ability to run the program and collect data improves Memory Usage per second 256 Bytes 51 bytes 13 956kB s In half an hour of use storing ever value to the file would use 23 5 mB With current cost of Ram this ram usage is significant for running the program for long per
13. ducing the delay between the inputs and outputs as much as possible Time Deviation for Various Sampling Rates 2000 1500 1000 500 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 6 9 82 85 889 500 1000 1500 2000 Figure 5 The extent at which varying sampling rates deviate from the input sampling rate inducing latency into the system The horizontal black line indicates the median human reaction time at 215ms As we can see from the above figure even a modest divergence from the exact sampling rate of 19 6ms can have profound effects over a period of time The upwards sloping green line that appears to intersect the horizontal human reaction time line at t 77ms is the result of a constant 2 4ms delay between the device sampling rate and the software sampling rate In other words by using a sampling rate of 22ms instead of the exact 19 6ms we introduce 237 6ms of delay after only 100ms Extrapolating from this data we can look forward and find out exactly how much latency there will be in the system after a certain period of time with the following formula td t r rs td time delay t time r software sampling rate rs device sampling rate 19 6ms Page 8 For example after 30 minutes of running with a 22ms sampling rate we would have a whopping 72 minutes of delay Cost and Sustainability Analysis The cost of producing our posited solution to the issue of mobility is relatively low due to the f
14. grams and devices 4 Research Challenges Due to unforeseen circumstances we were unable to procure a Electroencephalography EEG device In order to work around this we decided to use an accelerometer and gyroscope Challenges arose when figuring out a way for the Shimmer Sensor to communicate with the program in real time due to the logging rate of the sensor and data processing time Due to various forms of values that were output from the sensor we found it very difficult to properly parse the data 5 Methodology Using the Shimmer Sensor we first collect multiple signals from the x y and z axis The sensor s data is parsed and processed to separate accelerometer and gyroscope data which is then passed into the program Based on certain parameters the values of the accelerometer and gyroscope are used to determine control signals These control signals are then used to simulate keystrokes which are then used to control the various computer applications such as games Page 2 Output from Mario Game Play 3500 Sprint Left i Walk Left Fireball 2500 j 2000 X Accelerometer 2 Y Accelerometer Z Gyroscope 1500 1000 Walk Right Sprint Right o 500 1000 1500 2000 2500 Time Movementof the head Relevant data is is picked up by the passed to the Shimmer Sensor program Ts Shimmer Processing Program paaa pies Head Sensor Separates the Determine
15. hods of processing the data It could also include utilizing more mathematical techniques in order extract more artifacts from the brainwaves Venturing out in to several other platforms can prove to be very advantageous The ultimate goal for future work would be to implement a universal system that can be easily implemented into modern electronics that will allow people to communicate with multiple devices at once This will allow them to have greater control over their environment Overview 1 Goals Our main goal was to create a way for people suffering from paralysis or degenerative diseases to be able to control devices using simple head movements Using this control system we aimed to control devices such as motorized wheelchairs As a proof of concept we scaled down our goal to implement a game using a Shimmer Sensor which is an accelerometer and gyroscope See Below We collected the data from the sensor and then processed the data into controls Page 1 2 Motivations The current systems in place for people with limited mobility do not satisfy their needs for a reliable and affordable system that can be used to control everyday things Our motivation was to fulfill these needs 3 Objectives Our primary objective is to have real time control of a computer game while processing and immediately using the live data outputted by a Shimmer Sensor Next our objective was to broaden the scale and apply that control to many other pro
16. iods of time With the increase in the availability of Ram however this data usage will become less and less significant 10000 1000 100 p o Capacity GB 0 1 0 01 0 001 1980 1 1985 1 1990 1 1995 1 2000 1 2005 1 2010 1 2015 Year You can see in the above figure that ram capacity has increased over the last 30 years A problem that our implementation is currently facing is processing speed The delay slowly increases over time due to the fact that the data is written to the file faster than it can be processed This problem will become less of an issue as the number of cores increase on CPUs Our test were performed on a intel quad core which is a relatively out of date CPU The cores on the Intel 17 processor is 1 2 GHZ faster than on the quad core we used Using an up to Page 10 date processor should easily remedy the small lag problem that currently exist A problem with switching to a faster processor is a larger monetary cost The average price for an Intel i7 is 350 compared to the price of quad core we used which is approximately 100 This cost will be offset by the steady decrease in cost of processors Implementing this technology seams very viable considering the cost are relatively low and are shown to decrease over time It is our belief for this technology to be successful it should wait 5 years before it is released As the power of smart phones improve and there availability increases Gyroscope contro
17. lled technology will be more and more advantageous as the smart phone market gross and its production cost increase Conclusion All in all it can be seen that we did in fact manage to fulfill the intended goals for the application of this project By using a Shimmer Sensor we were able to read in gyroscope and accelerometer data in real time which allowed us to determine which direction and to what extent the user was tilting his or her head As described above upon reading in the signals we parsed the data from the Shimmer Sensor such that we were only left with those pertinent to us We then were able to determine the direction by using the data from the Shimmer Sensor to create control signals These control signals each represented a distinct action in the game and we were then able to apply the user s inputs to the Super Mario Bros game by simulating these directions as keystrokes Though this is an interesting achievement in and of itself what truly excited us was the prospect of being able to widen the scope of this project to more useful applications For example controlling a wheelchair or perhaps turning on home appliances for those who do not have the movement of their upper body This project was heavily reliant upon Human Computer Interaction and that is the direction that we would hope that this project could continue to go in the future In this age more than ever we are intertwined with the technology around us i e smartpho
18. nes tablets etc and this unity with technology will only strengthen over time It is for that reason that we want to continue down the path we are currently on Perhaps one day we can integrate the EEG device we mentioned earlier This in turn would mean that the user could suffer from full body paralysis and still be able to function on a normal day to day level controlling various electronics around them with just their thoughts What we did here in our eyes was simply a first step of a much grander concept This project acted as a proof of concept which we could expand upon continuing to use the Human Computer Interface model to create a piece of technology that seamlessly and cohesively works to ultimately help those who cannot move at all Bibliography 1 Shimmer Connect User Manual Rev 0 1 1a 2 Shimmer MATLAB Instrument Driver Library User Manual Rev 1 8a Page 11 3 Burns Adrian SHIMMER A Wireless Sensor Platform for Noninvasive Biomedical Research IEEE SENSORS JOURNAL 4 Ingle Vinay K and John G Proakis Digital Signal Processing Using MATLAB Pacific Grove CA Brooks Cole 2000 Print 5 Smith Steven W The Scientist and Engineer s Guide to Digital Signal Processing San Diego CA California Technical Pub 1997 Print 6 EEG Stuttgart Thieme 2010 Print 7 Sanei Saeid and Jonathon Chambers EEG Signal Processing Chichester England John Wiley amp Sons 2007 Print
19. osition in offset fp fopen mario csv r fseek fp 0 SEEK END offset ftell fp fclose fp Page 17 Shimmer h Contains the function prototypes for shimmer c as well as variable declarations for variables shared between shimmer c and controller c ifndef SHIMMER _H_ define SHIMMER _H_ include lt stdio h gt include lt stdlib h gt include lt string h gt include lt windows h gt FILE fp long offset int valuesx int valuesy int values void initRead int shimmerRead void shimmerParse char s int n endif Makefile tool to easily compile our code using commands like make all and make control or make shimmer alias that exists so make all compiles the control program all control compile link to one executable control controller o shimmer o gcc controller o shimmer o o control compile only the controller c file for performance purposes controller o controller c shimmer h gcc c controller c compile only the shimmer c file for performance purposes shimmer o shimmer c shimmer h gcc c shimmer c remove compiled files Page 18 clean rm rf o rm f control exe Page 19
20. s Fireball B Quick Head Nod to the Right Our most important result was proving our concept With just a few control signals and one shimmer sensor we have shown that is it possible to have someone with very limited mobility control a computer game This control system can be scaled to many more Page 4 applications and can be used to control numerous devices With further research and development it is possible to create an intensive control system that will greatly increase the capabilities of those with limited mobility and increase their value of life Methods and Results As explained before the Shimmer sensor measures accelerometer and gyroscopic data which is then written to a file via Shimmer s proprietary control program Our first challenge was with reading the data from this file more specifically how to read only the data we needed in order to reduce memory overhead Sherer i minme Eome i Simmer inane 5 Shinma i irme 3 Shime Imeem Sherer i Stine i Shen 1 Seiverert Severe Vievene Atcelerometer E Accecciernenes V Acreienometer Groscose Grice Y Groencect Trenino Accenmrerete K Aceclereretes Vacereomete 2 Gyesoope r Gyroscope Gwestope PAY Ww nw RAW sW naw EAN al N Tar om cL cA cL Wo wrt Ris unit Nona No umir Roana No uan Moone mieca ryisec 2 misec miicer 2 nepret Segret aegieer se ist im mui 25 ise 5 15117258 Lossa EDOS 55 SAJAST TORTI PAOLI soe 191 2m mm 28 iss 2355 Dears Aakn pAlses i984 pani
21. s shimmerRead vtok numvals return 0 Shimmer c Contains functions that read the file and parse the data Basically we open the file seek to the end then save the position of the file pointer This synchronizes our program with the shimmerconnect program so the next data we read is the most recent data written to the file Then we pass the string we read to the parse function so that we re only storing the data that we need include shimmer h define LINESIZE 256 int shimmerRead char buffer malloc sizeof char LINESIZE int i int offset2 long sum 0 int numlines 0 do fp fopen mario csv r fseek fp 0 SEEK_END offset2 ftell fp if offset2 lt offset 1000 fclose fp while offset2 lt offset 1000 fseek fp offset SEEK_SET Get rid of garbage header for i 0 i lt 4 i fgets buffer LINESIZE fp Page 16 while fgets buffer LINESIZE fp NULL shimmerParse buffer numlines numlines free buffer offset ftell fp numlines fclose fp return numlines void shimmerParse char s int n int counter 0 char pch malloc sizeof char 50 pch strtok s do if counter 1 printf Y es n pch valuesx n atoi pch else if counter 2 valuesy n atoi pch pch strtok NULL counter while counter lt 3 void initRead Open file seek to end save fp p
22. s control na atar Movement f Collects X Y Z data we need the Control P applications Signals Signals The sensor Control Signals passes all are passes to the information application collected 6 Results Computer Game Results We found that a user with limited mobility would successfully be able to play the computer game with only using the movement of their head The control signals corresponded to the following movements Page 3 Walk Left Tilt Slight Left Fire Ball Quick Nod Right Walk Right Tilt Slight Right Jump Tilt Slight Backwards Squat Tilt Slight Forward Sprint Left Tilt Far Sprint Right Tilt Left Far Right This diagram show a Nintendo controller and which head movements correspond to which buttons in Super Mario Brothers This control system can also be applied to other games with similar controls Tilt Head Right Tilt Head Up Tilt Head Left Run Right Jump Run Left This diagram shows an example of the head movements needed A better description of the head movements are below Movement in Game Corresponding Buttons Head Movement Walk Left Left Tilt Head to the Left lt 20 degrees Run Left Left and B Tilt Head to the Left gt 20 degrees Walk Right Right Tilt Head to the Right lt 20 degrees Run Right Right and B Tilt Head to the Right gt 20 degrees Jump A Tilt Head Back gt 15 degrees Squat Down Tilt Head Forward gt 15 degree
Download Pdf Manuals
Related Search
Related Contents
Manual do Utilizador User`s Manual SERVICE MANUAL SPT 1800 Series Product Reference Guide ge.08-22982 nations unies объединенные нации united nations __ Copyright © All rights reserved.
Failed to retrieve file