loading
1Instructables46,491Views3Comments

Tell us about yourself!

Complete Your Profile

Achievements

10K+ Views Earned a bronze medal
Show 0 More »
  • Custom Pool Controller - Arduino and Raspberry Pi

    #!/bin/bash#/etc/init.d/command_server### BEGIN INIT INFO# Provides: command_server# Required-Start: $remote_fs $syslog# Required-Stop: $remote_fs $syslog# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Starts a server to talk to arduino over /dev/ttyACM0# Description: /usr/bin/command_server.py is started and runs in the background.# This keeps the serial port open so Arduino doesn't restart every# command you send it.### END INIT INFO# Carry out specific functions when asked to by the systemcase "$1" in start) echo "Starting command_server" # run application you want to start /usr/local/bin/command_server.py & ;; stop) echo "Stopping command_server" ...see more »#!/bin/bash#/etc/init.d/command_server### BEGIN INIT INFO# Provides: command_server# Required-Start: $remote_fs $syslog# Required-Stop: $remote_fs $syslog# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Starts a server to talk to arduino over /dev/ttyACM0# Description: /usr/bin/command_server.py is started and runs in the background.# This keeps the serial port open so Arduino doesn't restart every# command you send it.### END INIT INFO# Carry out specific functions when asked to by the systemcase "$1" in start) echo "Starting command_server" # run application you want to start /usr/local/bin/command_server.py & ;; stop) echo "Stopping command_server" # kill application you want to stop killall command_server.py ;; *) echo "Usage: /etc/init.d/command_server {start|stop}" exit 1 ;;esacexit 0

    This file is a run control script. The tabs didn't paist very well, but it should still work. Let me know how it goes.

    Im using cron to run 'regular.py'. Theres so much more going on... i have an alexa skill to turn on the spa and the furnace.. too much for here.

    View Instructable »