11.07.2015 Views

WE.ARE.ABLE, social wearable augmented reality - Accademia di ...

WE.ARE.ABLE, social wearable augmented reality - Accademia di ...

WE.ARE.ABLE, social wearable augmented reality - Accademia di ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Ovviamente più viene oscurato il sensore e più i valori scendono.Fig. 59 - Lilypad in azioneIl programma xCode è sostanzialmente lo stesso <strong>di</strong> quello utilizzato per ilprimo esperimento, fatta eccezione per la IBAction sendString.I dati provenienti dal sensore sono visualizzati sull’iPad allo stesso modo dellastringa “hello word” del test precedente.- (void) readBytesAvailable:(UInt32)numBytes {NSLog(@"readBytesAvailable:");int bytesRead = [rscMgr read:rxBuffer Length:numBytes];NSLog( @"Read %d bytes from serial cable.", bytesRead);NSString *string = nil;for(int i = 0;i < bytesRead; ++i) {if (string) {string = [NSString stringWithFormat:@"%@%c",string, ((char*)rxBuffer)[i]];} else {string = [NSString stringWithFormat:@"%c", ((char*)rxBuffer)[i]];}}[NSNumber numberWithInt:[string intValue]];self.sensorValue.text = string;NSLog(@"sensor value: %@", string);}197

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!