I am re-awakening some prior discussions, one of which is Sensors.
After making a resolution to learn Python programming which I made a year ago, I finally started a couple of weeks ago to dig into Python as used with the Raspberry Pi. I copied a script available on websites dealing with the RPi and the DS18B20 temperature sensor. The script didn't work, but the meat of the script seemed to be solid. After quite a bit of effort and modification of the script, I now have a working script which reads multiple DS18B20 sensors, prints to the screen the sensor temperatures, and logs the sensor temperatures in an output *.txt file . The *.txt file can be read into a spreadsheet or other program for analysis and graphing. Once the script is started, the monitor, keyboard and mouse can be disconnected, and the RPi will continue to log the measured temperatures.
The attached pictures show 1) the Raspberry Pi with a breakout board holding three DS18B20 sensors (more can be added); 2) the Pi set-up with an HDMI monitor and wireless keyboard and mouse; 3) a screen display of the output from the sensors; and, 4) a screen print of the output *.txt file.
The script I modified and wrote works with the RPi (Jessie) version of Python 3.4.2. It already is usable with a wired connection to multiple DS18B20 sensors for temperature measurement and logging. The logging interval can be specified, and the script allows naming of the output file. The next steps will be to write scripts for the Pi a) to turn on/off and/or control the speed/position of various devices, such as circulators, fans, dampers, etc.; b) to send output to digital panel meters; c) to send logging output via wifi to a remote computer; d) to think of more things to do with the RPi.
The last programming I did was in the early 1980's with dBase III and Clipper. Python seems to be a good and flexible language to learn. The RPi so far is proving to be an amazing little computer. Having the ability to understand available scripts and modify them, as well as writing new scripts, lends great flexibility in developing a customized control system and a host of other applications.
After making a resolution to learn Python programming which I made a year ago, I finally started a couple of weeks ago to dig into Python as used with the Raspberry Pi. I copied a script available on websites dealing with the RPi and the DS18B20 temperature sensor. The script didn't work, but the meat of the script seemed to be solid. After quite a bit of effort and modification of the script, I now have a working script which reads multiple DS18B20 sensors, prints to the screen the sensor temperatures, and logs the sensor temperatures in an output *.txt file . The *.txt file can be read into a spreadsheet or other program for analysis and graphing. Once the script is started, the monitor, keyboard and mouse can be disconnected, and the RPi will continue to log the measured temperatures.
The attached pictures show 1) the Raspberry Pi with a breakout board holding three DS18B20 sensors (more can be added); 2) the Pi set-up with an HDMI monitor and wireless keyboard and mouse; 3) a screen display of the output from the sensors; and, 4) a screen print of the output *.txt file.
The script I modified and wrote works with the RPi (Jessie) version of Python 3.4.2. It already is usable with a wired connection to multiple DS18B20 sensors for temperature measurement and logging. The logging interval can be specified, and the script allows naming of the output file. The next steps will be to write scripts for the Pi a) to turn on/off and/or control the speed/position of various devices, such as circulators, fans, dampers, etc.; b) to send output to digital panel meters; c) to send logging output via wifi to a remote computer; d) to think of more things to do with the RPi.
The last programming I did was in the early 1980's with dBase III and Clipper. Python seems to be a good and flexible language to learn. The RPi so far is proving to be an amazing little computer. Having the ability to understand available scripts and modify them, as well as writing new scripts, lends great flexibility in developing a customized control system and a host of other applications.