Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
pi-fast-gpio
Advanced tools
Super fast GPIO access on the Raspberry Pi using the pigpio daemon (for pwm, servo control, etc)
Super fast GPIO access on the Raspberry Pi using the pigpio daemon (for pwm, servo control, etc)
The pigpio library uses direct memory access (DMA) to allow you to sample the GPIOs up to 1,000,000 times per second. It also makes it fast enough to give you PWM and servo control on all GPIOs simultaneously. The servo waveforms are accurate to a few microseconds.
This code is based off of the python library included with the pigpio download.
For now you'll just have to clone this repo
Start the pigpio daemon:
$ sudo pigpiod
In your program:
There are two examples included, one that drives two servos, and one that uses PWM to change the brightness of two LEDs
Before running any of the examples, make sure the pigpio daemon is running:
$ sudo pigpiod
Watch the servos example in action here: http://youtu.be/AnlUtAq5oAM
Before running the example, please connect two servos to your Raspberry Pi. One on GPIO18 and one on GPIO23.
Go to the examples/ directory and run the code:
$ node js_servo.js
Watch the servos turn!
Watch the LED PWM example in action here: http://youtu.be/OW6yF4NuwLE
Before running the example, please connect to LEDs to your Raspberry Pi with suitable resistors. Connect one LED to GPIO24 and one to GPIO25.
Go to the examples/ directory and run the code:
$ node js_pwm.js
Watch the LEDs light up with different brightness!
(Tables copied from r-pi-gpio's readme file)
Assignment | Pin | Pin | Assignment |
---|---|---|---|
3.3V | 1 | 2 | 5V |
GPIO 0 (I2C0 SDA) | 3 | 4 | DNC |
GPIO 1 (I2C0 SCL) | 5 | 6 | GROUND |
GPIO 4 | 7 | 8 | GPIO 14 (UART TXD) |
DNC | 9 | 10 | GPIO 15 (UART RXD) |
GPIO 17 | 11 | 12 | GPIO 18 |
GPIO 21 | 13 | 14 | DNC |
GPIO 22 | 15 | 16 | GPIO 23 |
DNC | 17 | 18 | GPIO 24 |
GPIO 10 (SP10 MOSI) | 19 | 20 | DNC |
GPIO 9 (SP10 MISO) | 21 | 22 | GPIO 25 |
GPIO 11 (SP10 SCLK) | 23 | 24 | GPIO 8 (SP10 CE0 N) |
DNC | 25 | 26 | GPIO 7 (SP10 CE1 N) |
Assignment | Pin | Pin | Assignment |
---|---|---|---|
3.3V | 1 | 2 | 5V |
GPIO 2 (I2C1 SDA) | 3 | 4 | 5V |
GPIO 3 (I2C1 SCL) | 5 | 6 | GROUND |
GPIO 4 | 7 | 8 | GPIO 14 (UART TXD) |
GROUND | 9 | 10 | GPIO 15 (UART RXD) |
GPIO 17 | 11 | 12 | GPIO 18 |
GPIO 27 | 13 | 14 | GROUND |
GPIO 22 | 15 | 16 | GPIO 23 |
3.3V | 17 | 18 | GPIO 24 |
GPIO 10 (SP10 MOSI) | 19 | 20 | GROUND |
GPIO 9 (SP10 MISO) | 21 | 22 | GPIO 25 |
GPIO 11 (SP10 SCLK) | 23 | 24 | GPIO 8 (SP10 CE0 N) |
GROUND | 25 | 26 | GPIO 7 (SP10 CE1 N) |
FAQs
Super fast GPIO access on the Raspberry Pi using the pigpio daemon (for pwm, servo control, etc)
The npm package pi-fast-gpio receives a total of 5 weekly downloads. As such, pi-fast-gpio popularity was classified as not popular.
We found that pi-fast-gpio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.