Read temperature from 1-wire in Beaglebone Black [BBB] / Raspberry Pi

debian@beaglebone:/$ cd /sys/bus/w1/devices
debian@beaglebone:/sys/bus/w1/devices$ ls
10-00080216a25a  10-00080216c818  28-031644d030ff  28-03164757c8ff  28-041651ca4dff  w1_bus_master1
debian@beaglebone:/sys/bus/w1/devices$ cat 10-00080216a25a/w1_slave
2d 00 4c 47 ff ff 02 10 51 : crc=51 YES
2d 00 4c 47 ff ff 02 10 51 t=22625
debian@beaglebone:/sys/bus/w1/devices$

cd to the folder /sys/bus/w1/devices
list files using ls
if any 1-wire sensors are connected it will appear here as below.
10-00080216a25a 10-00080216c818  28-031644d030ff  28-03164757c8ff  28-041651ca4dff 
Above are connected 1-wire temperature sensors.
DS18S20 [Starts with id 10-xxxx] and DS18B20  [Starts with id 28-xxxx] sensors
To read temperature read the file w1_slave of any sensor using command ‘cat’

Temperature is read as 22.625 ºC

Beaglebone http server lighttpd setup

debian@beaglebone:~$ sudo nano  /etc/lighttpd/lighttpd.conf

doc_root="/var/www/html"
server.modules = ( "mod_access",
                 "mod_alias",
                 "mod_compress",
                 "mod_redirect",
         #       "mod_rewrite", )
server.document-root        = "/var/www/html"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80
index-file.names           =
("index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
.
.

Using /etc/rc.local for startup settings in Beaglebone Black (BBB)/Raspberry Pi

debian@beaglebone:/$ nano /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#export gpio, configure pin for output and set permissions to allow all users
#GPIO PIN SETUP
echo 66 > /sys/class/gpio/export
chmod 666 /sys/class/gpio/gpio66/value
chmod 666 /sys/class/gpio/gpio66/direction
echo out > /sys/class/gpio/gpio66/direction
echo 67 > /sys/class/gpio/export
chmod 666 /sys/class/gpio/gpio67/value
chmod 666 /sys/class/gpio/gpio67/direction
echo out > /sys/class/gpio/gpio67/direction

echo 68 > /sys/class/gpio/export
chmod 666 /sys/class/gpio/gpio68/value
chmod 666 /sys/class/gpio/gpio68/direction
echo out > /sys/class/gpio/gpio68/direction
#GPIO PIN SETUP END

#PWM PIN SETUP
chmod 666 /sys/devices/ocp.*/pwm_test_P9_14.*/duty
chmod 666 /sys/devices/ocp.*/pwm_test_P9_16.*/duty
chmod 666 /sys/devices/ocp.*/pwm_test_P9_29.*/duty
chmod 666 /sys/devices/ocp.*/pwm_test_P9_14.*/period
chmod 666 /sys/devices/ocp.*/pwm_test_P9_16.*/period
chmod 666 /sys/devices/ocp.*/pwm_test_P9_29.*/period
#PWN PIN SETUP END
exit 0

Using crontab to run a program at startup on Linux/Beaglebone/Raspberry Pi

debian@beaglebone:/$ crontab -e

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command

@reboot sleep 60 && /{full path to your program}
example @reboot sleep 60 && /home/debian/myproject/dist/Release/GNU-Linux/myprog