Category Archives: Raspberry Pi

Raspberry Pi Enable Cron

By default,  Cron is disabled meaning anything entered into  ‘crontab’ wont be run.

To enable this function, follow the steps below:

Once logged into the Pi use the below command to open up the ‘rsyslog.conf’ file in the Nano editor

cd/etc
sudo nano rsyslog.conf

Once the rsyslog is loaded into nano, navigate to the below section and un-comment the ‘cron’ option

#
# First some standard log files.  Log by facility.
#
auth,authpriv.*              /var/log/auth.log
*.*;auth,authpriv.none          -/var/log/syslog
cron.*                          /var/log/cron.log
daemon.*                        -/var/log/daemon.log
kern.*                          -/var/log/kern.log
lpr.*                           -/var/log/lpr.log
mail.*                          -/var/log/mail.log
user.*                          -/var/log/user.log

Save the document by pressing CTRL + O and then CTRL+X  close the editor.

Reboot the Raspberry Pi:

sudo reboot

Raspberry Pi Real Time Clock (RTC)

How to setup a Real Time Clock on a Raspberry Pi B v1.1

 

If you didn’t know, the Raspberry Pi doesn’t hold the time very well, this is because there is no on board Real Time Clock.

1pc-DS3231-Precision-RTC-Module-Memory-Module-for-Arduino-Raspberry-Pi-

To keep the devices time accurate we need to add a module that holds the time whenever the RPi has no power running to it and then updates the RPi with the time saved on the battery powered module when the full power is restored and the system starts running again.

Continue reading Raspberry Pi Real Time Clock (RTC)

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

Raspberry Pi Aquarium Controller WebUI

So after some playing around I am going for a Windows Metro style web interface for the Raspberry Pi powered aquarium controller.  At the moment the interface can be used to view the current time and date of the system, display 2 different external temperature readings and control the 8 way 10 amp 240v relay which the filter, heater, lights and alike connect to.

piTank_WebUI_1 Continue reading Raspberry Pi Aquarium Controller WebUI