| Rebecca Bray : ITP : Spring 2006 : Sensor Workshop Class | ||||||||
March 03 , 2006
I wanted to log the data from an analog sensor over time, using processing and PHP to create a dynamically updated html file. For the first pass, I used Tom’s code - http://www.tigoe.net/pcomp/code/archives/php/000713.shtml - for the PIC, Processing and PHP. I used a potentiometer on the board. Issue: datalog.txt was not write-enabled. [rb1551@itp ~]$ telnet itp.nyu.edu 80 Now it works! Issue: time stamp wrong. Datalog.txt log: This data came up between 6:07 and 6:09. Processing output looks like this: Wrote 2006-02-25 06:02:43 0 However, it does say Looking at php.net, I got it to display military time, but it’s still incorrect. It does show the 4 to 5 second intervals, but the incorrect minutes. Adding ,$timestamp to the php, excitingly enough, makes it 9pm on December 31st, 1969. Kate and Zach are having the same problem. Kate has emailed Tom… Oh wait – it seems to be working now! Now what I’d like to do is use a flex sensor as my analog sensor and record the data on that while simultaneously video taping the flex action with a clock in the background of the video that matches exactly the timestamp on the data. It seems like a good way to compare data with a visual reference. Links: php time - http://us3.php.net/manual/en/function.time.php
|
|
|||||||
| Back to Top | ||||||||