12 December 2011

Device That Allows Using the Arm as a Touch screen - Muthu Visagan V, III B.Tech IT 'A'

Device That Allows Using the Arm as a Touch screen

Chris Harrison at Carnegie Mellon University and Dan Morris and Desney Tan at Microsoft's research lab in Redmond, Washington, recently came up with their latest invention called Skinput, which represents a skin-based interface that makes it possible for a person to use his or her palm as a touch screen. The Skin put can be used to play games, control various devices, make phone calls and surf the Internet. The invention features a keyboard, menu and a number of other graphics that appear of the user's palm and forearm. The graphics are generated by a pico projector that in incorporated in an armband. When the user touches a certain point on his or her palm, the acoustic detector in the armband identifies the part that was activated and performs the respective action. Scientists explain that the differences in bone density, size and mass, along with filtering effects from a person's soft tissues and joints, imply that various locations on the user's skin have different acoustic features. It is worth mentioning that the acoustic detector used in this invention is able to identify five skin locations, registering an accuracy of about 95.5 percent.

Using wireless technology, the researchers' latest invention can convey the signals to a cell phone, iPod or computer. The system was tested by 20 volunteers who gave a positive response to the device and its ability to provide fast navigation. Researchers look forward to present their latest invention in April at the Computer-Human Interaction conference which will take place in Atlanta, Georgia.

Finding the keypad on your cell phone or music player a bit cramped? Maybe your forearm could be more accommodating. It could become part of a skin-based interface that effectively turns your body into a touch screen.

Called Skin put, the system is a marriage of two technologies: the ability to detect the ultralow-frequency sound produced by tapping the skin with a finger, and the microchip-sized "pico" projectors now found in some cell phones.

The system beams a keyboard or menu onto the user's forearm and hand from a projector housed in an armband. An acoustic detector, also in the armband, then calculates which part of the display you want to activate.

But how does the system know which icon, button or finger you tapped? Chris Harrison at Carnegie Mellon University in Pittsburgh, Pennsylvania, working with Dan Morris and Desney Tan at Microsoft's research lab in Redmond, Washington, exploits the way our skin, musculature and skeleton combine to make distinctive sounds when we tap on different parts of the arm, palm, fingers and thumb.

Bone machine

They have identified various locations on the forearm and hand that produce characteristic acoustic patterns when tapped. The acoustic detector in the armband contains five piezoelectric cantilevers, each weighted to respond to certain bands of sound frequencies. Different combinations of the sensors are activated to differing degrees depending on where the arm is tapped.

Twenty volunteers tested the system and most found it easy to navigate through icons on the forearm and tap fingers to actuate commands.

"Skin put works very well for a series of gestures, even when the body is in motion," the researchers say, with subjects able to deftly scroll through menus whether they moved up and down or flicked across their arm.

The system could use wireless technology like Bluetooth to transmit commands to many types of device – including phones, iPods and even PCs. The researchers will present their work in April at the ACM Computer-Human Interaction meeting in Atlanta, Georgia.

Body control

Pranav Mistry of the Media Lab at the Massachusetts Institute of Technology warns that users will have to position the armband very precisely so the projection always appears in the right place.

Nevertheless, Skinput looks a promising idea, says Michael Liebschner, director of the Bio-Innovations Lab at Baylor College of Medicine in Houston, Texas, who has worked on bone acoustic conduction technology for gadget-to-gadget transmission.

"This sounds a very feasible approach to using the body itself as an input device," he says. "When you are immersed in a virtual game using a head-mounted 3D display, you cannot just take it off to fiddle around with control buttons. This will make things much easier."

 

MINI2440 - touch screen device open with O_NONBLOCK

  
int ghw_touch_init()
 {
 
     ts_dev = open("/dev/input/event0",O_RDONLY|O_NONBLOCK);
    if (ts_dev < 0) {
       printf("Touch screen driver: open device error!\n");
         printf("errno = %d, %s\n", errno, strerror(errno));
        return 0;
    }
    else {
    printf (" Touch screen device opened successfully! \n");
     return 1;
  }
  
  /*flush the ts device */
    ts_flush(ts_dev);
}
 
/*
   Simulates a touch screen input.
   Returns 1 if a touch change (an edge or pressed coordinate change) has
been detected
   Returns 0 if the touch level is unchanged (unpressed, or pressed and
same position).
 
   Edge  = 1, Touch screen pressed changed state.
    Edge  = 0, No touch state change.
   Level = 1, Touch screen pressed (x,y values is a (new) valid position)
   Level = 0, No touch (x,y values is the position where last touch
 stopped)
*/
  
unsigned char ghwTouchGet(unsigned char *edgep, unsigned char *levelp, int
*xp, int *yp)
{
   int nRet=0; // index;
   static unsigned short oldx = 0;
   static unsigned short oldy = 0;
   int x;
   int y;
   struct ts_sample; // *ts_samples_data, ts_data;
 
  screen_pressed=0;
  
  /* read samples from touch screen device */
  /*do {
    if (ts_input_read(ts_dev, &ts_samples[0], 1) < 0) {
      perror("ts_read");
      //close_framebuffer ();
      return;
    }
 
  } while (ts_samples[0].pressure == 0);
*/
  /* Now collect up to MAX_SAMPLES touches into the samp array. */
/*  index = 0;
  do {
    if (index < MAX_SAMPLES-1)
      index++;
    if (ts_input_read(ts_dev, &ts_samples[index], 1) < 0) {
       perror("ts_read");
      //close_framebuffer ();
      return;
    }
  } while (ts_samples[index].pressure > 0);
  printf("Took %d samples...\n",index);
 */
   getxy (ts_dev, &x, &y);
 
 //   printf ("After ts read: x=%d, y=%d \n", x, y); 
 
  /* check if x, y has changed from previous values
   * update return values accordingly
   */
  if (screen_pressed == 0) {
 
    *edgep = 0;
    *levelp = 0;
    *xp = oldx;
    *yp = oldy;
    return 0;
  }
  else {
    *edgep = screen_pressed;
    if (x != oldx || y != oldy) {
    
      *levelp=1;
      if (xp != NULL)
             *xp = (int)(x*xres/x_ts_max);
        if (yp != NULL)
           *yp = (int) (y*yres/y_ts_max);
         
      /* x = oldx; */ /* x pos */  /* we need to remap the touch screen
co-ordinates to frame buffer pixels */
        /* y = oldy; */ /* y pos */
      }
  }
 
    /* Change detection */
    nRet = (screen_pressed != 0 || (x != oldx) || (y != oldy)) ? 1 : 0; 
     oldx = x;
    oldy = y;
    return nRet;
}
 
 
int ts_input_read (int ts_dev, struct ts_sample *samp, int nr)
{
  struct input_event ev;
  unsigned char *p = (unsigned char *) &ev;
  int len = sizeof(struct input_event);
static struct ts_sample ts_temp;
  int ret = nr;
  int total = 0;
 
  while (total < nr) {
    ret = read(ts_dev, p, len);
    if (ret == -1) {
      if (errno == EINTR) {
        continue;
      }
      break;
    }
 
    if (ret < (int)sizeof(struct input_event)) {
      /* short read
       * restart read to get the rest of the event
       */
      p += ret;
      len -= ret;
      continue;
    }
 
       // printf("type= %d, code= %d, value=0x%04x\n", ev.type, ev.code,
ev.value);
        
        /*if event is SYNC event then dont have to record the x,y - just
 continue reading */
        if (ev.type == EV_SYN) continue;
        
    /* successful read of a whole event */
    if (ev.type == EV_ABS) {
      switch (ev.code) {
      case ABS_X:
        if (ev.value != 0) {
          samp->x = ts_temp.x = ev.value;
          samp->y = ts_temp.y;
          samp->pressure = ts_temp.pressure;
        } else {/*flush the ts device */
          fprintf(stderr, "tslib: dropped x = %d\n", ts_temp.x);
           continue;
        }
        break;
      case ABS_Y:
        if (ev.value != 0) {
          samp->x = ts_temp.x;
          samp->y = ts_temp.y = ev.value;
          samp->pressure = ts_temp.pressure;
        } else {
          fprintf(stderr, "tslib: dropped y = %d\n", ts_temp.y);
          continue;
        }
        break;
      case ABS_PRESSURE:
        samp->x = ts_temp.x;
        samp->y = ts_temp.y;
        samp->pressure = ts_temp.pressure = ev.value;
        samp->tv = ev.time;
        break;
        } /* end switch */
        
  #ifdef DEBUG
        fprintf(stderr, "RAW---------------------------> %d %d %d\n",
           ts_temp.x, ts_temp.y, ts_temp.pressure);