Hello there,
One more lesson from the "Sunfounder 37 modules Sensor Kit for Raspberry Pi Model B". This one was a bit more interesting. Digging down into what is a Thermistor.
Analogue Thermistor KY-013 |
Well here the fun was in getting an actual temperature value. The original C code from the files "analogTempSensor.c" and "analogTempSensor2.c" is working fine, however I still do not understand what the values represent. Neither in the code or in the documentation explains what is going on. All what this C code does is to read the value from the ADC0832 and substract 60 or 140. Well, as I said, I am still scratching my head around this code.
Thermistor analog + digital |
Analog pin reading running Ex11_01
This sensor is very sensitive so I let it run for a few second or minutes to test if the temperature reading was actually adjusting to variations. So a lot of window open and close events happen during testing ;-)
The Ex11_02_AnalogTempSensor is a simple implementation to detect the pin high or low value. The threshold is adjusted using the blue potentiometer. Running the first exercise code Ex11_01_AnalogTempSensor is an easy way to adjust the potentiometer to the desired threshold value, because the temperature readings are printed on the console.
The Ex11_02_AnalogTempSensor is a simple implementation to detect the pin high or low value. The threshold is adjusted using the blue potentiometer. Running the first exercise code Ex11_01_AnalogTempSensor is an easy way to adjust the potentiometer to the desired threshold value, because the temperature readings are printed on the console.
Digital pin reading running Ex11_02
For full details about how to set up your Raspberry Pi and how to run these exercises please check out my old post Raspberri Pi with Pi4j and Junit testing mockups. Or leave me a comment if you have any issue or question.
That is all, I hope it helps
Thanks for reading
Keep on hacking
Keep on hacking
Posted by Marc Andreu.
No comments:
Post a Comment