Merge pull request #48 from RogueM/retrofit
removed wiring pi example from pin-3.md for all LANG
This commit is contained in:
commit
e3afbf691f
|
@ -15,7 +15,14 @@ strings:
|
|||
- type_classic: 'Classic form-factor'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_i2c: 'Uses I2C'
|
||||
- uses_spi: 'Uses SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_n_gpio_pins: ' Uses {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} on Rev 1 ( very early ) Pi'
|
||||
- physical_pin_n: 'Physical pin {}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
overlays:
|
||||
- ground
|
||||
- spi
|
||||
|
|
|
@ -15,6 +15,7 @@ strings:
|
|||
- type_classic: 'Classic form-factor'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_i2c: 'Uses I2C'
|
||||
- uses_spi: 'Uses SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_n_gpio_pins: ' Uses {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} on Rev 1 ( very early ) Pi'
|
||||
|
|
|
@ -1,25 +1 @@
|
|||
SDA es uno de los pines i2c en la Pi, [aprende más sobre i2c](/pinout/i2c).
|
||||
|
||||
Es fácil escribir un HIGH (encendido) o LOW (apagado) digital a un pin del GPIO, pero debes recordar algunas cosas:
|
||||
|
||||
* Ejecuta tus programas como root
|
||||
* Ajusta el modo de los pines a OUTPUT (1)
|
||||
|
||||
Asumiendo que has instalado WiringPi2-Python ( pip install wiringpi2 ) prueba a pegar lo siguiente en un archivo .py:
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
HIGH = 1
|
||||
LOW = 0
|
||||
OUTPUT = 1
|
||||
INPUT = 0
|
||||
wiringpi.wiringPiSetup()
|
||||
wiringpi.pinMode(8,OUTPUT)
|
||||
wiringpi.digitalWrite(8,HIGH)
|
||||
```
|
||||
|
||||
Ejecútalo con:
|
||||
|
||||
```bash
|
||||
sudo python myscript.py
|
||||
```
|
||||
|
|
|
@ -15,7 +15,14 @@ strings:
|
|||
- type_classic: 'formato clásico'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_i2c: 'Usa I2C'
|
||||
- uses_spi: 'Usa SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_n_gpio_pins: ' Usa {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} on Rev 1 ( very early ) Pi'
|
||||
- physical_pin_n: 'Physical pin {}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
overlays:
|
||||
- ground
|
||||
- spi
|
||||
|
|
|
@ -1,25 +1 @@
|
|||
SDA est la broche fournissant le signal de données du bus i2c de la Raspberry Pi, [référence i2c](/pinout/i2c).
|
||||
|
||||
Conseil: Il est aisé de basculer une broche de l'état haut (HIGH) vers l'état bas (LOW), ou vice versa, mais prenez cependant quelques précautions:
|
||||
|
||||
* Exécutez vos scripts en invoquant l'utilisateur 'root'
|
||||
* n'oubliez pas de déclarer la broche en tant que sortie (OUTPUT, 1)
|
||||
|
||||
Par exemple, sous WiringPi2-Python ( pip install wiringpi2 ):
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
HIGH = 1
|
||||
LOW = 0
|
||||
OUTPUT = 1
|
||||
INPUT = 0
|
||||
wiringpi.wiringPiSetup()
|
||||
wiringpi.pinMode(8,OUTPUT)
|
||||
wiringpi.digitalWrite(8,HIGH)
|
||||
```
|
||||
|
||||
Puis:
|
||||
|
||||
```bash
|
||||
sudo python myscript.py
|
||||
```
|
|
@ -10,12 +10,19 @@ url_suffix:
|
|||
urls:
|
||||
GND: masse
|
||||
strings:
|
||||
- made_by: 'Produit {manufacturer}'
|
||||
- made_by: 'produit {manufacturer}'
|
||||
- type_hat: 'format HAT'
|
||||
- type_classic: 'format Classic'
|
||||
- pin_header: '{} broches'
|
||||
- uses_i2c: 'bus I2C'
|
||||
- wiring_pi_pin: 'Broche Wiring Pi {}'
|
||||
- uses_spi: 'bus SPI'
|
||||
- wiring_pi_pin: 'broche Wiring Pi {}'
|
||||
- uses_n_gpio_pins: ' {} broches GPIO actives'
|
||||
- bcm_pin_rev1_pi: 'broche BCM {} sur Raspi Rev 1'
|
||||
- physical_pin_n: 'broche physique {}'
|
||||
- more_information: 'informations supplémentaires'
|
||||
- github_repository: 'lien GitHub'
|
||||
- buy_now: 'achat'
|
||||
overlays:
|
||||
- ground
|
||||
- spi
|
||||
|
|
|
@ -1,6 +1 @@
|
|||
SDA è uno dei pin i2c del Raspberry, [maggiori informazioni su i2c](/pinout/i2c).
|
||||
|
||||
È facile muovere i primi passi scrivendo un HIGH o LOW digitale su un pin GPIO, ma devi ricordarti un paio di cose:
|
||||
|
||||
* Lancia il tuo script come root
|
||||
* Imposta la modalità del tuo pin ad OUTPUT (1)
|
||||
|
|
|
@ -15,7 +15,14 @@ strings:
|
|||
- type_classic: 'Fattore di forma classico'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_i2c: 'Utilizza I2C'
|
||||
- uses_spi: 'Utilizza SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_n_gpio_pins: ' Utilizza {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} on Rev 1 ( very early ) Pi'
|
||||
- physical_pin_n: 'Physical pin {}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
overlays:
|
||||
- ground
|
||||
- spi
|
||||
|
|
|
@ -1,25 +1 @@
|
|||
SDA, Raspberry Pi'deki I2C pinlerinden biri. [I2c hakkında detaylı bilgi](/pinout/i2c).
|
||||
|
||||
GPIO pinleri ile dijital HIGH ve LOW değerlerini okumak ve hazırlamak oldukça kolay, yalnız bazı hususlara dikkat etmeniz gerekmekte:
|
||||
|
||||
* Kodu çalıştıracak script'inizi root (süper yönetici) hakları ile çalıştırmalısınız.
|
||||
* Pin'in modunu OUTPUT (1) olarak tanımlamalısınız.
|
||||
|
||||
Eğer WiringPi2-Pytgon kütüphanesini kurduysanız ( pip install wiringpi2 ) o zaman aşağıdaki kodu bir .py dosyası olarak kaydedip çalıştırabilirsiniz:
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
HIGH = 1
|
||||
LOW = 0
|
||||
OUTPUT = 1
|
||||
INPUT = 0
|
||||
wiringpi.wiringPiSetup()
|
||||
wiringpi.pinMode(8,OUTPUT)
|
||||
wiringpi.digitalWrite(8,HIGH)
|
||||
```
|
||||
|
||||
Ardından şu komutla çalıştırabilirsiniz:
|
||||
|
||||
```bash
|
||||
sudo python scriptadi.py
|
||||
```
|
|
@ -14,7 +14,14 @@ strings:
|
|||
- type_classic: 'Classic form-factor'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_i2c: 'Uses I2C'
|
||||
- uses_spi: 'Uses SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_n_gpio_pins: ' Uses {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} on Rev 1 ( very early ) Pi'
|
||||
- physical_pin_n: 'Physical pin {}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
overlays:
|
||||
- ground
|
||||
- spi
|
||||
|
|
Loading…
Reference in New Issue