Pi Stuff

Bus power

The pi will limit the power available to your device on the USB bus due to its power limitations. I am using a USB hub and supplying 5v @ 3A. This tells the pi to STFU

import os
os.system("echo 1 > /sys/bus/usb/devices/1-1.3/bConfigurationValue")
os.system("echo 1 > /sys/bus/usb/devices/1-1.4/bConfigurationValue")

Non Serial GPS?

I have a Bluetooth one.

#!/bin/sh
sudo rfcomm bind /dev/rfcomm0 00:15:4B:01:84:EC

Don’t use my mac address use your own!

WiFi Won’t reconnect

Stupid thing, I put it in my pocket and walked out of WiFi range for a bit.

I am back in WiFi range, still no pi. Cron and Script fix…

#!/bin/bash

#echo "Script was run @ $(date)" >>/var/log/wifi_reconnect

# The IP for the server you wish to ping
SERVER=$(/sbin/ip route | awk '/default/ { print $3 }')

#echo "> Server: ${SERVER}" >>/var/log/wifi_reconnect

# Specify wlan interface
WLANINTERFACE=wlan0

#echo "> WLAN Interface: ${WLANINTERFACE}" >>/var/log/wifi_reconnect

# Send two pings, sending output to /dev/null
ping -I ${WLANINTERFACE} -c2 ${SERVER} >/dev/null

# If the return code from ping ($?) is not 0 (meaning there was an error)
if [ $? != 0 ]
then
#echo "> WiFi no worky. Restart!" >>/var/log/wifi_reconnect
# Restart the wireless interface
ip link set wlan0 down
ip link set wlan0 up
#else
#echo "> WiFi works. No restart" >>/var/log/wifi_reconnect
fi

Unicode Linux

To enter a font glyph’s code on Linux, use a combination of keys and the character’s hexadecimal code. The most common method is Ctrl + Shift + U followed by the hexadecimal code and then pressing Enter

Forgot the time

Less than one second

Multiple
of a
second
UnitSymbolDefinitionComparative examples & common units
10−44Planck timetPPresumed to be the shortest theoretically measurable time interval
(but not necessarily the shortest increment of time—see quantum gravity)
10−14 qs: The length of one Planck time (tP = ℏ G / c 5 {\displaystyle {\sqrt {\hbar G/c^{5}}}} ≈ 5.39×10−44 s)[3] is the briefest physically meaningful span of time. It is the unit of time in the natural units system known as Planck units.
10−30quectosecondqsQuectosecond, (quecto- + second), is one nonillionth of a second
10−27rontosecondrsRontosecond, (ronto- + second), is one octillionth of a second300 rs: The mean lifetime of W and Z bosons
10−24yoctosecondys[4]Yoctosecond, (yocto- + second), is one septillionth of a second86 ys: The estimated value on the half-life of isotope 5 of hydrogen (hydrogen-5)
143 ys: The half-life of the nitrogen-10 isotope of nitrogen
156 ys: The mean lifetime of a Higgs Boson
10−21zeptosecondzsZeptosecond, (zepto- + second), is one sextillionth of one second1.3 zs: Smallest experimentally controlled time delay in a photon field.[5]
2 zs: The representative cycle time of gamma ray radiation released in the decay of a radioactive atomic nucleus (here as 2 MeV per emitted photon)
4 zs: The cycle time of the zitterbewegung of an electron ( ω = 2 m e c 2 / ℏ {\displaystyle \omega =2m_{e}c^{2}/\hbar })
247 zs: The experimentally-measured travel time of a photon across a hydrogen molecule, “for the average bond length of molecular hydrogen”[6]
10−18attosecondasOne quintillionth of one second12 as: The best timing control of laser pulses.[7]
43 as: The shortest X-ray laser pulse[8]
53 as: The shortest electron laser pulse[9][10]
10−15femtosecondfsOne quadrillionth of one second1 fs: The cycle time for ultraviolet light with a wavelength of 300 nanometres; the time it takes light to travel a distance of 0.3 micrometres (μm).
7.58 fs: The period of vibration of a hydrogen molecule.
140 fs: The time needed for electrons to have localized onto individual bromine atoms 6 Ångstrom apart after laser dissociation of Br2.[11]
290 fs: The lifetime of a tauon
10−12picosecondpsOne trillionth of one second1 ps: The mean lifetime of a bottom quark; the time needed for light to travel 0.3 millimetres (mm)
1 ps: The typical lifetime of a transition state one machine cycle by an IBM silicon-germanium transistor
109 ps: The period of the photon corresponding to the hyperfine transition of the ground state of cesium-133, and one 9,192,631,770th of one second by definition
114.6 ps: The time for the fastest overclocked processor as of 2014 to execute one machine cycle.[12]
696 ps: How much more a second lasts far away from Earth’s gravity due to the effects of general relativity
10−9nanosecondnsOne billionth of one second1 ns: The time needed to execute one machine cycle by a 1 GHz microprocessor
1 ns: The time light takes to travel 30 cm (11.811 in)
10−6microsecondμsOne millionth of one second1 μs: The time needed to execute one machine cycle by an Intel 80186 microprocessor
2.2 μs: The lifetime of a muon
4–16 μs: The time needed to execute one machine cycle by a 1960s minicomputer
10−3millisecondmsOne thousandth of one second1 ms: The time for a neuron in the human brain to fire one impulse and return to rest[13]
4–8 ms: The typical seek time for a computer hard disk
10−2centisecondcsOne hundredth of one second1.6667 cs: The period of a frame at a frame rate of 60 Hz.
2 cs: The cycle time for European 50 Hz AC electricity 10–20 cs (=0.1–0.2 s): The human reflex response to visual stimuli
10−1deciseconddsOne tenth of a second1–4 ds (=0.1–0.4 s): The length of a single blink of an eye[14]