nerves/README.md

68 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2021-04-21 11:45:47 +00:00
# Nerves
2021-04-26 00:34:15 +00:00
A termeal version with neopixel led strip on raspberry pi (Raspberry Pi 1 is fine).
Termeal : color depends on port number of sniffed packet.
A change mode function is included but only scapy mode work yet.
Neopixel strip (3 wires : 5V,GND,IN) :
* Neopixel GPIO D18 #(-> pin 12)
* GND pin 9
* 5 V pin 4
Physical buttons :
* Func button : GPIO 23 (->pin 16) / GND pin 14
* Down button : GPIO 24 (->pin 18) / GND pin 20
2021-04-30 00:11:12 +00:00
Default port websocket server : 8081
2021-04-26 00:34:15 +00:00
# Control
2021-04-26 01:32:28 +00:00
2 physical buttons and Webpage. Choose your webserver, edit config.js (to your pi webadress) and copy www directory. Browse to pi address.
2021-04-26 00:34:15 +00:00
2021-04-30 00:11:12 +00:00
# Modes
* 'scapy' : listen to local network interface
* 'rainbow' : rainbow animation
2021-05-01 18:03:51 +00:00
* 'remote' : use termspy.py to listen a remote computer and send to nerves for display
2021-04-21 11:45:47 +00:00
# Install
sudo apt install python3-pip
2021-04-26 00:34:15 +00:00
2021-04-21 11:45:47 +00:00
sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel
2021-04-26 00:34:15 +00:00
2021-04-21 11:45:47 +00:00
sudo python3 -m pip install --force-reinstall adafruit-blinka
2021-04-26 00:34:15 +00:00
2021-04-21 11:45:47 +00:00
sudo pip3 install scapy
2021-04-26 00:34:15 +00:00
For automatic shutdown :
sudo nano /etc/sudoers
add :
pi raspberrypi =NOPASSWD: /usr/bin/systemctl poweroff
# Autorun
To autorun nerves at boot time :
2021-04-26 01:32:28 +00:00
A supervisor conf is given.
2021-04-26 00:34:15 +00:00
cd nerves
sudo cp /home/pi/nerves/autorun.conf /etc/supervisor/conf.d/
sudo supervisorctl reload
2021-04-21 11:45:47 +00:00
2021-04-27 00:43:12 +00:00
2021-04-26 01:32:28 +00:00
# Based on :
2021-04-21 11:45:47 +00:00
2021-04-26 01:32:28 +00:00
* https://www.instructables.com/Fiber-Optic-LED-Lamp/
2021-04-26 00:34:15 +00:00
* https://github.com/loloster/termeal
* https://github.com/s0r00t/sniffeal