NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » Modified Tempsensor Program!!!!
June 21, 2009 by dylanjkj1997 |
OK, I got my variation of the temperature sensor program done, thanks to the help of you guys and the Nerdkits staff! There is a video here. Two questions:
|
---|---|
June 21, 2009 by mcai8sh4 |
Hi dylan, I saw the temperature increasing when the battery was low (or if there was a lot of load on it). I put this down to (and someone will correct me if I'm wrong) the ADC compares the voltage from the sensor with the voltage from the +5 rail. If the rail voltage alters (or is low) then the comparison is different, thus giving a false reading for the temperature. To graph the temperature (I've just played with this), check out the meat thermometer program, included with the code is a python script that does the graphing for you. You can use the meat thermometer program with the standard temp sensor circuit and then run the pc-pygame.py program to graph the results. There may be some tweaking needed to get everything to how you want it, but the basics are there (I call them the basics but I dont really understand them). Hope this helps. |
June 21, 2009 by mcai8sh4 |
BTW - nice video. I like the idea of having a temperature scale based around room temperature, nice touch. Keep making the vids! |
June 21, 2009 by dylanjkj1997 |
Thanks Mcai8sh4, I'll try the graph on the meatsensor program. Also, about the temperature sensor, can I run a seperate battery on it? Or does it have to be the same one? Thanks for your help, I really appreciate it :) |
July 13, 2009 by dylanjkj1997 |
How do I run the python script? And will the python show the graph or do I have to download a program to do that? Please help! Thanks. |
July 13, 2009 by mcai8sh4 |
Hi Dylan, the python script needs to be 'interpreted' by python. Go get it to run you must download and install python (I assume you are using windows) you can get it from HERE I think the process is quite simple, but I don't use Win so I'm not sure on the details. For it to run I imagine that you need the libraries that it uses - these are the import lines at the top of the program, ie.
once these are installed on your machine, I think it should all work. Like I mentioned, I haven't used python on windows so I'm not sure on the details, but I hope this points you in the right direction. |
July 13, 2009 by dylanjkj1997 |
There are millions of pythons! Which one should I use? |
July 14, 2009 by mcai8sh4 |
I have verion 2.5.2 installed, but the recommended current version seems to be 2.6 The windows version can be downloaded from here : Python2.6.2 (32bit version) I haven't tried this on windows, so maybe somone else with more experiance could help better. If I was installing it on windows, thats the one I'd go for. |
July 14, 2009 by dylanjkj1997 |
I downloaded it, but what do I have to open and what do I have to do? |
July 14, 2009 by mcai8sh4 |
I'm just guessing here (I've not done this). Try double clicking the .msi file. That should install python onto your machine. After that test it's ok with something along the lines of
if you don't get any errors then python in installed correctly. Then comes the bit I can't help you with - downloading and installing the import files mentioned before. I'm not sure if everything will run ok on windows (I've never used python on win). Hopefully someone who has a little more experience than me will be able to step in and assist you further if you still get stuck. Best of luck, keep us all posted on how you get on (and if you get it working, maybe tell us all how you did it) |
July 15, 2009 by dylanjkj1997 |
Maybe I should E-mail support. The mac version sounds a bit different. When I download it I get two main files. Python (command line) and IDLE (Python GUI). If nobody knows how to do it on windows, then I'll ask support. |
August 05, 2009 by pbfy0 |
I think you need the PySerial module to connect to the nerdkit with python. here are download links: win version other OSs . this should help if you get an error about importing serial. |
Please log in to post a reply.
Did you know that Pulse Width Modulation (PWM) can be used to control the speed of a motor digitally? Learn more...
|