PDA

View Full Version : Newbie question: Best way to record light level



zeng
12-10-2007, 06:59 PM
I have a 8/8/8 and Phidget light sensor. What is the best way to record light level for sevral minutes, sampling as often as possible?

DanH
12-11-2007, 12:09 PM
Depending on the programming language you are working in, you should just use the event "onSensorChange" to write data to a file. You could use an if then statement to select the analog input that the sensor is one.

What programming language are you using?

zeng
12-12-2007, 01:32 AM
Thank you Dan for your advice. I actually is going to learn one of those languages and not sure which one to learn. Which would you recommend for someone who has not written codes except some autoit scripts?

Tymtravler
12-12-2007, 07:57 AM
Zeng
Alex recommended C# 2005 to me and I am glad he did. Several books on the language are available at Boarders Books, plus Microsoft also has lessons on site. To me it is easier then C++ and it seems alot of hardware is C# friendly. But that is my input, take to for what it is, I to am learning C# and so far it ain't bad.

Tymtravler

Alex
12-13-2007, 02:28 PM
Thanks Tymtravler! I'm glad you're diggin C#. Let me know (or post in the software and programming forum (http://forums.trossenrobotics.com/forumdisplay.php?f=21)) if you have any stumbling blocks that you need a hand getting over, I'm more than happy to help:D

Zeng:
Yes, I highly recommend learning C# 2005, not only for the excellent points that Tymtravler pointed out, but also most of code examples in the Phidgets documentation PDF's are using C#.

Check it out (click on PhidgetInterfaceKit 8/8/8 under "The Phidgets"):

http://www.phidgets.com/information.php

Matt
12-13-2007, 11:02 PM
Also, Look into the MS Express version of the languages. They are free and are only very slightly constrained versions of the full thing. A great way to get started without spending a dime!

http://www.microsoft.com/express/

Also check out the coding4fun site that Ms runs which has lots of fun tips, projects, and info for the new programmer:

http://blogs.msdn.com/coding4fun/

Alex
12-14-2007, 09:53 AM
My bad, guess I should've been a little more specific;)

That's what I meant, C# 2005 Express. As Matt pointed out, it is free and only slightly constrained of the full version. Don't look download the 2008 version because the programming is a bit different and is not what Phidgets used when they put together their documentation. It'll be a bit more difficult for you to get started programming with Phidgets if you use 2008 C# Express.

C# 2005 Express and the rest of the 2005 Express languages are a little hard to find on the link Matt provided, so here's the link to the 2005 Express family:

http://www.microsoft.com/express/2005/