Command line

If you type steelsquid in the command line you will get some help.
Below is a list of all commands and a brief explanation.
However, I recommend that you read this instead: 

############################################################################
Create, upgrade, configure and develop steelsquid-kiss-os.
http://www.steelsquid.org/steelsquid-kiss-os
############################################################################

reboot
Reboot the system

shutdown now -h
Shutdown the system

sudo su
Get root privilege

steelsquid download
Download a steelsquid-kiss-os.img file.
Use this to download a image to your computer, which you can then write to the sd-card.

steelsquid write </dev/sdX>
Write steelsquid-kiss-os.img to a sd-card.

steelsquid status
Print information about the device.
CPU, MEM, IP, Temp, Settings...

steelsquid search <text>
Search for a text in all help.

steelsquid help
Display this help.

steelsquid help-all
Display help from all help categories.

steelsquid help-network
Show help about network (connect to wifi)

steelsquid help-settings
Show help about settings and configurations

steelsquid help-servers
Status of servers on this system

steelsquid help-system
Show help about system and hardware

steelsquid help-upgrade
Show help how to upgrade the system

steelsquid help-utils
Extra utils: stream USB camera, rover...

steelsquid help-other
Show some other useful commands

steelsquid help-pi
IO commands for Steelsquid Kiss OS. Commands to get/set gpio and other stuff.

steelsquid help-piio
Send commands to the Steelsquid PIIO board from the command line.

steelsquid help-files
Description of some files and folders.

steelsquid help-dev
Commands for development.

steelsquid help-build
How to build a steelsquid-kiss img (reminder for me).



############################################################################
Network help (connect to wifi, vpn, download manager).
############################################################################

net status
See which access point you are connected to

net list
List all wifi network access points

net connect <number>
Connect to open wifi network.

net connect <number> <password>
Connect to protected wifi network.

net vpn-openvpn <ovpn_file> <username> <password>
Import a .ovpn file (configure vpn)

net vpn-status
Unconfigured, Configured: <name of vpn>, Connected: <name of vpn>

net vpn-connect
Connect to vpn

net vpn-disconnect
Disconnect from vpn

hostname
Show the hostname of this device

steelsquid hostname <name>
Set the hostname of this device
The changes will be implemented after you reboot your device

steelsquid download
Is download manager enabled

steelsquid download-on
Enable aria2 download manager

steelsquid download-off
Disable aria2 download manager

steelsquid download-start
Start aria2 download manager

steelsquid download-dir
Show current download directory for download manager

steelsquid download-dir <directory>
Set download directory for download manager

steelsquid modem
Is USB 3g/4g modem enabled

steelsquid modem-on
Enable USB 3g/4g modem

steelsquid modem-off
Disable USB 3g/4g modem




############################################################################
System settings.
############################################################################

cat /etc/timezone
Show current timezne.

steelsquid timezone
Select the geographic area (timezone) in which you live.

steelsquid keyboards
List all keyboard layouts.

steelsquid keyboard
Show current keyboard layouts.

steelsquid keyboard <layout>
Set keyboard layouts.
Example: keyboard se-latin1

steelsquid mail
Show email notification settings

steelsquid mail-host <host>
Set the SMTP server host.
Using this to send notification mail.
Example: teelsquid mail-host smtp.gmail.com:587

steelsquid mail-username <username>
Set the username for the SMTP server
Using this to send notification mail.

steelsquid mail-password <password>
Set the password for the SMTP server
Using this to send notification mail.

steelsquid mail-mail <mail-adress>
Email that you want notification sent to



############################################################################
Servers on this system.
############################################################################

steelsquid ssh
Status on the SSH-server

steelsquid ssh-on
Enable SSH server.

steelsquid ssh-off
Disable SSH server.

steelsquid ssh-keys
Generate new keys for ssh

steelsquid web
Status on the web interface.

steelsquid web-on
Enable control/configure from web browser
http://localhost  or  http://<device ip>

steelsquid web-off
Disable control/configure from web browser

steelsquid web-aut-on
Connections from the network must authenticate
Localhost can still connect without authentication

steelsquid web-aut-off
Connections from the network must not authenticate

steelsquid web-local-on
Only possible to control/configure from web browser on this machine.

steelsquid web-local-off
Control/configure from any client on the network

steelsquid web-http
Use unecrypted http in the administrator interface

steelsquid web-https
Use encrypted https in the administrator interface

steelsquid web-port <port>
Set the web server port

steelsquid socket
Is socket connection protocol enabled

steelsquid socket-server
Enable socket connection as server

steelsquid socket-client <addressToServer>
Enable socket connection as client

steelsquid socket-off
Disable socket connection

steelsquid bluetooth
Is bluetooth pairing enabled.

steelsquid bluetooth-on
Enable bluetooth pairing.

steelsquid bluetooth-off
Disable bluetooth pairing.

steelsquid bluetooth-pin <pin>
Set the bluetooth pairing PIN (default 1234).



############################################################################
System and hardware.
############################################################################

steelsquid display
Is the display enabled

steelsquid display-on
Enable the display (hdmi and composite).

steelsquid display-off
Disable the monitor (hdmi and composite).
This will make any Desktop environment useless.
On a reboot the display will turned on, but power off after a few seconds.

steelsquid camera
Is the camera enabled

steelsquid camera-on
Enable the raspberry pi camera.
Will take effect on next reboot....

steelsquid camera-off
Disable the raspberry pi camera.
Will take effect on next reboot....

steelsquid gpu-mem
Get the GPU memory (16 to 448) default 64

steelsquid gpu-mem <mem>
Set the GPU memory (16 to 448) default 64
ARM (CPU) gets the remaining memory
Will take effect on next reboot....



############################################################################
How to upgrade the system.
############################################################################

steelsquid upgrade
Upgrade the whole system.
Depending on how old the system is, it may take a long time to do the
upgrade.
NOTE! Do not turn off the device while the upgrade is in progress and the 
      device must have internet connection.
When the update is complete it should say:
Steelsquid-kiss-os executed OK, please reboot :-)

steelsquid update
Only download and update steelsquid-kiss-os script.

steelsquid update-python
Download and upgrade python scripts.

steelsquid update-python <script-number>
Download and upgrade one python script.

steelsquid list-python
List all pyhon scripts.

steelsquid update-web
Download and upgrade the web server.

steelsquid update-img
Download and upgrade icons and images to the web server.

steelsquid update-all
Update steelsquid-kiss-os, python scripts, web files and images



############################################################################
Extra utils: stream USB camera, Alarm/Surveillance...
############################################################################

steelsquid stream
Is camera streaming enabled.

steelsquid stream-frames <frames>
Set Frames per second.

steelsquid stream-port <port>
Set port to listen for connections on.

steelsquid stream-on
Enable http streaming of USB camera.

steelsquid stream-pi-on
Enable http streaming of Raspberry PI camera.

steelsquid stream-off
Disable streaming of camera.

steelsquid alarm
Is the Alarm/Surveillance functionality enabled.
For this to work you need a Raspberry PI camera connected.
Also a PIR sensor conneted to GPIO04 and a siren conencted to GPIO17.
See http://www.steelsquid.org/alarm

steelsquid alarm-on
Enable the Alarm/Surveillance functionality.
For this to work you need a Raspberry PI camera connected.
Also a PIR sensor conneted to GPIO04 and a siren conencted to GPIO17.
See http://www.steelsquid.org/alarm

steelsquid alarm-off
Disable the Alarm/Surveillance functionality.

steelsquid rover
Is rover functionality enabled.

steelsquid rover-on
Enable rover functionality.

steelsquid rover-off
Disable rover functionality.

steelsquid browser-on <url>
When system boot, start a browser in fullscreen.
Need to install alot of stuff, will take several minutes to finish.
url = URL to load

steelsquid browser-off
Desable the browser start when system boot

steelsquid browser-restart
If the browser in fullscreen is activated use this to restart it.

steelsquid mbrowser-on <url>
When system boot, start a midori  browser in fullscreen.
Need to install alot of stuff, will take several minutes to finish.
url = URL to load

steelsquid mbrowser-off
Desable the midori browser start when system boot

steelsquid mbrowser-restart
If the midori browser in fullscreen is activated use this to restart it.



############################################################################
Some other useful commands
############################################################################

shout <message>
Send message to user on ssh, terminal and desktop

notify <message>
Send message to user on ssh, terminal and desktop.
Will also try to send mail if it is configured.

is-raspberry-pi
Is this device a raspberry pi

mail <message>
Will try to send mail if it is configured.

ff '<directory>' '<partOfFileName>
search for file recursively by name

ff '<directory>' '<partOfFileName> '<partOfTextInFile>'
search for file recursively by name and content in file

mem
Show system memory use

ps-cpu
List process from lowest to highest cpu use

ps-cpu <partOfProcessName>
List process from lowest to highest cpu use, filter by name

ps-mem
List process from lowest to highest mem use

ps-mem <partOfProcessName>
List process from lowest to highest mem use, filter by name

netstat -tulpn
List port that the system is listening on.

lsof -i
List open ports.

pkill -f my_pattern
Kill process by part of name.

lsof|grep xxx
Find open files.

mc
Midnight Commander (File manager).

htop
Interactive process viewer

amixer
Sound settings

elinks
Text WWW Browser

screenie
Screen wrapper

nload
Displays the current network usage

mtr
Combines traceroute and ping

echb <text>
Echo bold text

log <text>
Echo in the form: <date> <time> <text>

telnet <host>
Make telnet (socket) connection to host

ssh <user>@<host>
Connect to server with SSH.

wget <url>
Download file from web

compress <file_or_folder>
Compress a file or folder using LZMA

decompress <compressed_folder>
Decompress a file using LZMA

encrypt <file_or_folder>
Encrypt a file or folder with aes-256-cbc

decrypt <encrypted_file>
Decrypt a file using aes-256-cbc



############################################################################
Description of some files and folders.
############################################################################

/opt/steelsquid/flags/
Configuration flags

/opt/steelsquid/lists/
Configuration lists

/opt/steelsquid/parameters/
Configuration parameters

/opt/steelsquid/pem/
HTTPS cerificate files
Will be created when https is enabled

/opt/steelsquid/web/
Web root

/root
Home folder (root user)

/root/Media
Link to /media

/media
USB disks will automatically be installed here.

/root/test.py
A python file to test stuff in...

/opt/steelsquid/steelsquid-kiss-os.sh
The steelsquid install and update script

/etc/init.d/steelsquid
Init script for /usr/bin/steelsquid-boot

/etc/NetworkManager/dispatcher.d/99steelsquid.sh
Fire network status

/usr/bin/steelsquid -> /opt/steelsquid/steelsquid-kiss-os.sh
The steelsquid script

/opt/steelsquid/python
Home for all python files

/usr/bin/steelsquid-boot -> /opt/steelsquid/python/steelsquid_kiss_start.py
Python script that execute on boot and shutdown

/usr/bin/event -> /opt/steelsquid/python/steelsquid_kiss_start.py
The steelsquid_kiss_start.py also handles events from the OS...(using the name event in some old scripts)

/opt/steelsquid/python/modules
All python scrips in this folder will be imported (executed) on boot.
Use this to inmplement your own stuff.

/usr/local/lib/python2.7/dist-packages
External python 2 libraries (Adafruit, RPi, picamera, wiringpi2)

/usr/lib/python3/dist-packages
External python 3 libraries (quick2wire)

/opt/steelsquid/web/top_bar.html
The black top bar that is on most pages

/opt/steelsquid/web/download.html
HTML-file for the download manager

/opt/steelsquid/web/expand.html
Use this to create your own stuff...

/opt/steelsquid/web/file.html
HTML-file for the filemanager

/opt/steelsquid/web/index.html
HTML-file for the web start page (settings)

/opt/steelsquid/web/play.html
HTML-file for the mediaplayer

/opt/steelsquid/web/utils.html
HTML-file for different utils (Camera streaming, alarm and rover)

/opt/steelsquid/python/MCP23017.py
Use the mcp23017 16-bit input/output port expander with interrupt output

/opt/steelsquid/python/steelsquid_bluetooth_connection.py
Bluetooth implementation of steelsquid_connection...

/opt/steelsquid/python/steelsquid_kiss_start.py
This will execute when steelsquid-kiss-os starts.
Will onl execute steelsquid-kiss-boot.
Using this to speed up start of steelsquid kiss daemon.
The reason some files arent compiled is that the main script,
which you invoke with python main.py is recompiled every time you run the script. 
All imported scripts will be compiled and stored on the disk.

/opt/steelsquid/python/steelsquid_kiss_boot.py
This will execute when steelsquid-kiss-os starts
Also listen for events from the OS

/opt/steelsquid/python/steelsquid_connection.py
A simple module that i use to sen async command to and from client/server.

/opt/steelsquid/python/steelsquid_http_server.py
This server will listen for http requests.

/opt/steelsquid/python/steelsquid_i2c.py
Use this to communicate with i2c devices.

/opt/steelsquid/python/modules/kiss_expand.py
Use this file to implement you own stuff...

/opt/steelsquid/python/steelsquid_kiss_global.py
Global stuff for steelsquid kiss os

/opt/steelsquid/python/steelsquid_kiss_http_server.py
Handles requests from index.html, download.html, file.html, play.html, utils.html

/opt/steelsquid/python/steelsquid_kiss_socket_connection.py
Controll steelsquid kiss os with simle socket commands

/opt/steelsquid/python/steelsquid_lcd_hdd44780.py
Print text on a HDD44780 compatible LCD from Raspberry Pi

/opt/steelsquid/python/steelsquid_nm.py
List and connect to wifi network using network manager

/opt/steelsquid/python/steelsquid_oled_ssd1306.py
Write text to a ssd1306 oled display

/opt/steelsquid/python/steelsquid_omx.py
Simple python interface for the omxplayer

/opt/steelsquid/python/steelsquid_rmcs220x.py
A simple serial interface for RMCS-220X High-Torque Encoder DC Servo Motor and Driver .
https://www.active-robots.com/fileuploader/download/download/?d=0&file=custom%2Fupload%2FFile-1440671791.pdf

/opt/steelsquid/python/steelsquid_pi.py
Some useful stuff for Raspberry Pi

/opt/steelsquid/python/steelsquid_piio.py
Mostly wrapper functions (hard coded adresses and pins) for my steelsquid PIIO board

/opt/steelsquid/python/steelsquid_sabertooth.py
A simple serial interface for Sabertooth motor controller.

/opt/steelsquid/python/steelsquid_server.py
A simple module that i use to listen for command and then execute stuff.

/opt/steelsquid/python/steelsquid_socket_connection.py
Socket implementation of steelsquid_connection...

/opt/steelsquid/python/steelsquid_synchronize.py
Automatic listen for changes abd commit changes to a nother system via ssh (install on remote system)

/opt/steelsquid/python/steelsquid_trex.py
Controll the Trex robot controller

/opt/steelsquid/python/steelsquid_utils.py
Some useful functions.

/opt/steelsquid/python/modules/kiss_alarm.py
This is functionality for my alarm.

/opt/steelsquid/python/modules/kiss_rover.py
Fuctionality for my rover controller

/opt/steelsquid/python/modules/kiss_piio.py
Fuctionality for my PIIO board



############################################################################
Commands for development.
############################################################################

steelsquid restart
Restart the steelsquid daemon

steelsquid dev
Is the system in development mode

steelsquid dev-on
Enable development mode

steelsquid dev-off
Disable development mode

set-flag expanded
It will tell the upgrade script not to overwrite:
 - kiss_expand.py
 - expand.html
 - test.py
This is useful if you have expanded functionality. otherwise, the changes will be overwritten when you execute upgrade.

steelsquid module-list
List all modules in modules direcory

steelsquid module <name>
Is a module activated.
A module is the python files under modules directory
name = The name of the file in modules directory

steelsquid module <name> <on/off>
Enable or disable a module.
When a module is enabled it will start on boot.
A module is the python files under modules directory
name = The name of the file in modules directory
on/off = On enable the module and off will disable

steelsquid module <name> <on/off> <argument>
Enable or disable a module.
When a module is enabled it will start on boot.
A module is the python files under modules directory
name = The name of the file in modules directory
on/off = On enable the module and off will disable
argument = Send a argument to the module (one word)

steelsquid download-img
Download a steelsquid-kiss-os.img file.

steelsquid read </dev/sdX>
Create a steelsquid-kiss-os.img from drive.

steelsquid write </dev/sdX>
Write steelsquid-kiss-os.img to drive.

steelsquid archive
Create a steelsquid-kiss-os.gz file of the content in the folder this script is in.
Will ignore .img, .iso and .gz files

steelsquid compress
Create a steelsquid-kiss-os.gz file of the steelsquid-kiss-os.img or steelsquid-kiss-os.iso files in the folder this script is in.

steelsquid extract
Extract a steelsquid-kiss-os.gz file in the folder this script is in.

steelsquid remote-restart
Restart steelsquid service on remote system.
Set paramaters in this script:
  base_remote_server=192.168.0.199
  base_remote_port=22
  base_remote_user=steelsquid
Or add 4 rows to config.txt
  ip
  port
  user
  password

steelsquid commit-git
Commit changes to the GIT and push to github

steelsquid commit-local
Commit changes to the local system (install on local system)
Will commit (install) the steelsquid script, python files and web files

steelsquid commit-remote
Commit changes to a nother system via ssh (install on remote system)
Will commit (install) the steelsquid script, python files and web files
Set paramaters in this script:
 base_remote_server=192.168.0.199
 base_remote_port=22
 base_remote_user=steelsquid
Or add 4 rows to config.txt
  ip
  port
  user
  password

steelsquid commit-remote-restart
Commit changes to a nother system via ssh (install on remote system)
Will commit (install) the steelsquid script, python files and web files
After installation is done the steelsquid service will restart.
Set paramaters in this script:
  base_remote_server=192.168.0.199
  base_remote_port=22
  base_remote_user=steelsquid
Or add 4 rows to config.txt
  ip
  port
  user
  password

steelsquid synchronize
Automatic listen for changes abd commit changes to a nother system via ssh (install on remote system)

is-raspberry-pi
Is this device a raspberry pi

lcd
Is LCD disabled/nokia5110/HDD44780/ssd1306

lcd-hdd
Enable the LCD via HDD44780 (i2c)

lcd-nokia
Enable the LCD via nokia5110 (spi)

lcd-ssd
Enable the LCD via ssd1306 oled (02c)

lcd-auto
Try to use nokia5110/HDD44780/ssd1306

lcd-off
Disable the LCD

lcd-contrast
Get contrast on nokia5110 LCD (0 to 100).

lcd-contrast <value>
Set contrast on nokia5110 LCD (0 to 100).

steelsquid log
Is logging enabled

steelsquid log-on
Enable logging
Will take effect on next reboot....

steelsquid log-off
Disable logging
Will take effect on next reboot....

list-flags
Set flag

set-flag <flagName>
Set flag
The steelsquid daemon must be running for this to work

get-flag <flagName>
Has flag

del-flag <flagName>
Delete flag
The steelsquid daemon must be running for this to work

list-parameters
Set flag

set-parameter <name> <value>
Set paramater value
The steelsquid daemon must be running for this to work

get-parameter <name>
Get paramater value

has-parameter <name>
Has a paramater

del-parameter <name>
Delete a parameter
The steelsquid daemon must be running for this to work

event <event>
Broadcast event without parameters

event <event> <parameter1> <parameter2>...
Broadcast event with paramaters

steelsquid power-gpio
Is the power off functionality enabled
Connect a button to the raspberry to shut down cleanly

steelsquid power-gpio <gpio>
Enable power off functionality
<gpio> = use this GPIO (connect button to 3V3, using PULL_DOWN)

steelsquid power-gpio-off
Disable power off functionality

steelsquid i2c-lock
Is i2c lock/syncronization enabled
If many devices and strange errors from I2C, try to enabler this.

steelsquid i2c-lock-on
Enable i2c lock/syncronization
If many devices and strange errors from I2C, try to enabler this.

steelsquid i2c-lock-off
Disable i2c lock/syncronization
If many devices and strange errors from I2C, try to enabler this.



############################################################################
IO commands for Steelsquid Kiss OS. Commands to get/set gpio and other stuff...
This is mostly for test purpuse, all logic should be made in the Steelsquid daemon
(e.g. kiss_expand.py...)
This may interrupt for example the LCD, DAC, ADC...(this is only for test)

pi gpio_get <gpio>
Get status of RaspberryPI GPIO
gpio: 4-26

pi gpio_set <gpio> <true/false>
Set status of RaspberryPI GPIO
gpio: 4-26

pi gpio_event <gpio>
Listen for changes on RaspberryPI GPIO
gpio: 4-26

pi mcp23017_get <address> <gpio>
Get status gpio on a MCP23017
Connect GPIO to gnd (using internal pull-up)
address: 20-27
gpio: 0-15

pi mcp23017_set <address> <gpio> <true/false>
Set a gpio hight or low on a MCP23017
address: 20-27
gpio: 0-15

pi mcp23017_event <address> <gpio>
Listen for changes on MCP23017 pin
Connect GPIO to gnd (using internal pull-up)
If this is to work one of the trigger pin needs to be connected to raspberry Pi pin 26
address: 20-27
gpio: 0-15

pi ads1015 <address> <gpio>
Read analog in from ADS1015 (0 to 5 v)
address: 48, 49, 4A, 4B 
gpio: 0-3

pi mcp4725 <address> <value>
Write analog out from MCP4725
address: 60 
value: 0 and 4095

pi mcp4728 <address> <volt0> <volt1> <volt2> <volt3>
Write analog out from MCP4728
address: 61
volt0-3: 0 and 4095

pi hdd44780 <is_i2c> <text>
Print text to HDD44780 compatible LCD (
 or \ = new line)
is_i2c: Is the LCD connected by I2C (true/false)

pi nokia5110 <text>
Print text to nokia5110  LCD (
 or \ = new line)

pi ssd1306 <text>
Print text to ssd1306 oled LCD (
 or \ = new line)

pi hcsr04 <trig_gpio> <echo_gpio>
Measure_distance with a with HC-SR04.
trig_gpio: The trig gpio
echo_gpio: The echo gpio

pi pca9685 <servo> <value>
Move Adafruit 16-channel I2c servo to position (pwm value).
servo: 0 to 15
value: min=150, max=600 (may differ between servos)

pi sabertooth <port> <left> <right>
Set the speed on a sabertooth dc motor controller..
port: /dev/ttyAMA0, the_port=/dev/ttyUSB0
left and right: -100% to +100%

pi trex_motor <left> <right>
Set TREX speed of the dc motors
left and right: -255 to 255

pi trex_servo <servo> <position>
Set TREX servo position
servo: 1 to 6
Position: Typically the servo position should be a value between 1000 and 2000 although it will vary depending on the servos used

pi trex_status
Get status from trex
 - Battery voltage:   An integer that is 100x the actual voltage
 - Motor current:  Current drawn by the motor in mA
 - Accelerometer
 - Impact

pi diablo <left> <right>
Drive Piborg diablo motor board
left and right: -1000 to 1000

pi servo12c <servo> <position>
Move servo on a 12 servos with I2C Servo Controller IC.
http://www.hobbytronics.co.uk/arduino-servo-controller
Servo: 0 to 11
Position: 0 to 255

pi mpu6050_accel
Read mpu-6050 accelerometer data.
SparkFun Triple Axis Accelerometer and Gyro Breakout - MPU-6050
https://www.sparkfun.com/products/11028

pi mpu6050_movement
Read mpu-6050 gyro data.
SparkFun Triple Axis Accelerometer and Gyro Breakout - MPU-6050
https://www.sparkfun.com/products/11028

pi mpu6050_rotation
Read mpu-6050 rotation angle in degrees for both the X & Y.
SparkFun Triple Axis Accelerometer and Gyro Breakout - MPU-6050
https://www.sparkfun.com/products/11028

pi mpu6050_movement_event
Listen for movements on mpu-6050 and execute method on change.
SparkFun Triple Axis Accelerometer and Gyro Breakout - MPU-6050
https://www.sparkfun.com/products/11028

pi mpu6050_rotation_event
Listen for mpu-6050 rotation angle in degrees and execute method on change.
SparkFun Triple Axis Accelerometer and Gyro Breakout - MPU-6050
https://www.sparkfun.com/products/11028

pi po12_digital_out <channel> <status>
Set the digital out channel to hight or low on the P011/12 ADC
http://www.pichips.co.uk/index.php/P011_ADC#rpii2c
channel = 1 to 3
status = True/False

pi po12_adc_pullup <enable>
By default there are weak pull up resistors internally attached to the ADC lines
http://www.pichips.co.uk/index.php/P011_ADC#rpii2c
enable = true/false

pi po12_adc_vref <vref>
Set Reference Voltage
http://www.pichips.co.uk/index.php/P011_ADC#rpii2c
vref = 1.024
       2.048
       4.096
       Voltage on the +V pin

pi po12_adc <channel>
Read the analog value in on the P011/12 ADC
http://www.pichips.co.uk/index.php/P011_ADC#rpii2c
channel = 1 to 8
Return: 0 to 1023

pi po12_adc_volt <channel>
Read the analog voltage in on the P011/12 ADC
http://www.pichips.co.uk/index.php/P011_ADC#rpii2c
channel = 1 to 8
Return: 0V to vref

pi po12_adc_event <channel>
Make method execute when the analog voltage in on the P011/12 ADC change
http://www.pichips.co.uk/index.php/P011_ADC#rpii2c
channel = 1 to 8

pi po16_gpio_pullup <gpio> <use_pullup>
Sets a weak pull up on the specified pin on the PO16
http://www.pichips.co.uk/index.php/P015_GPIO_with_PWM
gpio = 1 to 8
use_pullup: True/False

pi po16_gpio_get <gpio>
Read the state of gpio pin on the PO16
This will return true if the gpio is connectid to ground
http://www.pichips.co.uk/index.php/P015_GPIO_with_PWM
gpio = 1 to 8
Return: True/False

pi po16_gpio_event <gpio>
Make method execute when state of gpio pin on the PO16 change
Set the state of gpio pin on the PO16
gpio = 1 to 8

pi po16_gpio_set <gpio> <status>
Set the state of gpio pin on the PO16
http://www.pichips.co.uk/index.php/P015_GPIO_with_PWM
gpio = 1 to 8
status = True/False

pi po16_pwm <channel> <value>
Set PWM value on channel on the PO16
http://www.pichips.co.uk/index.php/P015_GPIO_with_PWM
channel = 1 to 4
value = 0 to 1023

pi pcf8591_read <pin>
Read analog value from pcf8591
http://dx.com/p/pcf8591-8-bit-a-d-d-a-converter-module-150190
pin = 0 to 3

pi pcf8591_write <value>
Set analog out value on pcf8591
http://dx.com/p/pcf8591-8-bit-a-d-d-a-converter-module-150190
value = 0 to 255

pi hdc1008
Read Temperature + Humidity from HDC1008
https://learn.adafruit.com/adafruit-hdc1008-temperature-and-humidity-sensor-breakout/overview
Temperatur in celsius and humidity in %




############################################################################
How to build a steelsquid-kiss img (reminder for me)
############################################################################

1. Download and extract the installer image
wget https://github.com/debian-pi/raspbian-ua-netinst/releases/download/v1.0.8.1/raspbian-ua-netinst-v1.0.8.1.img.xz
unxz raspbian-ua-netinst-v1.0.8.1.img.xz

2. Copy to sdcard
dd bs=4M if=raspbian-ua-netinst-v1.0.8.1.img of=/dev/sdb

3. Insert sdcard into raspberry and boot
Must have the networkcabel connected (internet access)
The installation process will start automatically.
It takes about 15 minutes

4. SSH or use terminal to the new system
ssh root@192.168.0.xxx
password = raspbian

5. Set password
passwd  (raspberry)

7. Change to 4.1 and uppgrade
echo "deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi" > /etc/apt/sources.list
echo "deb http://archive.raspberrypi.org/debian/ jessie main ui untested staging" >> /etc/apt/sources.list
apt-get update
apt-get purge linux-image-rpi-rpfv linux-image-rpi2-rpfv libraspberrypi0 libraspberrypi-{bin,dev} raspberrypi-bootloader-nokernel
apt-get --no-install-recommends install sudo nano aptitude
apt-get install raspberrypi-bootloader libraspberrypi0 libraspberrypi-{bin,dev}
cd /boot/
rm initrd.img-3.18.0-trunk-rpi2 config-3.18.0-trunk-rpi2 kernel-rpi1_install.img kernel-rpi2_install.img
aptitude update
aptitude full-upgrade
dpkg --configure -a

8. Fix config
echo "" > /boot/config.txt

9.


10. Clean
aptitude autoclean
aptitude clean
apt-get clean
apt-get -y autoremove
rm /root/.bash_history
rm /root/.nano_history

11. Shutdown and mount on computer

12. Resize to 3.4G with gparted

13. Boot the raspberry pi again.

14. Download script
wget --no-check-certificate http://www.steelsquid.org/steelsquid-kiss-os.sh

15. Make executable
chmod +x steelsquid-kiss-os.sh

16. Execute the stcript
./steelsquid-kiss-os.sh upgrade

17. Take a nap :-)
May have to answer some questions

18. Remove script
rm steelsquid-kiss-os.sh

19. Shutdown raspberry

20. Insert sdcard in other computer and mount
rm -R var/log/*
rm -R var/tmp/*
rm -R tmp/*

21. Make a img of it
./steelsquid-kiss-os.sh read /dev/sdb

22. Compress image to gz
./steelsquid-kiss-os.sh compress

23. On new image remember to:
Upload steelsquid-kiss-os.sh to http://www.steelsquid.org
Clear the ssh keys

24. GIT and github
git init
git add *.html
git commit -m "Initial commit"
git remote add steelsquidkissos https://github.com/steelsquid/steelsquid-kiss-os.git
git commit -a -m "-"
git push steelsquidkissos master