translate md filed using generic filters
This commit is contained in:
parent
ca0742b15d
commit
c789ac6841
@ -24,7 +24,7 @@ lang = "en"
|
||||
default_strings = {
|
||||
'pin_header': '{} pin header',
|
||||
'form_undefined': 'Undefined',
|
||||
'wiring_pi_pin': 'Wiring Pi pin {}',
|
||||
'group_other': 'other',
|
||||
'uses_5v_and_3v3': 'Needs 5v and 3v3 power',
|
||||
'uses_5v': 'Needs 5v power',
|
||||
'uses_3v3': 'Needs 3v3 power',
|
||||
@ -33,25 +33,11 @@ default_strings = {
|
||||
'uses_n_gpio_pins': 'Uses {} GPIO pins',
|
||||
'bcm_pin_rev1_pi': 'BCM pin {} on Rev 1 ( very early ) Pi',
|
||||
'physical_pin_n': 'Physical pin {}',
|
||||
'wiring_pi_pin': 'Wiring Pi pin {}',
|
||||
'more_information': 'More Information',
|
||||
'github_repository': 'GitHub Repository',
|
||||
'buy_now': 'Buy Now',
|
||||
'translate_msg': 'This page needs translating, can you help?',
|
||||
'group_adc': 'ADC',
|
||||
'group_audio': 'Audio',
|
||||
'group_cap': 'Cap',
|
||||
'group_gesture': 'Gesture',
|
||||
'group_instrument': 'Instrument',
|
||||
'group_led': 'LED',
|
||||
'group_iot': 'IOT',
|
||||
'group_lcd': 'LCD',
|
||||
'group_motor': 'Motor',
|
||||
'group_multi': 'Multi',
|
||||
'group_other': 'Other',
|
||||
'group_touch': 'Touch',
|
||||
'group_info': 'Info',
|
||||
'group_pinout': 'Pinout',
|
||||
'group_featured': 'Featured'
|
||||
'translate_msg': '<a href="https://github.com/gadgetoid/Pinout2">This page needs translating, can you help?</a><br><br>',
|
||||
}
|
||||
|
||||
|
||||
@ -84,6 +70,10 @@ def load_overlay(overlay):
|
||||
data = markjaml.load('src/{}/translate/{}.md'.format(lang, overlay))
|
||||
loaded = data['data']
|
||||
loaded['long_description'] = strings['translate_msg'] + data['html']
|
||||
loaded['type'] = strings['group_other']
|
||||
if 'formfactor' in loaded:
|
||||
if str(loaded['formfactor']) == 'Custom':
|
||||
loaded['formfactor'] = strings['form_undefined']
|
||||
except IOError:
|
||||
print 'overlay {} missing in lang {}'.format(overlay, lang)
|
||||
return None
|
||||
@ -581,7 +571,7 @@ for overlay in overlays:
|
||||
name=overlay['name'],
|
||||
page_url=overlay['page_url'],
|
||||
base_url=base_url,
|
||||
type=overlay['type'] if 'type' in overlay else '',
|
||||
type=overlay['type'] if 'type' in overlay else strings['group_other'],
|
||||
formfactor=overlay['formfactor'] if 'formfactor' in overlay else strings['form_undefined'],
|
||||
manufacturer=overlay['manufacturer'],
|
||||
resource_url=resource_url)})
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
default_desc: The comprehensive Raspberry Pi GPIO Pinout guide for the original Raspberry
|
||||
Pi, B+ and Pi 2
|
||||
default_title: Raspberry Pi GPIO Pinout - Pi 1, B+, Pi 2
|
||||
title_suffix: " at Raspberry Pi GPIO Pinout"
|
||||
base_url: /pinout/
|
||||
@ -10,22 +9,27 @@ url_suffix:
|
||||
urls:
|
||||
GND: masse_ground
|
||||
strings:
|
||||
- made_by: 'Hersteller: {manufacturer}'
|
||||
- details: 'Details'
|
||||
- group_other: 'alle'
|
||||
- form_undefined: 'Andere'
|
||||
- pin_header: '{} pin header'
|
||||
- type_hat: 'HAT form-factor'
|
||||
- type_phat: 'pHAT form-factor'
|
||||
- type_classic: 'Classic form-factor'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_eeprom: 'benutzt EEPROM'
|
||||
- uses_i2c: 'benutzt I2C'
|
||||
- uses_spi: 'benutzt SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi Anschluss {}'
|
||||
- uses_5v_and_3v3: '5v und 3v3 Stromversorgung'
|
||||
- uses_5v: '5v Stromversorgung'
|
||||
- uses_3v3: '3v3 Stromversorgung'
|
||||
- uses_n_gpio_pins: 'benutzt {} GPIO Anschlüsse'
|
||||
- bcm_pin_rev1_pi: 'BCM Anschluss {} auf dem Rev 1 ( sehr alter ) Pi'
|
||||
- physical_pin_n: 'Physical pin {}'
|
||||
- wiring_pi_pin: 'Wiring Pi Anschluss {}'
|
||||
- made_by: 'Hersteller: {manufacturer}'
|
||||
- more_information: 'Mehr Informationen'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'jetzt kaufen'
|
||||
- details: 'Details'
|
||||
featured:
|
||||
- display-o-tron
|
||||
- rpf-dots
|
||||
@ -33,18 +37,74 @@ featured:
|
||||
- rtk-000-001
|
||||
overlays:
|
||||
- ground
|
||||
- iface-dpi
|
||||
- iface-gpclk
|
||||
- iface-jtag
|
||||
- iface-1wire
|
||||
- iface-pcm
|
||||
- iface-sd
|
||||
- i2c
|
||||
- spi
|
||||
- uart
|
||||
- wiringpi
|
||||
- 4tronix-picon-zero
|
||||
- 4tronix-pistep2d
|
||||
- 4tronix-pistep2q
|
||||
- ab-1-wire-plus
|
||||
- ab-1-wire-zero
|
||||
- ab-adc-differential-pi
|
||||
- ab-adc-pi-plus
|
||||
- ab-adc-pi-zero
|
||||
- ab-adcdac-pi-zero
|
||||
- ab-io-pi-plus
|
||||
- ab-io-pi-zero
|
||||
- ab-rs485-pi
|
||||
- ab-rtc-pi-plus
|
||||
- ab-rtc-pi-zero
|
||||
- ab-serial-pi-plus
|
||||
- ab-serial-pi-zero
|
||||
- ab-servo-pwm-pi-zero
|
||||
- adafruit-cap-mpr121
|
||||
- adafruit-servo-hat
|
||||
- analog-zero
|
||||
- automation-hat
|
||||
- blinkt
|
||||
- carberry
|
||||
- cirruslogic-audio-card
|
||||
- discohat
|
||||
- display-o-tron
|
||||
- display-o-tron-hat
|
||||
- rpf-dots
|
||||
- drum-hat
|
||||
- enviro-phat
|
||||
- espiot-phat
|
||||
- explorer-hat
|
||||
- explorer-hat-pro
|
||||
- explorer-phat
|
||||
- iqaudio-pi-dac
|
||||
- iqaudio-pi-digiamp
|
||||
- microdot-phat
|
||||
- phat-dac
|
||||
- pi-liter
|
||||
- piano-hat
|
||||
- piborg-ledborg
|
||||
- piborg-zeroborg
|
||||
- pibrella
|
||||
- piglow
|
||||
- pijack
|
||||
- propeller-hat
|
||||
- raspio-duino
|
||||
- redbear-iot-hat
|
||||
- rpf-dots
|
||||
- rtk-000-001
|
||||
- scroll-phat
|
||||
- sense-hat
|
||||
- skywriter-hat
|
||||
- traffic-hat
|
||||
- unicorn-hat
|
||||
- unicorn-phat
|
||||
- uugear-7port-usb-hub
|
||||
- uugear-witty-pi
|
||||
- uugear-witty-pi-2
|
||||
- uugear-zero4u
|
||||
- wifi-pants
|
||||
- zero-lipo
|
||||
|
@ -9,25 +9,27 @@ url_suffix:
|
||||
urls:
|
||||
GND: ground
|
||||
strings:
|
||||
- made_by: 'Made by {manufacturer}'
|
||||
- details: 'Details'
|
||||
- group_other: 'other'
|
||||
- form_undefined: 'Undefined'
|
||||
- pin_header: '{} pin header'
|
||||
- type_hat: 'HAT form-factor'
|
||||
- type_phat: 'pHAT form-factor'
|
||||
- type_classic: 'Classic form-factor'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_eeprom: 'Uses EEPROM'
|
||||
- uses_i2c: 'Uses I2C'
|
||||
- uses_spi: 'Uses SPI'
|
||||
- uses_5v_and_3v3: 'Needs 5v and 3v3 power'
|
||||
- uses_5v: 'Needs 5v power'
|
||||
- uses_3v3: 'Needs 3v3 power'
|
||||
- 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 {}'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- made_by: 'Made by {manufacturer}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
- details: 'Details'
|
||||
featured:
|
||||
- pijack
|
||||
- ab-servo-pwm-pi-zero
|
||||
|
@ -9,25 +9,27 @@ url_suffix:
|
||||
urls:
|
||||
GND: tierra
|
||||
strings:
|
||||
- made_by: 'Hecho por {manufacturer}'
|
||||
- details: 'Details'
|
||||
- group_other: 'otro'
|
||||
- form_undefined: 'Otro'
|
||||
- pin_header: '{} pin header'
|
||||
- type_hat: 'formato HAT'
|
||||
- type_phat: 'formato pHAT'
|
||||
- type_classic: 'formato clásico'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_eeprom: 'Usa EEPROM'
|
||||
- uses_i2c: 'Usa I2C'
|
||||
- uses_spi: 'Usa SPI'
|
||||
- uses_5v_and_3v3: 'Alimentación 5v+3v3'
|
||||
- uses_5v: 'Alimentación 5v'
|
||||
- uses_3v3: 'Alimentación 3v3'
|
||||
- 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 {}'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- made_by: 'Hecho por {manufacturer}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
- details: 'Details'
|
||||
featured:
|
||||
- ab-adc-pi-zero
|
||||
- analog-zero
|
||||
@ -45,16 +47,27 @@ overlays:
|
||||
- spi
|
||||
- uart
|
||||
- wiringpi
|
||||
- 4tronix-picon-zero
|
||||
- 4tronix-pistep2d
|
||||
- 4tronix-pistep2q
|
||||
- ab-1-wire-plus
|
||||
- ab-1-wire-zero
|
||||
- ab-adc-differential-pi
|
||||
- ab-adc-pi-plus
|
||||
- ab-adc-pi-zero
|
||||
- ab-adcdac-pi-zero
|
||||
- ab-io-pi-plus
|
||||
- ab-io-pi-zero
|
||||
- ab-rs485-pi
|
||||
- ab-rtc-pi-plus
|
||||
- ab-rtc-pi-zero
|
||||
- ab-serial-pi-plus
|
||||
- ab-serial-pi-zero
|
||||
- ab-servo-pwm-pi-zero
|
||||
- adafruit-cap-mpr121
|
||||
- adafruit-servo-hat
|
||||
- analog-zero
|
||||
- automation-hat
|
||||
- blinkt
|
||||
- carberry
|
||||
- cirruslogic-audio-card
|
||||
@ -74,11 +87,24 @@ overlays:
|
||||
- pi-liter
|
||||
- piano-hat
|
||||
- piborg-ledborg
|
||||
- piborg-zeroborg
|
||||
- pibrella
|
||||
- piglow
|
||||
- pijack
|
||||
- propeller-hat
|
||||
- raspio-duino
|
||||
- redbear-iot-hat
|
||||
- rpf-dots
|
||||
- rtk-000-001
|
||||
- scroll-phat
|
||||
- sense-hat
|
||||
- skywriter-hat
|
||||
- traffic-hat
|
||||
- unicorn-hat
|
||||
- unicorn-phat
|
||||
- uugear-7port-usb-hub
|
||||
- uugear-witty-pi
|
||||
- uugear-witty-pi-2
|
||||
- uugear-zero4u
|
||||
- wifi-pants
|
||||
- zero-lipo
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: 1 Wire Pi Plus
|
||||
class: board
|
||||
type: com
|
||||
type: com.
|
||||
formfactor: HAT
|
||||
manufacturer: AB Electronics
|
||||
description: 1-Wire vers interface I2C
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: 1 Wire Pi Zero
|
||||
class: board
|
||||
type: com
|
||||
type: com.
|
||||
formfactor: pHAT
|
||||
manufacturer: AB Electronics
|
||||
description: 1-Wire vers interface I2C
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: ADC Differential Pi
|
||||
class: board
|
||||
type: adc
|
||||
type: a/n
|
||||
formfactor: HAT
|
||||
manufacturer: AB Electronics
|
||||
description: 8 canaux Analogiques vers un convertisseur Digital
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: ADC Pi Plus
|
||||
class: board
|
||||
type: adc
|
||||
type: a/n
|
||||
formfactor: HAT
|
||||
manufacturer: AB Electronics
|
||||
description: 8 canaux Analogiques vers un convertisseur Digital
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: ADC Pi Zero
|
||||
class: board
|
||||
type: adc
|
||||
type: a/n
|
||||
formfactor: pHAT
|
||||
manufacturer: AB Electronics
|
||||
description: 8 canaux Analogiques vers un convertisseur Digital
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: ADC-DAC Pi Zero
|
||||
class: board
|
||||
type: adc,dac
|
||||
type: a/n
|
||||
formfactor: pHAT
|
||||
manufacturer: AB Electronics
|
||||
description: 2 canaux Analogiques vers un Convertisseur Digital et 2 canaux Digitaux vers un Convertisseur Analogiques
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: RTC Pi Zero
|
||||
class: board
|
||||
type: rtc
|
||||
type: htr
|
||||
formfactor: pHAT
|
||||
manufacturer: AB Electronics
|
||||
description: Module Horloge pour le Raspberry Pi
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: Explorer HAT Pro
|
||||
class: board
|
||||
type: adc,cap,io,moteur
|
||||
type: a/n,cap.,e/s,moteur
|
||||
formfactor: HAT
|
||||
manufacturer: Pimoroni
|
||||
description: Un chapeau multi-usage avec entrées analogiques et contrôle moteurs
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: Explorer HAT
|
||||
class: board
|
||||
type: cap,io,multi
|
||||
type: cap.,e/s,multi
|
||||
formfactor: HAT
|
||||
manufacturer: Pimoroni
|
||||
description: Un chapeau multi-usage avec entrées et sorties 5V
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: Piano HAT
|
||||
class: board
|
||||
type: cap,instrument
|
||||
type: cap.,instrument
|
||||
formfactor: HAT
|
||||
manufacturer: Pimoroni
|
||||
description: Un mini-piano avec 16 touches tactiles
|
||||
|
@ -2,7 +2,7 @@
|
||||
---
|
||||
name: Pibrella
|
||||
class: board
|
||||
type: io,multi
|
||||
type: e/s,multi
|
||||
formfactor: Autre
|
||||
manufacturer: Cyntech
|
||||
description: carte multi-usage avec son, lumière, entrées et sorties
|
||||
|
@ -1,35 +0,0 @@
|
||||
<!--
|
||||
---
|
||||
name: UART
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi UART pins
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Transmit
|
||||
direction: output
|
||||
active: high
|
||||
'10':
|
||||
name: RXD / Receive
|
||||
direction: input
|
||||
active: high
|
||||
-->
|
||||
#UART - Universal Asynchronous Receiver/Transmitter
|
||||
|
||||
###The 2 UART pins in WiringPi are: 15, 16
|
||||
|
||||
##AWAITING TRANSLATION
|
||||
##EN COURS DE TRADUCTION
|
||||
|
||||
UART is a handy, straight forward way to interface an Arduino ( or bootloaded ATmega ) with your Pi. You must, however, be careful with logic-levels between the two devices: the Pi is 3.3v and the Arduino is 5v. Connect the two and you might conjure up some magic blue smoke.
|
||||
|
||||
Personally I'm a fan of building out a Arduino Bootloaded ATmega 328 circuit on a breadboard with a voltage regulator to take the Pi's 5v line and convert it to 3.3v. The ATmega 328 seems to run quite happily at 3.3v using a 16Mhz crystal and you'll then have an Arduino clone with 3.3v logic.
|
||||
|
||||
Assuming you have WiringPi2-Python installed, the following python example opens the Pi's UART at 9600baud and puts 'hello world'
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
wiringpi.wiringPiSetup()
|
||||
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
||||
wiringpi.serialPuts(serial,'hello world!')
|
||||
```
|
@ -9,25 +9,27 @@ url_suffix:
|
||||
urls:
|
||||
GND: masse
|
||||
strings:
|
||||
- made_by: 'produit {manufacturer}'
|
||||
- details: 'Détails'
|
||||
- group_other: 'autre'
|
||||
- form_undefined: 'Autre'
|
||||
- pin_header: '{} broches'
|
||||
- type_hat: 'format HAT'
|
||||
- type_phat: 'format pHAT'
|
||||
- type_classic: 'format Classic'
|
||||
- pin_header: '{} broches'
|
||||
- uses_eeprom: 'EEPROM'
|
||||
- uses_i2c: 'bus I2C'
|
||||
- uses_spi: 'bus SPI'
|
||||
- uses_5v_and_3v3: 'Alim. 5v et 3v3'
|
||||
- uses_5v: 'Alim. 5v'
|
||||
- uses_3v3: 'Alim. 3v3'
|
||||
- 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 {}'
|
||||
- wiring_pi_pin: 'broche Wiring Pi {}'
|
||||
- made_by: 'produit {manufacturer}'
|
||||
- more_information: 'plus d''info'
|
||||
- github_repository: 'lien GitHub'
|
||||
- buy_now: 'achat'
|
||||
- details: 'Détails'
|
||||
featured:
|
||||
- 4tronix-picon-zero
|
||||
- ab-adc-pi-zero
|
||||
@ -35,30 +37,74 @@ featured:
|
||||
- pibrella
|
||||
overlays:
|
||||
- ground
|
||||
- iface-dpi
|
||||
- iface-gpclk
|
||||
- iface-jtag
|
||||
- iface-1wire
|
||||
- iface-pcm
|
||||
- iface-sd
|
||||
- i2c
|
||||
- spi
|
||||
- uart
|
||||
- wiringpi
|
||||
- 4tronix-picon-zero
|
||||
- 4tronix-pistep2d
|
||||
- 4tronix-pistep2q
|
||||
- ab-1-wire-plus
|
||||
- ab-1-wire-zero
|
||||
- ab-rtc-pi-zero
|
||||
- ab-adc-differential-pi
|
||||
- ab-adc-pi-plus
|
||||
- ab-adc-pi-zero
|
||||
- ab-adcdac-pi-zero
|
||||
- iqaudio-pi-dac
|
||||
- ab-io-pi-plus
|
||||
- ab-io-pi-zero
|
||||
- ab-rs485-pi
|
||||
- ab-rtc-pi-plus
|
||||
- ab-rtc-pi-zero
|
||||
- ab-serial-pi-plus
|
||||
- ab-serial-pi-zero
|
||||
- ab-servo-pwm-pi-zero
|
||||
- adafruit-cap-mpr121
|
||||
- adafruit-servo-hat
|
||||
- analog-zero
|
||||
- automation-hat
|
||||
- blinkt
|
||||
- carberry
|
||||
- cirruslogic-audio-card
|
||||
- discohat
|
||||
- display-o-tron
|
||||
- display-o-tron-hat
|
||||
- rpf-dots
|
||||
- drum-hat
|
||||
- enviro-phat
|
||||
- espiot-phat
|
||||
- explorer-hat
|
||||
- explorer-hat-pro
|
||||
- explorer-phat
|
||||
- iqaudio-pi-dac
|
||||
- iqaudio-pi-digiamp
|
||||
- microdot-phat
|
||||
- phat-dac
|
||||
- pi-liter
|
||||
- piano-hat
|
||||
- piborg-ledborg
|
||||
- piborg-zeroborg
|
||||
- pibrella
|
||||
- piglow
|
||||
- pijack
|
||||
- propeller-hat
|
||||
- raspio-duino
|
||||
- redbear-iot-hat
|
||||
- rpf-dots
|
||||
- rtk-000-001
|
||||
- scroll-phat
|
||||
- sense-hat
|
||||
- skywriter-hat
|
||||
- traffic-hat
|
||||
- unicorn-hat
|
||||
- unicorn-phat
|
||||
- uugear-7port-usb-hub
|
||||
- uugear-witty-pi
|
||||
- uugear-witty-pi-2
|
||||
- uugear-zero4u
|
||||
- wifi-pants
|
||||
- zero-lipo
|
||||
|
@ -4,6 +4,7 @@ name: SPI
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi SPI pins
|
||||
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||
pincount: 5
|
||||
pin:
|
||||
'11':
|
||||
@ -45,27 +46,20 @@ pin:
|
||||
name: SPI1 SCLK
|
||||
-->
|
||||
#SPI - Serial Peripheral Interface
|
||||
---
|
||||
###SPI0 pins in BCM mode are: 9, 10, 11 + 7/8
|
||||
###SPI0 pins in WiringPi are: 12, 13, 14 + 10/11
|
||||
---
|
||||
Known as the four-wire serial bus, SPI lets you daisy-chain multiple compatible devices off a single set of pins by assigning them different chip-select pins.
|
||||
|
||||
###Known as the four-wire serial bus, SPI lets you daisy-chain multiple compatible devices off a single set of pins by assigning them different chip-select pins.
|
||||
|
||||
##AWAITING TRANSLATION
|
||||
##EN COURS DE TRADUCTION
|
||||
|
||||
A useful example of an SPI peripheral is the MCP23S17 digital IO expander chip Note the S in place of the 0 found on the I2C version.
|
||||
A useful example of an SPI peripheral is the MCP23S17 digital IO expander chip ( Note the S in place of the 0 found on the I2C version ). You can also use the SPI port to "Bit-Bang" an ATmega 328, loading Arduino sketches onto it with Gordon Hendersons' modified version of AVRDude.
|
||||
|
||||
To talk to an SPI device, you assert its corresponding chip-select pin. By default the Pi has CE0 and CE1.
|
||||
|
||||
```python
|
||||
import spidev
|
||||
|
||||
spi = spidev.SpiDev()
|
||||
spi.open(0, CHIP_SELECT_0_OR_1)
|
||||
spi.max_speed_hz = 1000000
|
||||
spi.xfer([value_8bit])
|
||||
```
|
||||
|
||||
You can also use the SPI port to "Bit-Bang" an ATmega 328, loading Arduino sketches onto it with Gordon Henderson's modified version of AVRDude.
|
||||
|
||||
Hook up you Pi's SPI port to that of your ATmega, and power the ATmega from the 3.3v pin on the Pi. Make sure you're not running any SPI device drivers, and run "avrdude -p m328p -c gpio" to verify the connection.
|
||||
|
||||
See the individual pins to learn how to connect up your ATmega.
|
39
src/fr/translate/uart.md
Normal file
39
src/fr/translate/uart.md
Normal file
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
---
|
||||
name: UART
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi UART pins
|
||||
url: http://elinux.org/RPi_Serial_Connection
|
||||
pincount: 2
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Transmit
|
||||
direction: output
|
||||
active: high
|
||||
'10':
|
||||
name: RXD / Receive
|
||||
direction: input
|
||||
active: high
|
||||
-->
|
||||
#UART - Universal Asynchronous Receiver/Transmitter
|
||||
---
|
||||
###UART pins in BCM mode are: 14, 15
|
||||
###UART pins in WiringPi are: 15, 16
|
||||
---
|
||||
UART is an asynchronous serial communication protocol, meaning that it takes bytes of data and transmits the individual bits in a sequential fashion.
|
||||
|
||||
Asynchronous transmission allows data to be transmitted without the sender having to send a clock signal to the receiver. Instead, the sender and receiver agree on timing parameters in advance and special bits called 'start bits' are added to each word and used to synchronize the sending and receiving units.
|
||||
|
||||
UART is commonly used on the Pi as a convenient way to control it over the GPIO, or access the kernel boot messages from the serial console (enabled by default).
|
||||
|
||||
It can also be used as a way to interface an Arduino, bootloaded ATmega, ESP8266, etc with your Pi. Be careful with logic-levels between the devices though, for example the Pi is 3.3v and the Arduino is 5v. Connect the two and you might conjure up some magic blue smoke.
|
||||
|
||||
Assuming you have WiringPi2-Python installed, the following python example opens the Pi's UART at 9600baud and puts 'hello world'
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
wiringpi.wiringPiSetup()
|
||||
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
||||
wiringpi.serialPuts(serial,'hello world!')
|
||||
```
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
default_desc: La guida completa ai pin GPIO del Raspberry Pi originale, del Modello
|
||||
B+ e del Raspberry Pi 2
|
||||
default_desc: La guida completa ai pin GPIO del Raspberry Pi originale
|
||||
default_title: Assegnazione pin GPIO del Raspberry Pi - Pi 1, B+, Pi 2
|
||||
title_suffix: " - Assegnazione pin GPIO del Raspberry Pi"
|
||||
base_url: /pinout/
|
||||
@ -10,22 +9,27 @@ url_suffix:
|
||||
urls:
|
||||
GND: massa
|
||||
strings:
|
||||
- made_by: 'Prodotto da {manufacturer}'
|
||||
- details: 'Details'
|
||||
- group_other: 'Tutti'
|
||||
- form_undefined: 'Altro'
|
||||
- pin_header: '{} pin header'
|
||||
- type_hat: 'Fattore di forma HAT'
|
||||
- type_phat: 'Fattore di forma pHAT'
|
||||
- type_classic: 'Fattore di forma classico'
|
||||
- pin_header: '{} pin header'
|
||||
- uses_eeprom: 'Utilizza EEPROM'
|
||||
- uses_i2c: 'Utilizza I2C'
|
||||
- uses_spi: 'Utilizza SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_5v_and_3v3: 'Alimentazione a 5v+3.3V'
|
||||
- uses_5v: 'Alimentazione a 5V'
|
||||
- uses_3v3: 'Alimentazione a 3.3V'
|
||||
- uses_n_gpio_pins: 'Utilizza {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} su Raspberry Rev 1 (le prime edizioni)'
|
||||
- physical_pin_n: 'Pin fisico {}'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- made_by: 'Prodotto da {manufacturer}'
|
||||
- more_information: 'Maggiori informazioni'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Acquista'
|
||||
- details: 'Details'
|
||||
featured:
|
||||
- display-o-tron
|
||||
- piborg-ledborg
|
||||
@ -33,20 +37,74 @@ featured:
|
||||
- rtk-000-001
|
||||
overlays:
|
||||
- ground
|
||||
- iface-dpi
|
||||
- iface-gpclk
|
||||
- iface-jtag
|
||||
- iface-1wire
|
||||
- iface-pcm
|
||||
- iface-sd
|
||||
- i2c
|
||||
- spi
|
||||
- uart
|
||||
- wiringpi
|
||||
- iqaudio-pi-dac
|
||||
- 4tronix-picon-zero
|
||||
- 4tronix-pistep2d
|
||||
- 4tronix-pistep2q
|
||||
- ab-1-wire-plus
|
||||
- ab-1-wire-zero
|
||||
- ab-adc-differential-pi
|
||||
- ab-adc-pi-plus
|
||||
- ab-adc-pi-zero
|
||||
- ab-adcdac-pi-zero
|
||||
- ab-io-pi-plus
|
||||
- ab-io-pi-zero
|
||||
- ab-rs485-pi
|
||||
- ab-rtc-pi-plus
|
||||
- ab-rtc-pi-zero
|
||||
- ab-serial-pi-plus
|
||||
- ab-serial-pi-zero
|
||||
- ab-servo-pwm-pi-zero
|
||||
- adafruit-cap-mpr121
|
||||
- adafruit-servo-hat
|
||||
- analog-zero
|
||||
- automation-hat
|
||||
- blinkt
|
||||
- carberry
|
||||
- cirruslogic-audio-card
|
||||
- discohat
|
||||
- display-o-tron
|
||||
- display-o-tron-hat
|
||||
- rpf-dots
|
||||
- drum-hat
|
||||
- enviro-phat
|
||||
- espiot-phat
|
||||
- explorer-hat
|
||||
- explorer-hat-pro
|
||||
- explorer-phat
|
||||
- iqaudio-pi-dac
|
||||
- iqaudio-pi-digiamp
|
||||
- microdot-phat
|
||||
- phat-dac
|
||||
- pi-liter
|
||||
- piano-hat
|
||||
- piborg-ledborg
|
||||
- piborg-zeroborg
|
||||
- pibrella
|
||||
- piglow
|
||||
- pijack
|
||||
- propeller-hat
|
||||
- raspio-duino
|
||||
- redbear-iot-hat
|
||||
- rpf-dots
|
||||
- rtk-000-001
|
||||
- scroll-phat
|
||||
- sense-hat
|
||||
- skywriter-hat
|
||||
- traffic-hat
|
||||
- unicorn-hat
|
||||
- unicorn-phat
|
||||
- uugear-7port-usb-hub
|
||||
- uugear-witty-pi
|
||||
- uugear-witty-pi-2
|
||||
- uugear-zero4u
|
||||
- wifi-pants
|
||||
- zero-lipo
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
default_desc: Raspberry Pi, B+ ve Pi 2 için Pin şematiği
|
||||
default_title: Raspberry Pi GPIO Pinleri - Pi 1, B+, Pi 2
|
||||
default_title: Raspberry Pi GPIO Pinleri
|
||||
title_suffix: " - Raspberry Pi Pinleri"
|
||||
base_url: /pinout/
|
||||
resource_url: /resources/
|
||||
@ -9,18 +9,24 @@ url_suffix: ''
|
||||
urls:
|
||||
GND: toprak
|
||||
strings:
|
||||
- made_by: 'Made by {manufacturer}'
|
||||
- type_hat: 'HAT form-factor'
|
||||
- type_hat: 'pHAT form-factor'
|
||||
- type_classic: 'Classic form-factor'
|
||||
- details: 'Details'
|
||||
- group_other: 'hepsi'
|
||||
- form_undefined: 'diğer'
|
||||
- pin_header: '{} pin header'
|
||||
- type_hat: 'HAT form-factor'
|
||||
- type_phat: 'pHAT form-factor'
|
||||
- type_classic: 'Classic form-factor'
|
||||
- uses_eeprom: 'EEPROM'
|
||||
- uses_i2c: 'I2C'
|
||||
- uses_spi: 'SPI'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- uses_5v_and_3v3: '5v+3.3V Güç'
|
||||
- uses_5v: '5v Güç'
|
||||
- uses_3v3: '3.3V Güç'
|
||||
- uses_n_gpio_pins: 'Uses {} GPIO pins'
|
||||
- bcm_pin_rev1_pi: 'BCM pin {} on Rev 1 ( very early ) Pi'
|
||||
- physical_pin_n: 'Physical pin {}'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
- made_by: 'Made by {manufacturer}'
|
||||
- more_information: 'More Information'
|
||||
- github_repository: 'GitHub Repository'
|
||||
- buy_now: 'Buy Now'
|
||||
@ -32,16 +38,74 @@ featured:
|
||||
- rtk-000-001
|
||||
overlays:
|
||||
- ground
|
||||
- iface-dpi
|
||||
- iface-gpclk
|
||||
- iface-jtag
|
||||
- iface-1wire
|
||||
- iface-pcm
|
||||
- iface-sd
|
||||
- i2c
|
||||
- spi
|
||||
- uart
|
||||
- wiringpi
|
||||
- 4tronix-picon-zero
|
||||
- 4tronix-pistep2d
|
||||
- 4tronix-pistep2q
|
||||
- ab-1-wire-plus
|
||||
- ab-1-wire-zero
|
||||
- ab-adc-differential-pi
|
||||
- ab-adc-pi-plus
|
||||
- ab-adc-pi-zero
|
||||
- ab-adcdac-pi-zero
|
||||
- ab-io-pi-plus
|
||||
- ab-io-pi-zero
|
||||
- ab-rs485-pi
|
||||
- ab-rtc-pi-plus
|
||||
- ab-rtc-pi-zero
|
||||
- ab-serial-pi-plus
|
||||
- ab-serial-pi-zero
|
||||
- ab-servo-pwm-pi-zero
|
||||
- adafruit-cap-mpr121
|
||||
- adafruit-servo-hat
|
||||
- analog-zero
|
||||
- automation-hat
|
||||
- blinkt
|
||||
- carberry
|
||||
- cirruslogic-audio-card
|
||||
- discohat
|
||||
- display-o-tron
|
||||
- rpf-dots
|
||||
- display-o-tron-hat
|
||||
- drum-hat
|
||||
- enviro-phat
|
||||
- espiot-phat
|
||||
- explorer-hat
|
||||
- explorer-hat-pro
|
||||
- explorer-phat
|
||||
- iqaudio-pi-dac
|
||||
- iqaudio-pi-digiamp
|
||||
- microdot-phat
|
||||
- phat-dac
|
||||
- pi-liter
|
||||
- piano-hat
|
||||
- piborg-ledborg
|
||||
- piborg-zeroborg
|
||||
- pibrella
|
||||
- piglow
|
||||
- pijack
|
||||
- propeller-hat
|
||||
- raspio-duino
|
||||
- redbear-iot-hat
|
||||
- rpf-dots
|
||||
- rtk-000-001
|
||||
- scroll-phat
|
||||
- sense-hat
|
||||
- skywriter-hat
|
||||
- traffic-hat
|
||||
- unicorn-hat
|
||||
- unicorn-phat
|
||||
- uugear-7port-usb-hub
|
||||
- uugear-witty-pi
|
||||
- uugear-witty-pi-2
|
||||
- uugear-zero4u
|
||||
- wifi-pants
|
||||
- zero-lipo
|
||||
|
Loading…
Reference in New Issue
Block a user