Tag Archives: piGrow

Raspberry Pi Thermal Probe

How to read a temperature probe, save the value to a MySQL database and then show the value on a webpage or just show the value with no database.

 

See this link for how to setup a DS18B20+ thermal probe with a Raspberry Pi, these instructions  are the best that i have come across for this and will cover the bullet points below :

  • Enabling the 1 wire features in the Raspbian OS
  • Physically connecting the probe via a resistor to the RPi
  • Instructions on how to read the probe and a script example

https://www.modmypi.com/blog/ds18b20-one-wire-digital-temperature-sensor-and-the-raspberry-pi

Once you have followed the above steps you should have a working temperature probe, that’s great.. but what can you do with it now!?

For the piTank/piGrow projects,  I started off by just using the script provide in the instructions above, modifying it slightly and using that to display the temperature value on the piTank web-page. Using some JavaScript you can make the box’s refresh every x seconds, running the probe read script and showing a new value without the need for a page reload.  I call this a ‘live’ reading.

Continue reading Raspberry Pi Thermal Probe

Raspberry Pi GPIO Start-up Script

On powering/reset of the Raspberry Pi connected to a relay board, the state of the relays needs to be defined or they just sit in limbo until their first use, this might be fine in some application but not others..

For my Raspberry Pi  aquarium system, the ‘original‘ Web UI does have a script on loading the webpage to define the pin modes but if there is a power cut and the RPi is restarted, we need these values set and activated when the RPi boots in case nobody loads the piTank webpage directly after a reboot – thus critical components wont be turned on.

The fix to this issue is gpiobootscript.sh

GPIO Readall

Continue reading Raspberry Pi GPIO Start-up Script