You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
5.7 KiB

5 years ago
  1. ----------MSP430G2-LaunchPad CapTouch BoosterPack User Experience GUI-----------
  2. Ver.: 1.00 Initial Release
  3. February 2011
  4. Dung Dang
  5. MSP430 Applications
  6. Texas Instruments, Inc.
  7. --------------------------------------------------------------------------------
  8. CONTENTS
  9. I. DESCRIPTION
  10. II. APPLICATION USAGE
  11. III. PROJECT SETUP & RESOURCES
  12. IV. OTHER PLATFORM SUPPORT
  13. I. DESCRIPTION
  14. -----------------------------------
  15. Written in processing, this Windows PC GUI application communicates with the
  16. LaunchPad to receive specific capacitive touch data from the LaunchPad CapTouch
  17. BoosterPack and provides the visualization of said information in the GUI.
  18. The GUI uses a small .NET utility (FindAppUART.exe) to automatically detect
  19. a proper LaunchPad/430Emulator device connected to the PC USB port. Upon
  20. correct USB COM port discovery, the application initiates a 9600baud UART
  21. connection and starts receiving data.
  22. Upon each LaunchPad event, data is transmitted [always] via a simple '2-byte'
  23. protocol as described below.
  24. [LaunchPad] Wake up : 0xBE 0xEF
  25. [LaunchPad] Sleep : 0xDE 0xAD
  26. [CapTouch] Center Button : 0x80 0x80
  27. [CapTouch] Wheel Tap : WT WT = pos. on wheel [0-0x0F] + 0x30
  28. [CapTouch] Gesture Start : 0xFC POS = pos. on wheel [0-0x0F] + 0x20
  29. [CapTouch] Gesture Stop : 0xFB POS = pos. on wheel [0-0x0F] + 0x20
  30. [CapTouch] Gesture Update: GES POS
  31. [GES] Gesture = [0-0x0F] --> Clockwise gesture
  32. = 0x10+ [0-0x0F] --> Counter-clockwise gesture
  33. II. APPLICATION USAGE
  34. -----------------------------------
  35. 1. Startup
  36. Upon startup, the GUI checks for a valid LaunchPad USB serial COM port. If
  37. no compatible port connection is available, the GUI prompts user to plug in
  38. the LaunchPad CapTouch BoosterPack. The GUI will continue as normal whenever
  39. a LaunchPad is plugged into the PC.
  40. 2. Sleep Mode
  41. Upon start-up or after long period of inactivity, the device goes into sleep
  42. mode. The GUI grays out accordingly indicate such inactivity.
  43. Upon proximity sensor detection (wave hand 1-2 inch above the BoosterPack) the
  44. device returns to active mode and triggers the GUI to wake up as well.
  45. 3. Active Mode
  46. - The 'Center Button' press data toggles the center circle color, mimicking the
  47. behavior of the center LED on the BoosterPack.
  48. - The 'Wheel Tap' is represented by lighting up a single slice on the wheel.
  49. - The gesture tracking [Start, Stop, Update] is visualized on the wheel with
  50. the coloration of the wheel slices. Gesture can be tracked for several
  51. revolutions of the wheel, in both clockwise and counter-clockwise directions.
  52. * A hidden code/lock is embedded in the wheel. Correct sequence [similar to a
  53. rotational combination lock] reveals a secret.
  54. III. PROJECT SETUP & RESOURCES
  55. -----------------------------------
  56. Below is the directory structure of the processing project
  57. [CapTouch_BoosterPack_UserExperience_GUI] [PROJECT_ROOT]
  58. |
  59. | CapTouch_BoosterPack_UserExperience_GUI.pde <Processing appcalition code>
  60. | FindAppUART.exe <to copy to application.windows after each processing build>
  61. | README <this file>
  62. |
  63. +---[data] <images & sounds>
  64. | |---*.png
  65. | \---*.aiff
  66. |
  67. +---[application.windows] <processing java source export & binary build>
  68. | |---[lib]
  69. | |---[source]
  70. | |---CapTouch_BoosterPack_UserExperience_GUI.exe <Main application>
  71. | |---FindAppUART.exe <.NET utility to detect LaunchPad USB serial COM port>
  72. | \--- . . .
  73. Legend: [Directory]
  74. |---filename
  75. The processing application code is contained within one file,
  76. CapTouch_BoosterPack_UserExperience_GUI.pde, which must reside in a similarly
  77. named workspace-acting folder. The code invokes two additional libraries, serial
  78. [comes with processing] for serial communication through the USB COM port and
  79. pitaru.sonia_v2_9.* (available at http://sonia.pitaru.com/download.htm) for
  80. sound processing feature [optional in the GUI]. The libraries DLLs will be
  81. generated in the [application.windows] folder when the application is exported.
  82. The application also invokes a small .NET utility <FindAppUART.exe> to
  83. automatically detect a compatible LaunchPad USB COM port available to the PC.
  84. The code expects this executable file to be present locally to the effective
  85. working directory during execution.
  86. * Specifically, during debug, processing's working directory is
  87. C:\processing-1.1\java\bin and processing expects to be able to locate
  88. <FindAppUART.exe> here. For the sake of simplicity, simply create a copy of the
  89. file here.
  90. * After application export and the final application executable has been
  91. created, <FindAppUART.exe> should be placed in the same directory with the file
  92. CapTouch_BoosterPack_UserExperience_GUI.exe. By default this directory is
  93. [application.windows]
  94. !NOTE: The FindUART.exe file must be copied back into the [application.windows]
  95. directory after each export, as processing removes the entire directory during
  96. the application export process. Make sure to keep a local copy of the file
  97. FindUART.exe.
  98. IV. OTHER PLATFORM SUPPORT
  99. -----------------------------------
  100. The main application code is written in processing, a java-based language that
  101. is portable to different OS platforms such as Windows, Linux or Mac. However
  102. it utilizes the serial driver & the .NET COM port utility that is developed
  103. for Windows only. Replacing this component with the equivalent [driver] in Linux
  104. or Mac would enable a complete port of this application.
  105. Additionally, a Linux or Mac USB/COM port driver must also be installed in order
  106. to connect and communicate with the LaunchPad.