Important: The CE in the raspberry corresponds to the chip select (In the transiver this pin is called CSE).
Important: The CE in the transciver corresponds to chip enable
The result of the conections is the following:
From the command line or Terminal window start by running the following command :
sudo raspi-config - This will launch the raspi-config utility.
- Select "Interfacing Options".
- Highlight the "SPI" option and activate "-Select-".
- Select and activate "-Yes-".
- Highlight and activate "-Ok-".
- When prompted to reboot highlight and activate "-Yes-".
The Raspberry Pi will reboot and the interface will be enabled.
pip install board - library needen for CircuitPython_nRF24L01
pip install Adafruit-Blinka - library needed for CircuitPython_nRF24L01. Resolves No module named 'digitalio'
To automatically mount any USB drive connected in the raspberry do:
Install:
sudo apt install usbmount
Then do:
- Edit the following file in an editor:
sudo nano /lib/systemd/system/systemd-udevd.service
- Look for the line with the contents:
PrivateMounts=yes - Change the yes in the line to no, like so:
PrivateMounts=no - reboot
- Configurar permisos de usbmount. El archivo de configuración se encuentra en /etc/usbmount/usbmount.conf.
- Abre el archivo usbmount.conf como 'sudo nano' y busca la línea que comienza con MOUNTOPTIONS
- Cambia la linea por: MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,uid=pi,gid=pi,dmask=000,fmask=111"
- Guarda cambios y reinicia usbmount: sudo systemctl restart udisks2
Your USB devices should now auto mount at /media/usb0, /media/usb1 and so on.
De hecho, como nuestra raspberry solo tiene un puerto USB, estará siempre en /media/usb/
Reference: https://stackoverflow.com/questions/74474113/auto-mount-usb-drive-to-raspberry-pi-without-boot També recordar tema metadatos: fer ls -a al directory per veure TOTS els fitxers que hi ha.
In windows, all the files need to be edited with Notepad++ if not, you could destroy the format.
- Connect SD to PC.
- Edit the file
config.txtin thebootfspartition. Append a new line:dtoverlay=dwc2at the bottom of the file. - In the same file, comment the line that contains:
otg_mode=1using #. - Save and close the file.
- Edit the file
cmdline.txtin thebootfspartition. Addmodules-load=dwc2,g_etherafter therootwaitcommand separated using spaces. - Save and close the file.
- Add an empty file called:
sshin thebootfspartition. - Connect the raspberry to your computer using a good cable (important), through the data port (the middle one).
- A new USB-Ethernet connection should appear. Select: Allow other network users to connect through this computer's Internet connection.
Reference: https://www.makeuseof.com/how-to-connect-raspberry-pi-to-laptop-or-pc-usb/
En caso de que no te funcione podria ser fallo de los drivers. Intenta con este video que complementa el tutorial anterior: https://www.youtube.com/watch?v=XaTmG708Mss
Para crear la clave SSH de GitHub, sigue estos pasos en la terminal:
- Genera una nueva clave SSH utilizando tu correo electrónico como etiqueta:
ssh-keygen -t rsa -b 4096 -C "tu_email@example.com" - Inicia el agente SSH en segundo plano:
eval "$(ssh-agent -s)"
- Añade tu clave SSH al ssh-agent:
ssh-add ~/.ssh/id_rsa - Copia exactamente lo que salga al ejecutar:
cat ~/.ssh/id_rsa.pub - Luego, sigue estos pasos en GitHub: Ve a GitHub y inicia sesión. Haz clic en tu foto de perfil en la esquina superior derecha y selecciona Settings. En el menú lateral, selecciona SSH and GPG keys. Haz clic en el botón New SSH key. En el campo "Title", añade un nombre descriptivo para tu llave. Por ejemplo, "Raspberry Pi key". En el campo "Key", pega la llave SSH pública que copiaste anteriormente. Haz clic en Add SSH key.
- Finalmente, esto te confirmará si está bien creada la clave SSH:
ssh -T git@github.com


