Raspberry : Différence entre versions
| Ligne 99 : | Ligne 99 : | ||
==Domotique== | ==Domotique== | ||
| + | |||
===Installation de WebIOPi=== | ===Installation de WebIOPi=== | ||
| Ligne 182 : | Ligne 183 : | ||
Conclusion | Conclusion | ||
| + | |||
En savoir plus sur http://www.windtopik.fr/gpio-avec-webiopi/#3si83tIUK7hGJix6.99 | En savoir plus sur http://www.windtopik.fr/gpio-avec-webiopi/#3si83tIUK7hGJix6.99 | ||
Version du 24 novembre 2015 à 18:25
Le Raspberry PI
Les Tutos
Port Infrarouge
http://forum.stmlabs.com/showthread.php?tid=5549
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=65&t=27417
OPENELEC 3.0.0
Sortie RCA
La sortie RCA n'est activé que si le port HDMI n'est pas branché et que la ligne suivante dans le fichier config.txt est:
hdmi_force_hotplug=0
Modifier fichier config.txt
En SSH
mount /flash -o remount,rw
Clavier en français
sudo vi /etc/default/keyboard et remplacer dans le champ du clavier en par fr sauver et rebooter.
Bluetooth
sudo apt-get install bluetooth bluez-utils blueman sudo /etc/init.d/bluetooth restart sudo /etc/init.d/bluetooth start sudo modprobe btusb sudo -s <Votre mot de passe root> sudo echo "050d 065a" >> /sys/bus/usb/drivers/btusb/new_id
Rappel de quelques commandes utiles à garder sous la main (surtout en tête)
- Démarrer le serveur X
startx
- Accéder au panneau de contrôle Raspbian
sudo raspi-config
- Changer les paramètres de l'affichage graphique (commenter, dé-commenter ou modifier les 4 lignes)
sudo vi /boot/config.txt
overscan_left=-40
overscan_right=-40
overscan_top=-40
overscan_bottom=-40
- Changer la sortie audio
sudo amixer cset numid=3 1 #sortie jack
sudo amixer cset numid=3 2 #sortie HDMI
- Redémarrer le RPi
sudo shutdown -r now ou sudo reboot
- Arrêter le RPi
sudo shutdown -h now ou sudo halt
- Connaître la température du CPU
/opt/vc/bin/vcgencmd measure_temp
- Lire une vidéo avec OMXPlayer
omxplayer /emplacement/vers/la/vidéo
- Recherche de programme
sudo apt-cache search nom_du_programme
- Installation de programme
sudo apt-get install nom_du_programme
Domotique
Installation de WebIOPi
Nous allons donc récupérer le logiciel et l’installer sur notre Raspberry-Pi. Pour ce faire, on lance les commandes suivantes à partir du terminal ou en connexion SSH :
1 wget http://webiopi.googlecode.com/files/WebIOPi-0.6.0.tar.gz 2 tar xvzf WebIOPi-0.6.0.tar.gz 3 cd WebIOPi-0.6.0 4 sudo ./setup.sh
L’installation et maintenant terminé ! Malgré tout, noter bien que le serveur et l’état GPIO seront perdus quand vous arrêterez le script ou fermerez le terminal.
Lancement du soft
Pour commencer on lance le logiciel avec la commande suivante :
1 sudo /etc/init.d/webiopi start
Maintenant, on lance notre navigateur web et on spécifie l’URL de votre Raspberry-Pi et le port « 8000 ». Soit « http://@Ip_du_RPI:8000 ».
Ensuite connectez-vous avec les identifiants suivants :
Identifiant : webiopi
Mot de passe : raspberry
Vous devriez alors accéder à la page
Menu de WebIOPi
Menu principal
Une fois sur l’interface web, il vous suffit de choisir le lien d’en-tête GPIO sur la page principale , vous
pourrez alors contrôler GPIO
Menu Webiopi
Interface de GPIO Header Pour modifier les états, il faut :
Cliquer sur la touche OUT > IN pour changer de direction GPIO . Cliquer sur la broche pour changer l’état de sortie GPIO .
Configuration
Si vous souhaitez personnaliser les paramètres du soft, voici quelques commandes qui pourront vous être utiles. Modifier le port HTTP : On se déplace dans le répertoire du soft.
1 cd /etc/webiopi/config
Puis il vous suffit de remplacer la ligne correspondant au port souhaité :
1 [HTTP] 2 enabled = true 3 port = 8000 4 passwd-file = /etc/webiopi/passwd 5 doc-root = /home/pi/webiopi/examples/scripts/macros 6 welcome-file = index.html
Changer son Identifiant/Mot de passe :
Le soft utilise par défaut un fichier crypté qui contient à la fois login et mot de passe.
Vous devez utiliser « webiopi-passwd » pour générer ce fichier.
1 webiopi-passwd -h 2 WebIOPi passwd file generator 3 Usage: webiopi-passwd [--help|file] 4 Compute and display hash used by WebIOPi for Authentication 5 Login and Password are prompted 6 --help Display this help 7 -h 8 file Save hash to file
Démarrer/Arrêter le service :
1 sudo /etc/init.d/webiopi start 2 sudo /etc/init.d/webiopi stop
Démarrer le service au démarrage du système :
1 sudo update-rc.d webiopi defaults
Conclusion
En savoir plus sur http://www.windtopik.fr/gpio-avec-webiopi/#3si83tIUK7hGJix6.99
Liens sympas
- Multiboot SD
http://www.berryterminal.com/doku.php/berryboot
- JARVIS
http://intelligenceonline.synergize.co/accueil http://blog.idleman.fr/raspberry-pi-21-yana-un-nouveau-cur-domotique/
- NEOGEO
http://gngeo.berlios.de/?page=faq
- Robot
http://www.wakdev.com/projets/roverpi.html
- Module caméra du Raspberry Pi : présentation et installation
http://forum.pcinpact.com/topic/165594-raspberry-pi-fabriquons-des-trucs/page-12#entry2770965
- Tuto divers
http://forum.pcinpact.com/topic/165594-raspberry-pi-fabriquons-des-trucs/#entry2745229
- Framboise 314, le Raspberry Pi à la sauce française….
http://www.framboise314.fr/
- Scratch (programmation light)
http://scratch.mit.edu/