Class.JoeyNotes History

Hide minor edits - Show changes to output

Changed lines 17-19 from:
Basic table
|| border
=0
||
http://itp.nyu.edu/~jg1646/sensors/sensor_block.jpg || http://itp.nyu.edu/~jg1646/sensors/sensor_open.jpg ||
to:

|| border=0 cellspacing
=3 cellpadding=3
||
http://itp.nyu.edu/~jg1646/sensors/sensor_block.jpg || http://itp.nyu.edu/~jg1646/sensors/sensor_open.jpg ||
Changed lines 21-35 from:




http://itp.nyu.edu/~jg1646/sensors/graph_close.jpg
''A close view of the infrared detection (blue) and the times when the path was blocked (white).''



http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg
''When I was testing I have the word "Transmitting!" when transmitting successfully and
"Doh!" when blocked.''
to:
|| ||||
||
http://itp.nyu.edu/~jg1646/sensors/graph_close.jpg ||||
|| ''A close view of the infrared detection (blue) and
the times when the path was blocked (white).'' ||||
|| ||||
|| http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg ||||
|| ''When I was testing I have the word
"Transmitting!" when transmitting successfully and "Doh!" when blocked.'' ||||
Added lines 17-25:
Basic table
|| border=0
|| http://itp.nyu.edu/~jg1646/sensors/sensor_block.jpg || http://itp.nyu.edu/~jg1646/sensors/sensor_open.jpg ||
|| ''Blocking the path with my hand.'' || ''Succesful transmission.'' ||



Changed lines 29-34 from:
http://itp.nyu.edu/~jg1646/sensors/sensor_block.jpg
''Blocking the path with my hand.''

http://itp.nyu.edu/~jg1646/sensors/sensor_open.jpg
''Succesful transmission.''
to:
Changed lines 5-6 from:
Luckily I was able to use Google to find \\
someone who had successfully set it up and I used their notes as a guide: \\
to:
Luckily I was able to use Google to find
someone who had successfully set it up and I used their notes as a guide:
Changed lines 9-10 from:
Once I verified through serial communicator that the sensor duo was working, I was ready to move on to \\
sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, \\
to:
Once I verified through serial communicator that the sensor duo was working, I was ready to move on to
sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances,
Changed line 13 from:
My pictures show the data being logged over time. The blue lines indicate successful infrared detection \\
to:
My pictures show the data being logged over time. The blue lines indicate successful infrared detection
Changed lines 32-33 from:
Pic 18F452 Code
to:
'''Pic 18F452'''
Changed line 36 from:
to:
\\
Changed line 40 from:
to:
\\
Changed line 45 from:
to:
\\
Changed line 48 from:
to:
\\
Changed line 73 from:
***
to:
Changed lines 85-86 from:
***
to:
Changed lines 1-2 from:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: \\
the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have \\
to:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used:
the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have
Changed lines 34-45 from:
' call and response serial example for picBasic Pro.
' By Tom Igoe, 2003, small adjustments by Joey Guerrero

'
This example waits for a byte on the incoming serial connection,
' and checks to see that the byte equals 65.
' It then sends the values of a sensor on pin RD2.

'
this example uses two arrays to hold the ADC values,
' and the byte values that they're converted to for sending.
' serial RX is on pin RC7
' serial TX is on pin RC6
to:
' call and response serial example for picBasic Pro. \\
'
By Tom Igoe, 2003, small adjustments by Joey Guerrero \\

'
This example waits for a byte on the incoming serial connection,\\
' and checks to see that the byte equals 65. \\
'
It then sends the values of a sensor on pin RD2. \\

'
this example uses two arrays to hold the ADC values, \\
'
and the byte values that they're converted to for sending. \\
'
serial RX is on pin RC7 \\
'
serial TX is on pin RC6 \\
Changed line 16 from:
Here is a close view of the infrared detection (blue) and the times when the path was blocked (white):
to:
Changed lines 18-19 from:
Blocking the path with my hand:
to:
''A close view of the infrared detection (blue) and the times when the path was blocked (white).''
Changed lines 21-22 from:
Succesful transmission:
to:
''Blocking the path with my hand.''
Changed lines 24-30 from:

%center%
http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg
''When I was testing I have the word "Transmitting!" when transmitting successfully and "Doh!" when blocked:''
to:
''Succesful transmission.''

http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg
''When I was testing I have the word "Transmitting!" when transmitting successfully and "Doh!" when blocked.''
Changed line 31 from:
*******************************************
to:
----
Changed lines 67-70 from:
*******************************************
to:
----
Changed line 73 from:
/*
to:
***
Changed lines 85-86 from:
*/
to:
***
Changed lines 3-5 from:
been a little easier if there was some kind of [[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it. Luckily I was able to use Google to find \\
to:
been a little easier if there was some kind of
[[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it.
Luckily I was able to use Google to find \\
Changed lines 25-29 from:
When I was testing I have the word "Transmitting!" when transmitting successfully and "Doh!" when blocked:
http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg

Code
to:

%center% http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg
''When
I was testing I have the word "Transmitting!" when transmitting successfully and "Doh!" when blocked:''

Changed lines 32-33 from:
Pic 18F452
to:
Pic 18F452 Code
Changed lines 69-70 from:
Processing
to:


'''
Processing'''
Added line 14:
Here is a close view of the infrared detection (blue) and the times when the path was blocked (white):
Added line 17:
Blocking the path with my hand:
Added line 20:
Succesful transmission:
Added line 23:
When I was testing I have the word "Transmitting!" when transmitting successfully and "Doh!" when blocked:
Changed lines 1-10 from:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: //
the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have
been a little easier if there was some kind of [[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it. Luckily I was able to use Google to find
someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working, I was ready to move on to
sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, with only minor adjustments. Both are listed below.

My pictures (to come soon) show the data being logged over time. The blue lines indicate successful infrared detection while the white spaces in between are where I blocked the path from emitter to detector.
to:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: \\
the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have \\
been a little easier if there was some kind of [[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it. Luckily I was able to use Google to find \\
someone who had successfully set it up and I used their notes as a guide: \\
http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working, I was ready to move on to \\
sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, \\
with only minor adjustments. Both are listed below.

My pictures show the data being logged over time. The blue lines indicate successful infrared detection \\
while the white spaces in between are where I blocked the path from emitter to detector.
Changed lines 1-2 from:

For my Sensors and Time lab I decided to use something I had picked up last semester and never used:
to:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: //
Changed lines 11-13 from:
[[Attach:graph_close.jpg]]
to:
http://itp.nyu.edu/~jg1646/sensors/graph_close.jpg

http://itp.nyu.edu/~jg1646/sensors/sensor_block.jpg

http://itp.nyu.edu/~jg1646/sensors/sensor_open.jpg

http://itp.nyu.edu/~jg1646/sensors/transmit_doh.jpg
Added line 1:
Changed lines 12-13 from:
to:
[[Attach:graph_close.jpg]]
Changed lines 1-4 from:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have been a little easier if there was some kind of [[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it. Luckily I was able to use Google to find someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working, I was ready to move on to sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, with only minor adjustments. Both are listed below.
to:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used:
the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have
been a little easier if there was some kind of [[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it. Luckily I was able to use Google to find
someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working, I was ready to move on to
sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, with only minor adjustments. Both are listed below.
Changed lines 1-5 from:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have been a little easier if there was some kind of datasheet with it http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support). Luckily I was able to use Google to find someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working (picture), I was ready to move on to sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, with only minor adjustments.

Here are my pictures of the data being logged over time, the blue lines indicating successful infrared detection, and the white spaces in between where I blocked the path from emitter to detector.
to:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have been a little easier if there was some kind of [[http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support | datasheet ]] with it. Luckily I was able to use Google to find someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working, I was ready to move on to sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, with only minor adjustments. Both are listed below.

My pictures (to come soon) show the data being logged over time. The blue lines indicate successful infrared detection while the white spaces in between are where I blocked the path from emitter to detector.



Code

*******************************************
Pic 18F452

' call and response serial example for picBasic Pro.
' By Tom Igoe, 2003, small adjustments by Joey Guerrero

' This example waits for a byte on the incoming serial connection,
' and checks to see that the byte equals 65.
' It then sends the values of a sensor on pin RD2.

' this example uses two arrays to hold the ADC values,
' and the byte values that they're converted to for sending.
' serial RX is on pin RC7
' serial TX is on pin RC6

' constant to set the baud rate:
inv9600 con 16468

' define variables:
'adcVar var word(3)
byteVar var byte(3)
channel con 2
inByte var byte

' main:

IF portd.2 then
byteVar(channel) = 1 ' Ascii 1
serout2 portc.6, inv9600, [byteVar(2)]
' serout2 portc.6, inv9600, ["Transmitting!", 13,10]
ELSE
byteVar(channel) = 0 ' Ascii 0
serout2 portc.6, inv9600, [byteVar(2)]
' SEROUT2 portc.6, 16468, ["Doh!", 13,10]
endif

*******************************************

Processing

/*
Datalogger
by Tom Igoe

This program takes raw bytes from the serial port at 9600 baud and graphs them.
To start/stop the graph, click the mouse.

No graphing is done when the incoming value is below a constant threshold.
You can only change the threshold in code. I haven't made a UI for that.

Created 20 April 2005
Updated 5 July 2005
*/

import processing.serial.*;

Serial myPort; // The serial port

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

void setup () {
size(400, 300); // window size

// List all the available serial ports
println(Serial.list());
// I know that the third port in the serial list on my mac
// is always my Keyspan adaptor, so I open Serial.list()[2].
// Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[1], 9600);

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

void serialEvent () {
// draw the line:
println(inByte);
stroke(0,51,153);
line(i, height, i, height - (inByte*(height/2)));
// at the edge of the screen, go back to the beginning:
if (i >= width) {
i = 0;
background(255);
}
else {
i++;
}
}
Changed lines 1-2 from:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have been a little easier if there was some kind of datasheet with it [http://www.radioshack.com/product/index.jsp]productId=2049723&tab=support). Luckily I was able to use Google to find someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.
to:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have been a little easier if there was some kind of datasheet with it http://www.radioshack.com/product/index.jsp?productId=2049723&tab=support). Luckily I was able to use Google to find someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.
Added lines 1-5:
For my Sensors and Time lab I decided to use something I had picked up last semester and never used: the Matched Infrared Emitter and Detector from Radioshack (276-0142). The whole process would have been a little easier if there was some kind of datasheet with it [http://www.radioshack.com/product/index.jsp]productId=2049723&tab=support). Luckily I was able to use Google to find someone who had successfully set it up and I used their notes as a guide: http://www.oscarcontrols.com/coinswitch/.

Once I verified through serial communicator that the sensor duo was working (picture), I was ready to move on to sending the on/off state (1 or 0) to processing. I used the code written by Tom Igoe in both instances, with only minor adjustments.

Here are my pictures of the data being logged over time, the blue lines indicating successful infrared detection, and the white spaces in between where I blocked the path from emitter to detector.