As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
#! /bin/bash -p | |
IFS= | |
PATH=/bin:/usr/bin | |
# ================================================================================ | |
# MIDI Plugin | |
# ================================================================================ | |
/bin/echo "Removing MIDI plug-in /Library/Audio/MIDI Drivers/M-Audio USB Support.plugin." | |
/bin/rm -rf /Library/Audio/MIDI\ Drivers/M-Audio\ USB\ Support.plugin |
By: Diego Acuña
Original Article: http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/
A pretty common task when using this device, is to run some script (for example a python script) as a service in the operating system so it can start on boot, stop and restart using systemctl and more. In this post I'm going to explain how to set a little script as a service using Raspbian Jessie in a Raspberry Pi.
This is the short guide about how to recompile/enable --enable-ssl
option in a Squid caching proxy server. The --enable-ssl
option turned off by default, to be able to use SslBump feature we have to turn it on. To my own surprise Squid was compiled not only without --enable-ssl
flag, but also with GnuTLS due to GPL legal reasons.
Optionally enable:
# Use systemd for managing NVIDIA driver suspend in drivers ====>>> PRIOR to version 470 <<<===== | |
# https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/powermanagement.html | |
# https://forums.developer.nvidia.com/t/unable-to-set-nvidia-kernel-module-parameters/161306 | |
# Please note: In Fedora Linux you may need to just install the xorg-x11-drv-nvidia-power pakage | |
# as sugested by @goombah88 in the comments below. | |
TMP_PATH=/var/tmp | |
TMPL_PATH=/usr/share/doc/nvidia-driver-460/ | |
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=${TMP_PATH}" | sudo tee /etc/modprobe.d/nvidia-power-management.conf |
# SPDX-FileCopyrightText: Copyright (c) 2021 Tim Cocks for Adafruit Industries | |
# | |
# SPDX-License-Identifier: MIT | |
""" | |
`adafruit_st25dv16` | |
================================================================================ | |
CircuitPython driver for the I2C EEPROM of the Adafruit ST25DV16 Breakout | |
STATUS
CircuitPython does not support USB Host yet, but the basis API and partial implementation.
The idea is for CircuitPython to rely on TinyUSB, the same way it does for USB Client activities.
Some hardware that run CircuitPython are designed with USB Host in mind such as:
# dual_i2s_player.py -- demonstrate using two I2S stereo DACs at once on RP2040 / Raspberry Pi Pico | |
# 19 May 2023 - @todbot / Tod Kurt | |
# video of this code: https://www.youtube.com/watch?v=CgqECxhqJEo | |
import time, board, audiocore, audiobusio | |
# qtpy rp2040 pins | |
# in this case, board.* names just match silkscreen, don't indicate functionality | |
lck1_pin, bck1_pin, dat1_pin = board.MISO, board.MOSI, board.SCK | |
lck2_pin, bck2_pin, dat2_pin = board.SCL, board.SDA, board.TX |
# synthio_two_knob_drone_synth.py -- Got a Pico and two pots? Now you got a drone synth | |
# 5 Jun 2023 - @todbot / Tod Kurt | |
# video demo: https://www.youtube.com/watch?v=KsSRaKjhmHg | |
import time, random, board, analogio, audiopwmio, synthio | |
knob1 = analogio.AnalogIn(board.GP26) | |
knob2 = analogio.AnalogIn(board.GP27) | |
audio = audiopwmio.PWMAudioOut(board.GP10) | |
synth = synthio.Synthesizer(sample_rate=22050) |
# synthio_filter_test.py -- trying out new filter PR, knobs control frequency and resonance | |
# 5 Jun 2023 - @todbot / Tod Kurt | |
import time, random, board, analogio, audiopwmio, synthio | |
audio = audiopwmio.PWMAudioOut(board.GP10) | |
synth = synthio.Synthesizer(sample_rate=22050) | |
audio.play(synth) | |
knob1 = analogio.AnalogIn(board.GP26) | |
knob2 = analogio.AnalogIn(board.GP27) |