Différences entre versions de « Rasp-Os-Occidentalis-v0.2 »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 92 : Ligne 92 :
 
The '''mode''' file can be used to switch between '''pwm''', '''servo''', and '''audio''' mode:
 
The '''mode''' file can be used to switch between '''pwm''', '''servo''', and '''audio''' mode:
 
* '''pwm''' - Drives a pulse with a '''frequency''' specified by the frequency file and a duty cycle of '''duty'''.
 
* '''pwm''' - Drives a pulse with a '''frequency''' specified by the frequency file and a duty cycle of '''duty'''.
* '''servo''' - A special PWM mode that will drive a servo throughout its range of rotation, starting with 0.5ms wide pulse and ending with 2.5ms, some servos only respond to 1.0-2.0ms and some have a wider range, you will need to experiment to find the full range of your servo. Values are taken from the file '''servo''', and range from 0 to '''servo_max''' (default 32 which is the max resolution of 62.5us.) The PWM system does not seem to be able to handle a resolution better than 62.5us which is approximately 20 different servo positions or speeds. If you need better resolution, please check out our 16-channel servo driver tutorial which has 16 channels and 4us resolution
+
* '''servo''' - A special PWM mode that will drive a servo throughout its range of rotation, starting with 0.5ms wide pulse and ending with 2.5ms, some servos only respond to 1.0-2.0ms and some have a wider range, you will need to experiment to find the full range of your servo. Values are taken from the file '''servo''', and range from 0 to '''servo_max''' (default 32 which is the max resolution of 62.5us.) The PWM system does not seem to be able to handle a resolution better than 62.5us which is approximately 20 different servo positions or speeds. Si vous avez besoin d'une meilleure résolution, vous pouvez consulter notre [[Rasp-Hack-16-channel-servo-driver|tutoriel sur le controleur PWM/Servo 16 canaux]] qui dispose d'une résolution de 4us ([http://mchobby.be/PrestaShop/product.php?id_product=89 produit disponible à l'achat ici chez MCHobby]
 
* '''audio''' - Echos the unfiltered contents of the right audio channel out the PWM port. Also enables '''delayed''' mode so that accidentally modifying PWM parameters won't cause the audio system to lock.
 
* '''audio''' - Echos the unfiltered contents of the right audio channel out the PWM port. Also enables '''delayed''' mode so that accidentally modifying PWM parameters won't cause the audio system to lock.
  
 +
Using the PWM and playing audio at the same time is dicey at best. If you want to mirror audio out the PWM port, write '''audio''' into the '''mode''' file and leave it. When audio playback is done, you can switch back into '''pwm''' or '''servo''' mode. Then, either write '''0''' into the '''delayed''' file to get back into immediate mode, or set your parameters and write a '''1''' into the '''activate''' file.
 +
 +
=== Advanced settings ===
 +
 +
xxx
 
{{Rasp-Os-Occidentalis-TRAILER}}
 
{{Rasp-Os-Occidentalis-TRAILER}}

Version du 16 février 2013 à 22:38

Versions

C'est la seconde distribution d'Occidentalis, Occidentalis v0.2. Rubus. Elle est dérivé de la distribution officiel Raspbian Wheezy du 16 Aout.

AdaFruit à apporté quelques modification clés pour la rendre plus utile aux hackers en électronique!

Mise-à-jours de la Version 0.2

  • Image tronquée - seulement 2.6G et donc compatible avec toutes les cartes 4G
  • Avis raspi-config retenu lors du boot
  • Retrait de l'entrée wlan0 persistante
  • Pense bête "modification de mot de passe" au login
  • Ajout des modules kernelt RTC lm-sensors
  • Inclus les modules kernel pour: DS1307 (RTC), AD626 I2C digipots, HMC6352, BMP085, ADS1015
  • Nouveau! Module Kernel PWM/Servo (Adafruit) pour un contrôle facile en PWM/Servo sur GPIO#18

Mise-à-jours de la Version 0.1

(toujours inclus dans la version 0.2)

Merci de garder en mémoire qu'AdaFruit ne sont pas des gestionnaire de distribution Linux à temps plein- AdaFruit essayera de corriger les bugs trouvé mais cette distribution n'est pas destinée au débutant Linux!

Télécharger

Cliquez ci-dessous pour télécharger le fichier ZIP:

  • Adafruit Raspberry Pi Educational Distro - Occidentalis v0.2! 900 Megs! (August 31, 2012)
  • MD5 of the img itself (not the zip): 4256c0cdad82fa193c5e902143f1ca0e
  • MD5 of the zip: 43456900352bb8bd8860902167195d83
  • SHA1 of image: a609f588bca86694989ab7672badbce423aa89fd
  • SHA1 of zip: 5f33ec07a183f336f973f82634f04108f690f5f3

et décompressez le.

Notez que l'image fait 2.6 GB! Vous aurez besoin d'une carte de 4GB ou plus. Les cartes SD de 4GB que nous proposons fonctionne très bien.

Après avoir booté, n'oubliez pas d'exécuter 'sudo raspi-config pour étendre le système de fichier (auto-expand the file system) afin qu'il occupe tout l'espace disponible sur la carte.

Caractéristiques

I2C, SPI, ...

Visitez la page de la v0.1 pour les détails relatifs aux caractéristiques des modules I2C, SPI, WiFi, Avahi et 1-Wire.

Smaller Image

First up, we did not expand the filesystem beyond 2.6G, so the image itself is much smaller - only 2.6G instead of 4G. This will make writing the image faster, and it should also work better with a variety of 4G cards. There was no way to fit this in a 2G card, otherwise we would have done it.

Password and Configuration Reminders

Second, we retained the raspi-config notice on startup, just like the stock Wheezy distro. This will help people who wanted a reminder on how to set the timezone, disk size, password, keyboard, etc.

We also added a basic password reminder into ~/.profile - it will just check if the password hasn't been changed from the default. Change your password as soon as you boot, please!

Hardware RTC Support

The biggest news is we added a bunch of fun goodies to the kernel. We added RTC support so you can have an external RTC and use hwclock - Rasp-Hack-RTC-DS1307|nous disposons d'un tutoriel à ce sujet ici]].

Modules pour Senseurs

We poked around the Kernel configuration file and added in module support for a few familiar sensors such as: AD525x Digipots, HMC6352 compass, BMP085 barometric/temp sensor, ADS1015 I2C ADCs, etc.

Note importante: we didn't write or support these kernel modules, and we're not even sure if they all work, please experiment and read any kernel documentation about these modules as we do not have any tutorials or support for them at this time!

PWM and Servo Kernel Module

The most exciting addition is our custom-written kernel module specifically for handling the PWM/Servo capability of the Raspberry Pi's GPIO #18 pin. Unfortunately there is only one PWM pin available on the GPIO header and its shared with the Audio system. That means that you can't use PWM/Servo output and play audio through the 3.5mm jack at the same time. However, there might be a few situations where you just need a single servo or PWM and audio isn't a requirement.

The module was written by Sean Cross for Adafruit Industries, code is available at our github repository (see below)

This driver can be controlled through its sysfs entries. It will create the directory /sys/class/rpi-pwm/pwm0/ and populate it with the following files:

  • active - Reports 1 if PWM is active. In delayed mode, write a 1 to this file to activate stored settings. Deactivate by writing a 0 to this file.
  • delayed - If 0, any settings made will become active immediately. If 1, then settings are stored and won't take effect until a 1 is written into active.
  • mode - The PWM mode. One of servo, pwm, or audio.
  • servo - Moves the servo to this step. Range (0..servo_max) where 0 is a 0.5ms-long pulse and servo_max is a 2.5ms-long pulse.
  • servo_max - The maximum number of servo steps, default of 32
  • duty - Duty cycle percentage for PWM mode. Range (1..99) where 1 is the shortest positive pulse and 99 is the widest positive
  • frequency - Desired frequency for PWM mode, write the value to this file
  • real_frequency - The actual computed frequency, read the value from this file.
  • mcf - A maximum common frequency (see Advanced below).

If you attempt to set a frequency or duty cycle that the Raspberry Pi does not support, you will get an error such as:

write error: Numerical result out of range

If this happens, the PWM will stop until you set values that are in range.

The mode file can be used to switch between pwm, servo, and audio mode:

  • pwm - Drives a pulse with a frequency specified by the frequency file and a duty cycle of duty.
  • servo - A special PWM mode that will drive a servo throughout its range of rotation, starting with 0.5ms wide pulse and ending with 2.5ms, some servos only respond to 1.0-2.0ms and some have a wider range, you will need to experiment to find the full range of your servo. Values are taken from the file servo, and range from 0 to servo_max (default 32 which is the max resolution of 62.5us.) The PWM system does not seem to be able to handle a resolution better than 62.5us which is approximately 20 different servo positions or speeds. Si vous avez besoin d'une meilleure résolution, vous pouvez consulter notre tutoriel sur le controleur PWM/Servo 16 canaux qui dispose d'une résolution de 4us (produit disponible à l'achat ici chez MCHobby
  • audio - Echos the unfiltered contents of the right audio channel out the PWM port. Also enables delayed mode so that accidentally modifying PWM parameters won't cause the audio system to lock.

Using the PWM and playing audio at the same time is dicey at best. If you want to mirror audio out the PWM port, write audio into the mode file and leave it. When audio playback is done, you can switch back into pwm or servo mode. Then, either write 0 into the delayed file to get back into immediate mode, or set your parameters and write a 1 into the activate file.

Advanced settings

xxx


Source: [1]

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.