b4ac4c8159f1229a8118e2e72c3a71c370698b93
SDK-dat/C-dat/C-dat.md
| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | + |
|
| 2 | +# C-dat |
|
| 3 | + |
|
| 4 | +command example |
|
| 5 | + |
|
| 6 | + ./epd |
|
| 7 | + |
|
| 8 | + |
|
| 9 | +## The 'clang-format' command is not available. Please check your clang-format.executable user setting and ensure it is installed. |
|
| 10 | + |
|
| 11 | +clang-format.executable |
|
| 12 | + |
|
| 13 | +This error message gets thrown at https://github.com/xaverh/vscode-clang-format-provider/blob/master/src/extension.ts#L187. It ususally appears when the clang-format extension cannot find clang-format. |
|
| 14 | +It requires clang-format by LLVM in order to work. You can either download it from http://llvm.org or install it via npm install -g clang-format or through a package manager (apt, pacman, brew, nuget, dnf). |
|
| 15 | + |
|
| 16 | +http://llvm.org/ |
|
| 17 | + |
|
| 18 | +https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8 == LLVM-18.1.8-woa64.exe |
|
| 19 | + |
|
| 20 | +"clang-format.executable": "C:\\Program Files (x86)\\LLVM\\bin\\clang-format.exe" |
|
| 21 | + |
|
| 22 | +D:\Program Files\LLVM\bin\clang-format.exe |
|
| 23 | + |
|
| 24 | +- [[MSYS2-dat]] |
|
| ... | ... | \ No newline at end of file |
SDK-dat/C-dat/MSYS2-dat/MSYS2-dat.md
| ... | ... | @@ -0,0 +1,4 @@ |
| 1 | + |
|
| 2 | +# MSYS2-dat |
|
| 3 | + |
|
| 4 | +Download MSYS2: https://www.msys2.org |
|
| ... | ... | \ No newline at end of file |
SDK-dat/C-dat/rpi-c-dat/rpi-c-dat.md
| ... | ... | @@ -0,0 +1,35 @@ |
| 1 | + |
|
| 2 | +# rpi-c-dat |
|
| 3 | + |
|
| 4 | + chmod +x 2_5449615149826598388 |
|
| 5 | + |
|
| 6 | + (.venv) root@raspberrypi:/home/pi# ./2_5449615149826598388 |
|
| 7 | + |
|
| 8 | + ./2_5449615149826598388: error while loading shared libraries: libwiringPi.so: cannot open shared object file: No such file or directory |
|
| 9 | + |
|
| 10 | + |
|
| 11 | +## library |
|
| 12 | + |
|
| 13 | +- [[WiringPi-dat]] |
|
| 14 | + |
|
| 15 | + |
|
| 16 | +## compile |
|
| 17 | + |
|
| 18 | +compile |
|
| 19 | + |
|
| 20 | + g++ rsr.cpp -o rsr2 -lwiringPi |
|
| 21 | + |
|
| 22 | + |
|
| 23 | +## errors |
|
| 24 | + |
|
| 25 | +wrong 32bit version installed: |
|
| 26 | + |
|
| 27 | + gpio: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory |
|
| 28 | + |
|
| 29 | + |
|
| 30 | +## ref |
|
| 31 | + |
|
| 32 | +- [[rpi-dat]] |
|
| 33 | + |
|
| 34 | + |
|
| 35 | + |
SDK-dat/linux-dat/apt-get-dat/apt-get-dat.md
| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | + |
|
| 2 | +# apt-get-dat.md |
|
| 3 | + |
|
| 4 | +purge |
|
| 5 | + |
|
| 6 | + apt-get remove --purge wiringpi:armhf |
|
| ... | ... | \ No newline at end of file |
SDK-dat/python-dat/RPI-python-dat/RPI-python-dat.md
| ... | ... | @@ -0,0 +1,47 @@ |
| 1 | + |
|
| 2 | +# RPI-python-dat |
|
| 3 | + |
|
| 4 | +apt-get install pip |
|
| 5 | + |
|
| 6 | + Note, selecting 'python3-pip' instead of 'pip' |
|
| 7 | + |
|
| 8 | + |
|
| 9 | + |
|
| 10 | +## setup env |
|
| 11 | + |
|
| 12 | + python3 -m venv .venv |
|
| 13 | + source .venv/bin/activate |
|
| 14 | + |
|
| 15 | + pip install RPi.GPIO |
|
| 16 | + pip install SN74HC165 |
|
| 17 | + |
|
| 18 | + |
|
| 19 | +## rpi library |
|
| 20 | + |
|
| 21 | +- [[pigpio-dat]] |
|
| 22 | +- pi74HC595 |
|
| 23 | + |
|
| 24 | +- [[wiringpi-dat]] |
|
| 25 | +- pip3 install woolseyworkshop-circuitpython-74hc165 |
|
| 26 | + |
|
| 27 | +- [[circuitpython-dat]] |
|
| 28 | + |
|
| 29 | + |
|
| 30 | +build-in library: |
|
| 31 | +- time, threading, |
|
| 32 | + |
|
| 33 | +### error |
|
| 34 | + |
|
| 35 | +- ~~SN74HC165 ?? ~~ |
|
| 36 | + |
|
| 37 | + |
|
| 38 | +## hardware driver |
|
| 39 | + |
|
| 40 | +- [[74HC595-dat]] - [[74HC165-dat]] |
|
| 41 | + |
|
| 42 | + |
|
| 43 | +## ref |
|
| 44 | + |
|
| 45 | +- [[rpi-dat]] |
|
| 46 | + |
|
| 47 | +- [[python-dat]] |
|
| ... | ... | \ No newline at end of file |
SDK-dat/python-dat/RPI-python-dat/pigpio-dat.md
| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | + |
|
| 2 | +# pigpio-dat.md |
|
| 3 | + |
|
| 4 | +- https://github.com/joan2937/pigpio |
|
| 5 | +- examples - https://abyz.me.uk/rpi/pigpio/examples.html |
|
| 6 | + |
|
| 7 | + |
SDK-dat/python-dat/RPI-python-dat/rpi-python-gpio-demo-1.py
| ... | ... | @@ -0,0 +1,21 @@ |
| 1 | + |
|
| 2 | +# rpi-python-gpio-demo-1.py |
|
| 3 | + |
|
| 4 | +import RPi.GPIO as GPIO |
|
| 5 | +import time |
|
| 6 | + |
|
| 7 | +led = 29 |
|
| 8 | +switch = 31 |
|
| 9 | + |
|
| 10 | +GPIO.setmode(GPIO.BOARD) |
|
| 11 | +GPIO.setup(led, GPIO.OUT) |
|
| 12 | +GPIO.setup(switch, GPIO.IN) |
|
| 13 | + |
|
| 14 | +for i in range(10): |
|
| 15 | + GPIO.output(led, GPIO.HIGH) |
|
| 16 | + time.sleep(5) |
|
| 17 | + GPIO.output(led, GPIO.LOW) |
|
| 18 | + time.sleep(5) |
|
| 19 | + print('Switch status = ', GPIO.input(switch)) |
|
| 20 | + |
|
| 21 | +GPIO.cleanup() |
|
| ... | ... | \ No newline at end of file |
SDK-dat/python-dat/circuitpython-dat/circuitpython-dat.md
| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | + |
|
| 2 | +# circuitpython-dat |
|
| 3 | + |
|
| 4 | +circuitpython |
|
| 5 | +- board |
|
| 6 | +- digitalio |
|
| 7 | +- wws_74hc165 |
|
| ... | ... | \ No newline at end of file |
SDK-dat/python-dat/python-dat.md
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | + |
|
| 2 | +# python-dat.md |
|
| 3 | + |
|
| 4 | + |
|
| 5 | +## install |
|
| 6 | + |
|
| 7 | +windows |
|
| 8 | + |
|
| 9 | +https://www.python.org/downloads/release/python-3135/ |
|
| 10 | + |
|
| 11 | + C:\Users\Administrator>python -V |
|
| 12 | + Python 3.13.5 |
|
| 13 | + |
|
| 14 | +## pi74HC595 |
|
| 15 | + |
|
| 16 | +pi74HC595-1.2.3-py3-none-any.whl |
|
| 17 | + |
|
| 18 | +pip install pi74HC595-1.2.3-py3-none-any.whl |
|
| 19 | + |
|
| 20 | + |
|
| 21 | + pi@raspberrypi:~ $ pip install pi74HC595-1.2.3-py3-none-any.whl |
|
| 22 | + -bash: pip: command not found |
|
| 23 | + |
|
| 24 | + |
|
| 25 | + |
|
| 26 | +## libraries |
|
| 27 | + |
|
| 28 | +apt install python3-Image |
|
| 29 | + |
|
| 30 | +pip install python3-Image |
|
| 31 | + |
|
| 32 | + |
|
| 33 | +## version check |
|
| 34 | + |
|
| 35 | + root@raspberrypi:/home/pi# python -V |
|
| 36 | + Python 3.11.2 |
|
| 37 | + |
|
| 38 | + |
|
| 39 | + |
|
| 40 | + |
|
| 41 | +- [[RPI-python-dat]] - [[python-error-dat]] |
|
| ... | ... | \ No newline at end of file |
SDK-dat/python-dat/python-error-dat.md
| ... | ... | @@ -0,0 +1,30 @@ |
| 1 | + |
|
| 2 | +# python-error-dat.md |
|
| 3 | + |
|
| 4 | + root@raspberrypi:/home/pi# pip install Image |
|
| 5 | + error: externally-managed-environment |
|
| 6 | + |
|
| 7 | + × This environment is externally managed |
|
| 8 | + ╰─> To install Python packages system-wide, try apt install |
|
| 9 | + python3-xyz, where xyz is the package you are trying to |
|
| 10 | + install. |
|
| 11 | + |
|
| 12 | + If you wish to install a non-Debian-packaged Python package, |
|
| 13 | + create a virtual environment using python3 -m venv path/to/venv. |
|
| 14 | + Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make |
|
| 15 | + sure you have python3-full installed. |
|
| 16 | + |
|
| 17 | + For more information visit http://rptl.io/venv |
|
| 18 | + |
|
| 19 | + note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. |
|
| 20 | + hint: See PEP 668 for the detailed specification. |
|
| 21 | + |
|
| 22 | + |
|
| 23 | +how to solve |
|
| 24 | + |
|
| 25 | + pip3 install Pillow --break-system-packages |
|
| 26 | + |
|
| 27 | + |
|
| 28 | + The error lgpio.error: 'GPIO not allocated' usually indicates an issue with accessing the GPIO pins on your Raspberry Pi. Here are the common solutions: |
|
| 29 | + |
|
| 30 | +**apt-get install python3-rpi.gpio** |
|
| ... | ... | \ No newline at end of file |
SDK-dat/wiringpi-dat/wiringpi-dat.md
| ... | ... | @@ -0,0 +1,71 @@ |
| 1 | + |
|
| 2 | +# wiringpi-dat |
|
| 3 | + |
|
| 4 | +https://github.com/WiringPi/WiringPi/releases |
|
| 5 | + |
|
| 6 | +## install arm64 |
|
| 7 | + |
|
| 8 | +https://github.com/WiringPi/WiringPi/releases/tag/3.10 |
|
| 9 | + |
|
| 10 | + wget https://github.com/WiringPi/WiringPi/releases/download/3.10/wiringpi_3.10_arm64.deb |
|
| 11 | + |
|
| 12 | + apt install ./wiringpi_3.10_arm64.deb |
|
| 13 | + |
|
| 14 | + |
|
| 15 | + |
|
| 16 | + root@rpi:/home/admin# gpio readall |
|
| 17 | + +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+ |
|
| 18 | + | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | |
|
| 19 | + +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ |
|
| 20 | + | | | 3.3v | | | 1 || 2 | | | 5v | | | |
|
| 21 | + | 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5v | | | |
|
| 22 | + | 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | | |
|
| 23 | + | 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | IN | TxD | 15 | 14 | |
|
| 24 | + | | | 0v | | | 9 || 10 | 1 | IN | RxD | 16 | 15 | |
|
| 25 | + | 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 | |
|
| 26 | + | 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | | |
|
| 27 | + | 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 | |
|
| 28 | + | | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 | |
|
| 29 | + | 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | | |
|
| 30 | + | 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 | |
|
| 31 | + | 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 | |
|
| 32 | + | | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 | |
|
| 33 | + | 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 | |
|
| 34 | + | 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | | |
|
| 35 | + | 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 | |
|
| 36 | + | 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | | |
|
| 37 | + | 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 | |
|
| 38 | + | 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 | |
|
| 39 | + | | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 | |
|
| 40 | + +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ |
|
| 41 | + | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | |
|
| 42 | + +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+ |
|
| 43 | + |
|
| 44 | + |
|
| 45 | + |
|
| 46 | +## install method 1 |
|
| 47 | + |
|
| 48 | +Unzip/use the portable prebuilt verison: |
|
| 49 | + |
|
| 50 | + # unzip the archive |
|
| 51 | + tar -xfv wiringpi_3.0.tar.gz |
|
| 52 | + |
|
| 53 | +Install the debian package: |
|
| 54 | + |
|
| 55 | + # install a dpkg |
|
| 56 | + sudo apt install ./wiringpi-3.0-1.deb |
|
| 57 | + sudo apt install ./wiringpi_3.10_armhf.deb |
|
| 58 | + sudo apt install ./wiringpi_3.10_arm64.deb |
|
| 59 | +## install method 2 |
|
| 60 | + |
|
| 61 | + wget https://project-downloads.drogon.net/wiringpi-latest.deb |
|
| 62 | + sudo dpkg -i wiringpi-latest.deb |
|
| 63 | + |
|
| 64 | +## install method 3 |
|
| 65 | + |
|
| 66 | + sudo apt-get install wiringpi |
|
| 67 | + |
|
| 68 | + |
|
| 69 | +## ref |
|
| 70 | + |
|
| 71 | +- [[apt-get-dat]] |
|
| ... | ... | \ No newline at end of file |
SDK-dat/wiringpi-dat/wiringpi_3.10_arm64.deb
| ... | ... | Binary files /dev/null and b/SDK-dat/wiringpi-dat/wiringpi_3.10_arm64.deb differ |
SDK-dat/wiringpi-dat/wiringpi_3.10_armhf.deb
| ... | ... | Binary files /dev/null and b/SDK-dat/wiringpi-dat/wiringpi_3.10_armhf.deb differ |
code-dat/C-dat/C-dat.md
| ... | ... | @@ -1,24 +0,0 @@ |
| 1 | - |
|
| 2 | -# C-dat |
|
| 3 | - |
|
| 4 | -command example |
|
| 5 | - |
|
| 6 | - ./epd |
|
| 7 | - |
|
| 8 | - |
|
| 9 | -## The 'clang-format' command is not available. Please check your clang-format.executable user setting and ensure it is installed. |
|
| 10 | - |
|
| 11 | -clang-format.executable |
|
| 12 | - |
|
| 13 | -This error message gets thrown at https://github.com/xaverh/vscode-clang-format-provider/blob/master/src/extension.ts#L187. It ususally appears when the clang-format extension cannot find clang-format. |
|
| 14 | -It requires clang-format by LLVM in order to work. You can either download it from http://llvm.org or install it via npm install -g clang-format or through a package manager (apt, pacman, brew, nuget, dnf). |
|
| 15 | - |
|
| 16 | -http://llvm.org/ |
|
| 17 | - |
|
| 18 | -https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8 == LLVM-18.1.8-woa64.exe |
|
| 19 | - |
|
| 20 | -"clang-format.executable": "C:\\Program Files (x86)\\LLVM\\bin\\clang-format.exe" |
|
| 21 | - |
|
| 22 | -D:\Program Files\LLVM\bin\clang-format.exe |
|
| 23 | - |
|
| 24 | -- [[MSYS2-dat]] |
|
| ... | ... | \ No newline at end of file |
code-dat/C-dat/MSYS2-dat/MSYS2-dat.md
| ... | ... | @@ -1,4 +0,0 @@ |
| 1 | - |
|
| 2 | -# MSYS2-dat |
|
| 3 | - |
|
| 4 | -Download MSYS2: https://www.msys2.org |
|
| ... | ... | \ No newline at end of file |
code-dat/C-dat/rpi-c-dat/rpi-c-dat.md
| ... | ... | @@ -1,35 +0,0 @@ |
| 1 | - |
|
| 2 | -# rpi-c-dat |
|
| 3 | - |
|
| 4 | - chmod +x 2_5449615149826598388 |
|
| 5 | - |
|
| 6 | - (.venv) root@raspberrypi:/home/pi# ./2_5449615149826598388 |
|
| 7 | - |
|
| 8 | - ./2_5449615149826598388: error while loading shared libraries: libwiringPi.so: cannot open shared object file: No such file or directory |
|
| 9 | - |
|
| 10 | - |
|
| 11 | -## library |
|
| 12 | - |
|
| 13 | -- [[WiringPi-dat]] |
|
| 14 | - |
|
| 15 | - |
|
| 16 | -## compile |
|
| 17 | - |
|
| 18 | -compile |
|
| 19 | - |
|
| 20 | - g++ rsr.cpp -o rsr2 -lwiringPi |
|
| 21 | - |
|
| 22 | - |
|
| 23 | -## errors |
|
| 24 | - |
|
| 25 | -wrong 32bit version installed: |
|
| 26 | - |
|
| 27 | - gpio: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory |
|
| 28 | - |
|
| 29 | - |
|
| 30 | -## ref |
|
| 31 | - |
|
| 32 | -- [[rpi-dat]] |
|
| 33 | - |
|
| 34 | - |
|
| 35 | - |
code-dat/code-dat.md
| ... | ... | @@ -1,4 +0,0 @@ |
| 1 | - |
|
| 2 | -# code-dat.md |
|
| 3 | - |
|
| 4 | -- [[c-dat]] - [[]] |
|
| ... | ... | \ No newline at end of file |
code-dat/linux-dat/apt-get-dat/apt-get-dat.md
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | - |
|
| 2 | -# apt-get-dat.md |
|
| 3 | - |
|
| 4 | -purge |
|
| 5 | - |
|
| 6 | - apt-get remove --purge wiringpi:armhf |
|
| ... | ... | \ No newline at end of file |
code-dat/linux-dat/linux-dat.md
| ... | ... | @@ -1,5 +0,0 @@ |
| 1 | - |
|
| 2 | - |
|
| 3 | -# linux-dat |
|
| 4 | - |
|
| 5 | -- [[apt-get-dat]] |
|
| ... | ... | \ No newline at end of file |
code-dat/python-dat/RPI-python-dat/RPI-python-dat.md
| ... | ... | @@ -1,47 +0,0 @@ |
| 1 | - |
|
| 2 | -# RPI-python-dat |
|
| 3 | - |
|
| 4 | -apt-get install pip |
|
| 5 | - |
|
| 6 | - Note, selecting 'python3-pip' instead of 'pip' |
|
| 7 | - |
|
| 8 | - |
|
| 9 | - |
|
| 10 | -## setup env |
|
| 11 | - |
|
| 12 | - python3 -m venv .venv |
|
| 13 | - source .venv/bin/activate |
|
| 14 | - |
|
| 15 | - pip install RPi.GPIO |
|
| 16 | - pip install SN74HC165 |
|
| 17 | - |
|
| 18 | - |
|
| 19 | -## rpi library |
|
| 20 | - |
|
| 21 | -- [[pigpio-dat]] |
|
| 22 | -- pi74HC595 |
|
| 23 | - |
|
| 24 | -- [[wiringpi-dat]] |
|
| 25 | -- pip3 install woolseyworkshop-circuitpython-74hc165 |
|
| 26 | - |
|
| 27 | -- [[circuitpython-dat]] |
|
| 28 | - |
|
| 29 | - |
|
| 30 | -build-in library: |
|
| 31 | -- time, threading, |
|
| 32 | - |
|
| 33 | -### error |
|
| 34 | - |
|
| 35 | -- ~~SN74HC165 ?? ~~ |
|
| 36 | - |
|
| 37 | - |
|
| 38 | -## hardware driver |
|
| 39 | - |
|
| 40 | -- [[74HC595-dat]] - [[74HC165-dat]] |
|
| 41 | - |
|
| 42 | - |
|
| 43 | -## ref |
|
| 44 | - |
|
| 45 | -- [[rpi-dat]] |
|
| 46 | - |
|
| 47 | -- [[python-dat]] |
|
| ... | ... | \ No newline at end of file |
code-dat/python-dat/RPI-python-dat/pigpio-dat.md
| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | - |
|
| 2 | -# pigpio-dat.md |
|
| 3 | - |
|
| 4 | -- https://github.com/joan2937/pigpio |
|
| 5 | -- examples - https://abyz.me.uk/rpi/pigpio/examples.html |
|
| 6 | - |
|
| 7 | - |
code-dat/python-dat/RPI-python-dat/rpi-python-gpio-demo-1.py
| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | - |
|
| 2 | -# rpi-python-gpio-demo-1.py |
|
| 3 | - |
|
| 4 | -import RPi.GPIO as GPIO |
|
| 5 | -import time |
|
| 6 | - |
|
| 7 | -led = 29 |
|
| 8 | -switch = 31 |
|
| 9 | - |
|
| 10 | -GPIO.setmode(GPIO.BOARD) |
|
| 11 | -GPIO.setup(led, GPIO.OUT) |
|
| 12 | -GPIO.setup(switch, GPIO.IN) |
|
| 13 | - |
|
| 14 | -for i in range(10): |
|
| 15 | - GPIO.output(led, GPIO.HIGH) |
|
| 16 | - time.sleep(5) |
|
| 17 | - GPIO.output(led, GPIO.LOW) |
|
| 18 | - time.sleep(5) |
|
| 19 | - print('Switch status = ', GPIO.input(switch)) |
|
| 20 | - |
|
| 21 | -GPIO.cleanup() |
|
| ... | ... | \ No newline at end of file |
code-dat/python-dat/circuitpython-dat/circuitpython-dat.md
| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | - |
|
| 2 | -# circuitpython-dat |
|
| 3 | - |
|
| 4 | -circuitpython |
|
| 5 | -- board |
|
| 6 | -- digitalio |
|
| 7 | -- wws_74hc165 |
|
| ... | ... | \ No newline at end of file |
code-dat/python-dat/python-dat.md
| ... | ... | @@ -1,41 +0,0 @@ |
| 1 | - |
|
| 2 | -# python-dat.md |
|
| 3 | - |
|
| 4 | - |
|
| 5 | -## install |
|
| 6 | - |
|
| 7 | -windows |
|
| 8 | - |
|
| 9 | -https://www.python.org/downloads/release/python-3135/ |
|
| 10 | - |
|
| 11 | - C:\Users\Administrator>python -V |
|
| 12 | - Python 3.13.5 |
|
| 13 | - |
|
| 14 | -## pi74HC595 |
|
| 15 | - |
|
| 16 | -pi74HC595-1.2.3-py3-none-any.whl |
|
| 17 | - |
|
| 18 | -pip install pi74HC595-1.2.3-py3-none-any.whl |
|
| 19 | - |
|
| 20 | - |
|
| 21 | - pi@raspberrypi:~ $ pip install pi74HC595-1.2.3-py3-none-any.whl |
|
| 22 | - -bash: pip: command not found |
|
| 23 | - |
|
| 24 | - |
|
| 25 | - |
|
| 26 | -## libraries |
|
| 27 | - |
|
| 28 | -apt install python3-Image |
|
| 29 | - |
|
| 30 | -pip install python3-Image |
|
| 31 | - |
|
| 32 | - |
|
| 33 | -## version check |
|
| 34 | - |
|
| 35 | - root@raspberrypi:/home/pi# python -V |
|
| 36 | - Python 3.11.2 |
|
| 37 | - |
|
| 38 | - |
|
| 39 | - |
|
| 40 | - |
|
| 41 | -- [[RPI-python-dat]] - [[python-error-dat]] |
|
| ... | ... | \ No newline at end of file |
code-dat/python-dat/python-error-dat.md
| ... | ... | @@ -1,30 +0,0 @@ |
| 1 | - |
|
| 2 | -# python-error-dat.md |
|
| 3 | - |
|
| 4 | - root@raspberrypi:/home/pi# pip install Image |
|
| 5 | - error: externally-managed-environment |
|
| 6 | - |
|
| 7 | - × This environment is externally managed |
|
| 8 | - ╰─> To install Python packages system-wide, try apt install |
|
| 9 | - python3-xyz, where xyz is the package you are trying to |
|
| 10 | - install. |
|
| 11 | - |
|
| 12 | - If you wish to install a non-Debian-packaged Python package, |
|
| 13 | - create a virtual environment using python3 -m venv path/to/venv. |
|
| 14 | - Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make |
|
| 15 | - sure you have python3-full installed. |
|
| 16 | - |
|
| 17 | - For more information visit http://rptl.io/venv |
|
| 18 | - |
|
| 19 | - note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. |
|
| 20 | - hint: See PEP 668 for the detailed specification. |
|
| 21 | - |
|
| 22 | - |
|
| 23 | -how to solve |
|
| 24 | - |
|
| 25 | - pip3 install Pillow --break-system-packages |
|
| 26 | - |
|
| 27 | - |
|
| 28 | - The error lgpio.error: 'GPIO not allocated' usually indicates an issue with accessing the GPIO pins on your Raspberry Pi. Here are the common solutions: |
|
| 29 | - |
|
| 30 | -**apt-get install python3-rpi.gpio** |
|
| ... | ... | \ No newline at end of file |
code-dat/wiringpi-dat/wiringpi-dat.md
| ... | ... | @@ -1,71 +0,0 @@ |
| 1 | - |
|
| 2 | -# wiringpi-dat |
|
| 3 | - |
|
| 4 | -https://github.com/WiringPi/WiringPi/releases |
|
| 5 | - |
|
| 6 | -## install arm64 |
|
| 7 | - |
|
| 8 | -https://github.com/WiringPi/WiringPi/releases/tag/3.10 |
|
| 9 | - |
|
| 10 | - wget https://github.com/WiringPi/WiringPi/releases/download/3.10/wiringpi_3.10_arm64.deb |
|
| 11 | - |
|
| 12 | - apt install ./wiringpi_3.10_arm64.deb |
|
| 13 | - |
|
| 14 | - |
|
| 15 | - |
|
| 16 | - root@rpi:/home/admin# gpio readall |
|
| 17 | - +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+ |
|
| 18 | - | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | |
|
| 19 | - +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ |
|
| 20 | - | | | 3.3v | | | 1 || 2 | | | 5v | | | |
|
| 21 | - | 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5v | | | |
|
| 22 | - | 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | | |
|
| 23 | - | 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | IN | TxD | 15 | 14 | |
|
| 24 | - | | | 0v | | | 9 || 10 | 1 | IN | RxD | 16 | 15 | |
|
| 25 | - | 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 | |
|
| 26 | - | 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | | |
|
| 27 | - | 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 | |
|
| 28 | - | | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 | |
|
| 29 | - | 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | | |
|
| 30 | - | 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 | |
|
| 31 | - | 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 | |
|
| 32 | - | | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 | |
|
| 33 | - | 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 | |
|
| 34 | - | 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | | |
|
| 35 | - | 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 | |
|
| 36 | - | 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | | |
|
| 37 | - | 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 | |
|
| 38 | - | 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 | |
|
| 39 | - | | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 | |
|
| 40 | - +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ |
|
| 41 | - | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | |
|
| 42 | - +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+ |
|
| 43 | - |
|
| 44 | - |
|
| 45 | - |
|
| 46 | -## install method 1 |
|
| 47 | - |
|
| 48 | -Unzip/use the portable prebuilt verison: |
|
| 49 | - |
|
| 50 | - # unzip the archive |
|
| 51 | - tar -xfv wiringpi_3.0.tar.gz |
|
| 52 | - |
|
| 53 | -Install the debian package: |
|
| 54 | - |
|
| 55 | - # install a dpkg |
|
| 56 | - sudo apt install ./wiringpi-3.0-1.deb |
|
| 57 | - sudo apt install ./wiringpi_3.10_armhf.deb |
|
| 58 | - sudo apt install ./wiringpi_3.10_arm64.deb |
|
| 59 | -## install method 2 |
|
| 60 | - |
|
| 61 | - wget https://project-downloads.drogon.net/wiringpi-latest.deb |
|
| 62 | - sudo dpkg -i wiringpi-latest.deb |
|
| 63 | - |
|
| 64 | -## install method 3 |
|
| 65 | - |
|
| 66 | - sudo apt-get install wiringpi |
|
| 67 | - |
|
| 68 | - |
|
| 69 | -## ref |
|
| 70 | - |
|
| 71 | -- [[apt-get-dat]] |
|
| ... | ... | \ No newline at end of file |
code-dat/wiringpi-dat/wiringpi_3.10_arm64.deb
| ... | ... | Binary files a/code-dat/wiringpi-dat/wiringpi_3.10_arm64.deb and /dev/null differ |
code-dat/wiringpi-dat/wiringpi_3.10_armhf.deb
| ... | ... | Binary files a/code-dat/wiringpi-dat/wiringpi_3.10_armhf.deb and /dev/null differ |