Class.DataloggingPracticeWithPotentiometer-Pinky History

Hide minor edits - Show changes to output

Changed lines 31-32 from:
After I 'personalized' Tom's code, I tested it with my PIC. It was not problem free. First, I could not get values from the Potentiometer. Processing does not seem to be reading anything. I, then, inserted a 'print' statement within my "serial event" part of the code to view the sensorValue. Nothing seems to be coming out, or, at certain instances, one value comes out but does not change when I turn the pot knob. Eventually, I realized (with some help from Doria's magic hands) that my serial cable-header connection was not stable.
to:
After I 'personalized' Tom's code, I tested it with my PIC. It was not problem free. First, I could not get values from the Potentiometer. Processing does not seem to be reading anything. I, then, inserted a 'print' statement within my '''''serial event''''' part of the code to view the sensorValue. Nothing seems to be coming out, or, at certain instances, one value comes out but does not change when I turn the pot knob. Eventually, I realized (with some help from Doria's magic hands) that my serial cable-header connection was not stable.
Changed lines 39-40 from:
->@@"'chmod ugo+rw datalog.txt"'@@
to:
->@@'''chmod ugo+rw datalog.txt'''@@
Changed lines 46-47 from:
to:
http://itp.nyu.edu/~rm1039/datalogResults.jpg
Changed lines 43-47 from:
to:
4. Finally, write the PHP script and save it in my account's public folder, along with an empty '.txt' file where all my values will be stored.
->Again, I used Tom's PHP script from the code samples and modified the filename. It worked well. I was able to finish my practice datalogging task. Hooray!

Changed lines 41-43 from:
The documentation to explain the above command, along with other simple PHP instructions can be found [[http://itp.nyu.edu/~rm1039/telnet.doc | here]]
to:
The documentation to explain the above command, along with other simple PHP instructions can be found [[http://itp.nyu.edu/~rm1039/telnet.doc | here.]]
Changed lines 41-43 from:
to:
The documentation to explain the above command, along with other simple PHP instructions can be found [[http://itp.nyu.edu/~rm1039/telnet.doc | here]]
Changed lines 37-41 from:
to:
I did not anticipate a 'non-write-enabled' text problem at all. I did not know how to resolve this and emailed Tom for help. Tom said, it needed to be write-enabled, naturally. He then instructed me to log on to my account and change to the directory where my text file is and type the following command:

->@@"'chmod ugo+rw datalog.txt"'@@
Changed lines 35-39 from:
[[http://itp.nyu.edu/~rm1039/procToNetProb1.jpg]]
to:
http://itp.nyu.edu/~rm1039/procToNetProb1.jpg
Changed lines 31-36 from:
to:
After I 'personalized' Tom's code, I tested it with my PIC. It was not problem free. First, I could not get values from the Potentiometer. Processing does not seem to be reading anything. I, then, inserted a 'print' statement within my "serial event" part of the code to view the sensorValue. Nothing seems to be coming out, or, at certain instances, one value comes out but does not change when I turn the pot knob. Eventually, I realized (with some help from Doria's magic hands) that my serial cable-header connection was not stable.

When that problem was resolved, I tried running the Processing program again. This time, I got this message alert:

[[http://itp.nyu.edu/~rm1039/procToNetProb1.jpg]]
Changed lines 17-18 from:
**Note: In the above code, the SERIN command acts as a 'block' which stops the code from running until an 'inByte' has been received. No 'if' statement needs to be done. \\
to:
**Note: In the above code, the SERIN command acts as a 'block' which stops the code from running until an 'inByte' has been received. No 'if' statement needs to be done.
Changed lines 19-24 from:
to:
3. Write the Processing code which involves the following tasks:

->a. Ask for more values for more values from the PIC.
->b. Send these values to the server, as linked to a PHP script.

->The code that I used is from Tom's "network datalogging suite". These are the Processing code revisions I needed to make to customize the Processing code for my purpose:

->1. Add my server as: itp.nyu.edu
->2. Change the '.php' filename into the filename I used for my PHP script.
->3. Write the correct account name
->4. Change the '.txt' filename into the filename of the text file I uploaded in my account to use for data storage.
Changed lines 8-9 from:
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing. \\
to:
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing.
Changed lines 8-9 from:
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing.\\
to:
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing. \\
Changed lines 8-10 from:
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing.
->The main loop of the PIC code is as follows:
to:
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing.\\

->The main loop of the PIC code is as follows: (from Tom's code sample)
Changed lines 14-19 from:
->@@SERIN@@
to:
->@@SERIN2, portc.7, 16468 [inByte]@@
->@@SEROUT2, portc.6, 16468 [adcVar]@@

**Note: In the above code, the SERIN command acts as a 'block' which stops the code from running until an 'inByte' has been received. No 'if' statement needs to be done. \\
Changed lines 13-17 from:
to:
->@@SERIN@@
Changed lines 12-16 from:
to:
->@@ADCIN 0, adcVar@@
Changed lines 11-16 from:
->->@@main:
to:
->@@main:@@
Changed lines 11-14 from:
to:
->->@@main:
Changed line 7 from:
1. Create a simple circuit with a 10K pot hooked onto the ADCIN 0 of a PIC 18F452
to:
1. Create a simple circuit with a 10K pot hooked onto the ADCIN 0 of a PIC 18F452\\
Changed lines 5-8 from:
to:
These are the steps I took to complete this assignment:

1. Create a simple circuit with a 10K pot hooked onto the ADCIN 0 of a PIC 18F452
2. Create a simple code for the PIC to read values from the pot and send it to PROCESSING. This code will be part of a 'call and response' system with Processing.
->The main loop of the PIC code is as follows:
Changed lines 3-6 from:
to:
Since datalogging and working with PHP is an unfamiliar task, I decided to start datalogging the values of a 10K potentiometer. This way, I know I am easily getting values that I can send to the net. Working with a potentiometer makes me avoid worrying if my sensor is part of any problems I may encounter in this task.
Changed lines 1-6 from:
! ! DATALOGGING WITH A POTENTIOMETER
to:
!!DATALOGGING WITH A POTENTIOMETER
Changed lines 1-5 from:
!!!DATALOGGING WITH A POTENTIOMETER
to:
! ! DATALOGGING WITH A POTENTIOMETER
Changed lines 1-6 from:
!!! DATALOGGING WITH A POTENTIOMETER
to:
!!!DATALOGGING WITH A POTENTIOMETER
Changed lines 1-4 from:
!! DATALOGGING WITH A POTENTIOMETER
to:
!!! DATALOGGING WITH A POTENTIOMETER
Changed lines 1-3 from:
!!DATALOGGING WITH A POTENTIOMETER
to:
!! DATALOGGING WITH A POTENTIOMETER
Changed lines 1-2 from:
!!!DATALOGGING WITH A POTENTIOMETER
to:
!!DATALOGGING WITH A POTENTIOMETER
Added lines 1-2:
!!!DATALOGGING WITH A POTENTIOMETER