Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
gpio mode 1 out
gpio mode 4 out
gpio mode 5 out
gpio mode 6 out
s=0.01s
i=1
while [ $i -le 25 ]
do
pi@raspberrypi ~ $ gpio readall
+----------+------+--------+------+-------+
| wiringPi | GPIO | Name | Mode | Value |
+----------+------+--------+------+-------+
| 0 | 17 | GPIO 0 | IN | Low |
| 1 | 18 | GPIO 1 | IN | Low |
| 2 | 27 | GPIO 2 | IN | Low |
| 3 | 22 | GPIO 3 | IN | Low |
| 4 | 23 | GPIO 4 | IN | Low |
| 5 | 24 | GPIO 5 | IN | Low |
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
"mod_fastcgi"
)
server.document-root = "/var/www"
pi@raspberrypi / $ sudo iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 00:2D:A0:7B:63:21
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=55/70 Signal level=-55 dBm
Encryption key:on
ESSID:"Innen"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
$ which ifconfig
/sbin/ifconfig
$ echo $?
0
$ which non_existing_app
$ echo $?
1
// Schrittmotor ansteuerung
int pinA = 10;
int pinB = 11;
int pinC = 12;
int pinD = 13;
void setup() {
pinMode(pinA, OUTPUT);
pinMode(pinB, OUTPUT);
# Single Line Commen
class MyClass:
"""Multiline"""
i = 12345
def f(self):
print dir(self)
return 'hello world'
obj = MyClass()
obj.f();
pi@raspberrypi ~/cpp/opencv $ time ./DisplayImage /pi/a.png
real 0m2.628s
user 0m2.280s
sys 0m0.050s
cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
add_executable( DisplayImage DisplayImage.cpp )
target_link_libraries( DisplayImage ${OpenCV_LIBS} )
sudo apt-get install build-essential cmake git-core libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev