Class.Sl974 History

Hide minor edits - Show changes to output

Changed lines 12-13 from:
'''Picture A:''' When I let the sensor stretch as original form, graph is very smooth (A).
to:
'''Picture A:''' When I let the sensor stretch as original form, graph was very smooth (A).
Changed lines 15-16 from:
'''Picture B:''' When I bend the sensor to the position that suitable for pressing, the data has some noise(B).
to:
'''Picture B:''' When I bent the sensor to the position that suitable for pressing, the data had some noise(B).
Changed lines 18-19 from:
'''Picture C:''' When I start pressing it, the data is dramatically change (c).
to:
'''Picture C:''' When I started pressing it, the data was dramatically changed (C).
Changed line 57 from:
Datalogger\\
to:
Datalogger
Changed lines 59-65 from:
*/\\

import processing.serial.*;\\

Serial myPort; // The serial port\\

// initial variables:\\
to:
*/

import processing.serial.*;

Serial myPort; // The serial port

// initial variables:
Changed lines 26-27 from:
!!!!+++This is a code for pic+++
to:
''''+++This is a code for pic+++ ''''
Changed lines 54-55 from:
!!!!+++This is a code for processing+++
to:
''''+++This is a code for processing+++''''
Changed lines 21-24 from:
'''Picture 2:''' Form this testing, I found that it was very dificult to estimate giving the same value of force to the sensor again. And character of graph was very unstable.
to:
'''Picture 2:''' Form this testing, I found that it was very dificult to estimate giving the same value of force to the sensor again.\\
And character of graph was very unstable.
Changed lines 29-53 from:
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 20 ' Set sampling time in uS

SensorValue var word

' serial pins and data reate:
tx var portc.6
rx var portc.7
n9600 con 16468

' Set PORTA to all input
TRISA = %11111111
' Set up ADCON1
ADCON1 = %10000010

Main:
' read sensor on pin RA0:
ADCin 0, sensorValue
serout2 tx, n9600, [sensorValue]
pause 100
Goto main
to:
DEFINE ADC_BITS 10 ' Set number of bits in result\\
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)\\
DEFINE ADC_SAMPLEUS 20 ' Set sampling time in uS\\

SensorValue var word\\

' serial pins and data reate:\\
tx var portc.6\\
rx var portc.7\\
n9600 con 16468\\

' Set PORTA to all input\\
TRISA = %11111111 \\
' Set up ADCON1\\
ADCON1 = %10000010 \\

Main:\\
' read sensor on pin RA0:\\
ADCin 0, sensorValue\\
serout2 tx, n9600, [sensorValue]\\
pause 100\\
Goto main\\
Changed lines 56-65 from:
/*
Datalogger
modify form Tom Igoe Datalogger Code
*/

import processing.serial.*;

Serial myPort; // The serial port

// initial variables:
to:
/*\\
Datalogger\\
modify form Tom Igoe Datalogger Code\\
*/\\

import processing.serial.*;\\

Serial myPort; // The serial port\\

// initial variables:\\
Changed line 69 from:
void setup () {
to:
void setup () {\\
Changed line 91 from:
line(i, height, i, (height - inByte)-20);
to:
line(i, height, i, (height - inByte)-20);
Changed lines 25-26 from:
!!!+++This is a code for pic+++
to:
!!!!+++This is a code for pic+++
Changed lines 53-54 from:
!!!+++This is a code for processing+++
to:
!!!!+++This is a code for processing+++
Changed lines 5-6 from:
Then I just send raw data from FlexiForce to processing via serial to check the character of the data of this sensor.
to:

And then,
I just send raw data from FlexiForce to processing via serial to check the character of the data of this sensor.
Changed lines 25-26 from:
''+++This is a code for pic+++''
to:
!!!+++This is a code for pic+++
Changed lines 53-54 from:
''+++This is a code for processing+++''
to:
!!!+++This is a code for processing+++
Changed lines 4-5 from:
I use Flexiforce as a sensor for testing in this datalogging project. Then I just send raw data from FlexiForce to processing via serial, and then check the character of the data.
to:
I use [[http://www.tekscan.com/flexiforce.html|Flexiforce]] as a sensor for testing in this datalogging project.
Then I just send raw data from FlexiForce to processing via serial to check the character of the data of this sensor.
Changed lines 23-24 from:
'''This is a code for pic'''
to:
''+++This is a code for pic+++''
Changed lines 51-52 from:
'''This is a code for processing'''
to:
''+++This is a code for processing+++''
Added lines 1-3:
!!!! Assignment 2: datalogging
by Nont
Changed lines 7-8 from:
to:
'''Picture 1:'''
Changed lines 10-11 from:
to:
'''Picture A:''' When I let the sensor stretch as original form, graph is very smooth (A).
Changed lines 13-14 from:
to:
'''Picture B:''' When I bend the sensor to the position that suitable for pressing, the data has some noise(B).
Changed lines 16-17 from:
to:
'''Picture C:''' When I start pressing it, the data is dramatically change (c).
Changed lines 19-20 from:
to:
'''Picture 2:''' Form this testing, I found that it was very dificult to estimate giving the same value of force to the sensor again. And character of graph was very unstable.


'''This is a code for pic'''

' Define ADCIN parameters
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 20 ' Set sampling time in uS

SensorValue var word

' serial pins and data reate:
tx var portc.6
rx var portc.7
n9600 con 16468

' Set PORTA to all input
TRISA = %11111111
' Set up ADCON1
ADCON1 = %10000010

Main:
' read sensor on pin RA0:
ADCin 0, sensorValue
serout2 tx, n9600, [sensorValue]
pause 100
Goto main


'''This is a code for processing'''

/*
Datalogger
modify form Tom Igoe Datalogger Code
*/

import processing.serial.*;

Serial myPort; // The serial port

// initial variables:
int i = 1; // counter
int inByte = -1; // data from serial port

void setup () {
size(350, 280); // window size

// List all the available serial ports
println(Serial.list());

//I use COM4 so I open Serial.List()[1]
myPort = new Serial(this, Serial.list()[1], 9600);

// set inital background:
background(100);
}
void draw () {
if (myPort.available() > 0) {
inByte = myPort.read();
serialEvent();
}
}

void serialEvent () {
// draw the line:
stroke(255,255,75);
line(i, height, i, (height - inByte)-20);
// at the edge of the screen, go back to the beginning:
if (i >= width) {
i = 0;
background(100);
}
else {
i++;
}
}
Added lines 1-13:
I use Flexiforce as a sensor for testing in this datalogging project. Then I just send raw data from FlexiForce to processing via serial, and then check the character of the data.

http://www.unmodern.com/sensorpics/datalogger.jpg

http://www.unmodern.com/sensorpics/a.jpg

http://www.unmodern.com/sensorpics/b.jpg

http://www.unmodern.com/sensorpics/c.jpg

http://www.unmodern.com/sensorpics/datalogger2.jpg