The Spocket
Inhoud
Introduction
What is The Spocket?
What do you need?
The Hardware:
- a broken portable p.ex. UV5r
- a Orange Pi Zero 512Mb
- a batterypack
- a charger
The Software:
- a package to download at www.florhans.bzh/pg540
ask your password by mail :f4vsj@florhans.bzh
Install V3 Package in home:
Install WiringOP:maybe for raspi? https://github.com/zhaolei/WiringOP
for the OPI https://github.com/tumugin/WiringOP http://www.orangepi.org/Docs/WiringPi.html
Matrixkeypad (Raspi) https://tutorials-raspberrypi.de/raspberry-pi-keypad-tastatur/
https://forum.armbian.com/topic/7111-need-help-in-using-4x4-matrix-keypad-on-orangepi-zero-gpio/ https://forum.armbian.com/topic/2001-suggestions-on-connecting-membrane-1x4-keypad-to-orangepi-pc/ https://forum.armbian.com/topic/6187-how-to-use-4x4-keypad-and-16x2-lcd-with-orange-pi/ https://tutorials-raspberrypi.com/connecz-raspberry-pi-kecpad-code-lock/ in home/keypad
pyaudio...
les nouveautés :
- Armbian Buster à jour au 9 sept 2019
- Svxlink 19.09.01 - Version officielle 1.7
- support de l'ajout d'un salon régional non géré par le RRF. (à configurer sur le spot) 104# en DTMF & accessible par le dashboard local. - l'interface graphique est en http et https (https indispensable pour la localisation automatique) - VPN Hamnet toujours disponible - Dwservice installé par défaut ( code à renseigner ) prise en main a distance sans ouverture de port.
- suppression des services non utilisé ou très peu. - code source de svxlink 19.09.01 inclus dans /usr/src
4x4 keypad
reboot
https://www.noah.org/wiki/tones #!/usr/bin/env python To install dependencies on Mac OS X run the following commands: sudo brew install portaudio sudo pip install --allow-external pyaudio --allow-unverified pyaudio pyaudio
DTMF 1209 Hz 1336 Hz 1477 Hz 1633 Hz 697 Hz 1 2 3 A 770 Hz 4 5 6 B 852 Hz 7 8 9 C 941 Hz * 0 # D 2015 Noah Spurrier noah@noah.org import math import numpy import pyaudio import sys import time def sine_wave(frequency, length, rate): length = int(length * rate) factor = float(frequency) * (math.pi * 2) / rate return numpy.sin(numpy.arange(length) * factor) def sine_sine_wave(f1, f2, length, rate): s1=sine_wave(f1,length,rate) s2=sine_wave(f2,length,rate) ss=s1+s2 sa=numpy.divide(ss, 2.0) return sa def play_tone(stream, frequency=440, length=0.20, rate=44100): frames = [] frames.append(sine_wave(frequency, length, rate)) chunk = numpy.concatenate(frames) * 0.25 stream.write(chunk.astype(numpy.float32).tostring()) def play_dtmf_tone(stream, digits, length=0.20, rate=44100): dtmf_freqs = {'1': (1209,697), '2': (1336, 697), '3': (1477, 697), 'A': (1633, 697), '4': (1209,770), '5': (1336, 770), '6': (1477, 770), 'B': (1633, 770), '7': (1209,852), '8': (1336, 852), '9': (1477, 852), 'C': (1633, 852), '*': (1209,941), '0': (1336, 941), '#': (1477, 941), 'D': (1633, 941)} dtmf_digits = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#', 'A', 'B', 'C', 'D'] if type(digits) is not type(): digits=str(digits)[0] digits = .join ([dd for dd in digits if dd in dtmf_digits]) for digit in digits: digit=digit.upper() frames = [] frames.append(sine_sine_wave(dtmf_freqs[digit][0], dtmf_freqs[digit][1], length, rate)) chunk = numpy.concatenate(frames) * 0.25 stream.write(chunk.astype(numpy.float32).tostring()) time.sleep(0.2) if __name__ == '__main__': p = pyaudio.PyAudio() stream = p.open(format=pyaudio.paFloat32, channels=1, rate=44100, output=1) # # Play concert pitch. # play_tone(stream, length=2.0) # time.sleep(0.4) # Dial a telephone number. if len(sys.argv) != 2: digits = "2219415" else: digits = sys.argv[1] play_dtmf_tone(stream, digits) stream.close() p.terminate()
The Installation
1 download you software package
2 create your SD-Card
3 Insert the SD-Card in you Orange Pi
4 Start-up your Orange Pi
5 Wait until the "bleep"
6 Use your Spocket as usual
7 have fun!
Troubleshooting
- error 1
- error 2
- error 3