This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPI testing utility (using spidev driver) | |
* | |
* Copyright (c) 2007 MontaVista Software, Inc. | |
* Copyright (c) 2007 Anton Vorontsov <[email protected]> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get -q -y update | |
sudo apt-get -q -y install build-essential | |
sudo apt-get -q -y install cmake | |
sudo apt-get -q -y install pkg-config | |
sudo apt-get -q -y install libpng12-0 libpng12-dev libpng++-dev libpng3 | |
sudo apt-get -q -y install libpnglite-dev libpngwriter0-dev libpngwriter0c2 | |
sudo apt-get -q -y install zlib1g-dbg zlib1g zlib1g-dev | |
sudo apt-get -q -y install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools | |
sudo apt-get -q -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
import RPi.GPIO as GPIO | |
# to use Raspberry Pi board pin numbers | |
GPIO.setmode(GPIO.BOARD) | |
# set up GPIO output channel | |
GPIO.setup(13, GPIO.OUT) | |
GPIO.setup(15, GPIO.OUT) | |
GPIO.setup(16, GPIO.OUT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* blink.c: | |
* Simple test program to blink an LED on pin 7 | |
*/ | |
#include <wiringPi.h> | |
#include <stdio.h> | |
int main(void) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First configure the user you want to run this under - this will generally be pi, unless you've created your own users | |
export USER='pi' | |
eval cd ~$USER | |
# Check the state of the command - this'll either be start or stop | |
case "$1" in | |
start) | |
# if it's start, then start vncserver using the details below | |
su $USER -c '/usr/bin/vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
logo=" $(tput setaf 2) | |
.~~. .~~. | |
'. \ ' ' / .'$(tput setaf 1) | |
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1) | |
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1) | |
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1) | |
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1) | |
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1) |