I now use Rev B+ for newer examples.
I use the command line in this examples, this is mostly for test purpuse, all logic should be made in the Steelsquid daemon (e.g. kiss_expand.py)
Connect Power on / Reset ButtonHere I describe very briefly how you can connect a start / reset button to your Raspberry Pi.
If the Raspberry Pi is of it will power on and if it already is on witt will reset the power (restart). It is not a clean shutdown of the system...
Connect shutdown Button (clean shutdown)Here I describe how to connect a shutdown button to the raspberry Pi.
It will shutdown the Raspberry Pi cleanly.
Press the shutdown button, will shutdown cleanly...
Combined Power on and Shutdown buttonHere I describe a simple circuit that makes it possible to Power on and Shutdown on the same button.
Steelsquid-kiss-os will shut down cleanly, not only power off.
What I have done is a circuit that sends a signal to RUN/P6 Header when the Raspberry is off.
But if it is running (booted up), the signal will goto a gpio that trigger a shutdown.
Test input (Connect button)Read the state of a GPIO (connected button=.
You should get: False Response: True https://github.com/steelsquid/steelsquid-kiss-os/blob/master/steelsquid_pi.py Test Output (Connect LED)A simple example how to connect a LED to the Raspberry Pi.
Connect HDD44780 LCDPrint text on a HDD44780 compatible LCD connected to a Raspberry Pi. This will connect the LCD directly to the GPIO pins, will use 7 pins. You can use nearly any character LCD, it will work with 16x1, 16x2, 20x2, 20x4. But it will not work with 40x4 LCDs.
Connect HDD44780 LCD via I2CPrint text on a HDD44780 compatible LCD connected to a Raspberry Pi. Here I show how you can connect a HDD44780 compatible LCD that has I2C interface. Then you just need to use two GPIO.
Connect Nokia5110 LCD via SPIPrint text on a Nokia5110 LCD connected to a Raspberry Pi via SPI. Connect ssd1306 OLED via I2CSimple example how to connect a ssd1306 oled via I2C. http://www.dx.com/p/0-96-oled-high-clear-module-board-for-arduino-red-335850#.Vgwx33XHlhE
Connect HC-SR04 (Measure distance)Here I describe how to connect a rangefinder for Raspberry Pi. The rangefinder is a HC-SR04.
PIR Motion Sensor (Detect human movement)Description how to connect a PIR motion sensor. There are different types but most works equally. I have this one: http://www.kjell.com/sortiment/el/elektronik/arduino/moduler/rorelsedetektor-for-arduino-p87892#ProductDetailedInformation
3v3 <-> 5v level converter Here is a simple example how to connect a Adafruit 8-channel Bi-directional Logic Level Converter (TXB0108).
In this example i have connected Raspberry GPIO 17 to A6 on the TXB0108. Execute: pi gpio_set 17 true And you should have 5V on the B6 pin Connect ADC (Analog To Digital Converter)Example howto connect a ADS1015 12-Bit ADC - 4 Channel with Programmable Gain Amplifier.
SparkFun MCP4725 (Digital-to-Analog Convertor)Example how to connect a SparkFun I2C DAC Breakout (MCP4725) to Steelsquid Kiss OS
Proto Advantage MCP4728 (Digital-to-Analog Convertor)Example how to connect a Proto Advantage MCP4728 Breakout Board to Steelsquid Kiss OS MCP4728 is a quad 12-bit voltage output Digital-to-Analog Convertor (DAC).
MCP23017 I2C GPIO ExpanderHow to connect a MCP23017 I2C Port Expander to Steelsquid Kiss OS. The MCP23017 has 16 GPIO you can control.
Dagu T'Rex Robot/Motor ControllerHow to use a Dagu T'Rex Robot/Motor Controller
Sabertooth dual 25A motor driverHow to use a Sabertooth dual 25A motor driver
PiBorg Diable DC motor controllerHow to use a PiBorg Diable DC motor controller
Hobbytronics I2C 12 servo controllerHow to use a 12 Channel Servo Controller IC from hobbytronics.
SparkFun Triple Axis Accelerometer and Gyro MPU-6050How to use a SparkFun Triple Axis Accelerometer and Gyro MPU-6050. https://www.sparkfun.com/products/11028
How to use PCF8591 from Steelsquid Kiss OS, i use a prebuild pre-assembled board from Deal Extreme (YL-40). OBS! If you want to use the pin AIN0, AIN1 and AIN3 instead of the built in sensors remove the jumpers.
How to use HDC1008 from steelsquid Kiss OS.
Adafruit's Raspberry-Pi Python Code LibraryCopyright (c) 2012-2013 Limor Fried, Kevin Townsend and Mikey Sklar for Adafruit Industries. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |