This is a follow up video to my "Web server to control GPIO on a Raspberry Pi with websockets" video. It demos using a UDP communication link in NodeJS to talk to other programs (e.g. Python) and devices. It also demos using a embedded video camera link, analog sliders, and text input/output in the browser.
Video on how to install Node JS at:
• Web server to control GPIO on a Raspberry ...
Code and documentation at
https://github.com/StevesRandomProjec...
IMPORTANT NOTES: Do not install node.js via the "apt" package manager. This project will not work if you don't install node manually by downloading from node.js.org instead. Following the instructions exactly except for:
1) Use the 32bit Raspberry Pi OS Desktop WITHOUT recommend software. The full desktop version of OS now includes a version of node preinstalled that will not work with this project. When I originally made this video, the full desktop version did not include node preinstalled.
2) Use a newer version of node. As of August 2022, Node JS v16.16.0 with npm v8.11.0 works fine for me. For the most part, the newest version of node work although occasionally you may need to revert to an earlier package if bugs are introduced. See my previous video description for more information if needed.
If when running
python3 txrx.py
If you get an error" ModuleNotFoundError: No module named 'RPi'", run the following command first:
sudo apt install python3-rpi.gpio
Then rerun
python3 txrx.py
If when running
python3 txrx.py
you get and error "OSError: [Errno 98] Address already in use", the issue is a previous time you ran rxtx.py is still running in the background. The easiest thing to do is just reboot the pi. Or you could run htop and kill all the "python3 txrx.py" processes that are running.
In questa pagina del sito puoi guardare il video online Web server with WebSockets for other programs/devices (e.g. Python) on Raspberry Pi using Node JS della durata di ore minuti seconda in buona qualità , che l'utente ha caricato StevesProjects 17 giugno 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 8,686 volte e gli è piaciuto 189 spettatori. Buona visione!