commit
759d83f850
|
@ -102,7 +102,7 @@ def load_overlay(overlay):
|
|||
pages[loaded['page_url']] = loaded
|
||||
navs[loaded['page_url']] = render_nav(loaded['page_url'], overlay=loaded)
|
||||
select_overlays.append((loaded['page_url'], loaded['name']))
|
||||
return loaded
|
||||
return loaded
|
||||
|
||||
def load_md(filename):
|
||||
filename = 'src/{}/{}'.format(lang, filename)
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#Assegnazione pin!
|
||||
|
||||
###La guida completa ai pin GPIO del Raspberry Pi, disponibile ora per Raspberry Pi Modello B+ e Raspberry Pi 2
|
||||
|
||||
La mappa dei pin GPIO non è pensata per essere stampata, ma resta comunque un'ottima scheda di riferimento e guida completa ai pin GPIO del Raspberry Pi.
|
||||
|
||||
##Cosa significano questi numeri?
|
||||
|
||||
* BCM - Numerazione Broadcom, comunemente detto "GPIO"; sono quelli che probabilmente intendi usare con RPi.GPIO
|
||||
* WiringPi - Numerazione Wiring Pi, per la libreria Wiring Pi di Gordon
|
||||
* Physical - Numero che corrisponde alla posizione fisica dei pin
|
||||
|
||||
##Pi 2
|
||||
|
||||
Per festeggiare l'uscita del Raspberry Pi 2 e dare il benvenuto ai nuovi Pi-entusiasti, Pinout è stato aggiornato ed è ora più pulito, più completo, più preciso, e verrà costantemente migliorato.
|
||||
|
||||
##Model B+
|
||||
|
||||
Ora che il Raspberry Pi Modello B+ è arrivato, ho aggiornato l'assegnazione pin con i 14 nuovi pin che troverai sulla tua splendente nuova scheda.
|
||||
|
||||
Nota: nello schema, ho separato visivamente i 14 pin addizionali del B+; la spaziatura non è presente nella vera scheda!
|
|
@ -0,0 +1,57 @@
|
|||
<!--
|
||||
---
|
||||
name: Arduino SPI
|
||||
description: Programma Arduino con le porte SPI del Raspberry Pi
|
||||
pin:
|
||||
19:
|
||||
name: MOSI
|
||||
direction: output
|
||||
active: high
|
||||
description: Master Out / Slave In
|
||||
21:
|
||||
name: MISO
|
||||
direction: input
|
||||
active: high
|
||||
description: Master In / Slave Out
|
||||
23:
|
||||
name: SCKL
|
||||
direction: output
|
||||
active: high
|
||||
description: Clock
|
||||
24:
|
||||
name: CE0
|
||||
direction: output
|
||||
active: high
|
||||
description: Arduino Reset
|
||||
-->
|
||||
#ATmega 328p / Arduino via SPI
|
||||
|
||||
###Sapevi che il tuo Raspberry può alimentare e programmare un ATmega 328p/Arduino direttamente, soltanto con pochi cavi, una breadboard, un oscillatore a 16Mhz ed alcuni condensatori da 22pF?
|
||||
|
||||
Leggi il mio [tutorial completo a Pico PiDuino](http://pi.gadgetoid.com/article/building-the-pico-piduino) per imparare le basi con poco più di 5£.
|
||||
|
||||
Dovrai installare l'[AVRDude modificato di Gordon](https://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/).
|
||||
|
||||
Collega 8/CEO al pin Reset/RST dell'ATmega, il 9/MISO al pin MISO (D12), il 10 al pin MOSI (D11) e 11/SCLK al pin SCLK (D13).
|
||||
|
||||
Alimenta l'ATmega con i 3.3v e la massa (pin GND) del tuo Raspberry, e sei pronto a procedere.
|
||||
|
||||
Assicurati di non avere alcun malefico driver SPI in esecuzione e controlla che sia collegato correttamente con:
|
||||
|
||||
```bash
|
||||
avrdude -p m328p -c gpio
|
||||
```
|
||||
|
||||
Per fare i primi tentativi con la compilazione per Arduino, lancia da un terminale:
|
||||
|
||||
```bash
|
||||
sudo apt-get install arduino arduino-mk
|
||||
```
|
||||
|
||||
Questo Makefile essenziale dovrebbe darti le basi. Per creare un semplice progetto, dagli nome mysketch.ino e lancia:
|
||||
|
||||
```bash
|
||||
export BOARD=atmega328
|
||||
make
|
||||
avrdude -p m328p -c gpio -e -U flash:w:build-cli/Arduino.hex
|
||||
```
|
|
@ -0,0 +1,44 @@
|
|||
<!--
|
||||
---
|
||||
name: Display-o-Tron HAT
|
||||
manufacturer: Pimoroni
|
||||
url: https://github.com/pimoroni/dot3k
|
||||
description: Un LCD da 3 righe di caratteri, RGB retroilluminato a 6 zone con 6 bottoni touch
|
||||
pincount: 40
|
||||
pin:
|
||||
3:
|
||||
mode: i2c
|
||||
5:
|
||||
mode: i2c
|
||||
22:
|
||||
name: LCD CMD/DATA
|
||||
mode: output
|
||||
active: high
|
||||
19:
|
||||
mode: spi
|
||||
22:
|
||||
name: LCD Register Select
|
||||
mode: output
|
||||
23:
|
||||
mode: spi
|
||||
24:
|
||||
name: LCD Chip Select
|
||||
mode: chipselect
|
||||
active: high
|
||||
32:
|
||||
name: LCD Reset
|
||||
mode: output
|
||||
active: low
|
||||
-->
|
||||
#Display-o-Tron HAT
|
||||
|
||||
Il Display-o-Tron HAT usa sia l'SPI che l'I2c per controllare il display LCD, la retroilluminazione e il touchscreen.
|
||||
Entrambi questi bus possono essere comunque condivisi con altre periferiche.
|
||||
|
||||
Per preparare e impostare l'HAT puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/dot3k | bash
|
||||
```
|
||||
|
||||
…e seguire le istruzioni!
|
|
@ -0,0 +1,65 @@
|
|||
<!--
|
||||
---
|
||||
name: Display-o-Tron 3000
|
||||
manufacturer: Pimoroni
|
||||
github: https://github.com/pimoroni/dot3k
|
||||
url: https://github.com/pimoroni/dot3k
|
||||
description: Un LCD da 3 righe di caratteri, RGB retroilluminato e un joystick
|
||||
install:
|
||||
'devices':
|
||||
- 'i2c'
|
||||
- 'spi'
|
||||
'apt':
|
||||
- 'python-smbus'
|
||||
- 'python3-smbus'
|
||||
- 'python-dev'
|
||||
- 'python3-dev'
|
||||
'python':
|
||||
- 'dot3k'
|
||||
'examples': 'python/examples/'
|
||||
pincount: 40
|
||||
pin:
|
||||
3:
|
||||
mode: i2c
|
||||
5:
|
||||
mode: i2c
|
||||
7:
|
||||
name: Bottone joystick
|
||||
mode: input
|
||||
active: low
|
||||
11:
|
||||
name: Joystick sinistra
|
||||
mode: input
|
||||
active: low
|
||||
13:
|
||||
name: Joystick su
|
||||
mode: input
|
||||
active: low
|
||||
15:
|
||||
name: Joystick destra
|
||||
mode: input
|
||||
active: low
|
||||
19:
|
||||
mode: spi
|
||||
21:
|
||||
name: Joystick giù
|
||||
mode: input
|
||||
active: low
|
||||
22:
|
||||
name: LCD CMD/DATA
|
||||
mode: output
|
||||
active: high
|
||||
23:
|
||||
mode: spi
|
||||
-->
|
||||
#Display-o-Tron 3000
|
||||
|
||||
Il Display-o-Tron 3000 è un LCD da 3 righe di caratteri retroilluminato RGB e con un joystick.
|
||||
|
||||
Per preparare e impostare il modulo puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/dot3k | bash
|
||||
```
|
||||
|
||||
…e seguire le istruzioni!
|
|
@ -0,0 +1,117 @@
|
|||
<!--
|
||||
---
|
||||
name: Raspberry Pi Dots
|
||||
description: Unisci i puntini e crea un circuito
|
||||
url: http://www.raspberrypi.org/dots/
|
||||
github: https://github.com/raspberrypilearning/dots
|
||||
pin:
|
||||
bcm0:
|
||||
name: 'Colore: Blu'
|
||||
direction: input
|
||||
bcm1:
|
||||
name: Puntino 7
|
||||
direction: input
|
||||
bcm2:
|
||||
name: Puntino 22
|
||||
direction: input
|
||||
bcm3:
|
||||
name: Puntino 21
|
||||
direction: input
|
||||
bcm4:
|
||||
name: Puntino 2
|
||||
direction: input
|
||||
bcm5:
|
||||
name: Puntino 9
|
||||
direction: input
|
||||
bcm6:
|
||||
name: Puntino 14
|
||||
direction: input
|
||||
bcm7:
|
||||
name: Puntino 6
|
||||
direction: input
|
||||
bcm8:
|
||||
name: Puntino 18
|
||||
direction: input
|
||||
bcm9:
|
||||
name: Puntino 17
|
||||
direction: input
|
||||
bcm10:
|
||||
name: 'Colore: Verde'
|
||||
direction: input
|
||||
bcm11:
|
||||
name: Puntino 8
|
||||
direction: input
|
||||
bcm12:
|
||||
name: Puntino 10
|
||||
direction: input
|
||||
bcm13:
|
||||
name: Cloud
|
||||
direction: input
|
||||
bcm14:
|
||||
name: Puntino 1
|
||||
direction: input
|
||||
bcm15:
|
||||
name: Puntino 3
|
||||
direction: input
|
||||
bcm16:
|
||||
name: Puntino 13
|
||||
direction: input
|
||||
bcm17:
|
||||
name: Puntino 4
|
||||
direction: input
|
||||
bcm18:
|
||||
name: Puntino 20
|
||||
direction: input
|
||||
bcm19:
|
||||
name: 'Colore: Arancione'
|
||||
direction: input
|
||||
bcm20:
|
||||
name: Bear
|
||||
direction: input
|
||||
bcm21:
|
||||
name: Puntino 12
|
||||
direction: input
|
||||
bcm22:
|
||||
name: Puntino 15
|
||||
direction: input
|
||||
bcm23:
|
||||
name: Puntino 16
|
||||
direction: input
|
||||
bcm24:
|
||||
name: Puntino 19
|
||||
direction: input
|
||||
bcm25:
|
||||
name: Puntino 5
|
||||
direction: input
|
||||
bcm26:
|
||||
name: Puntino 11
|
||||
direction: input
|
||||
bcm27:
|
||||
name: 'Colore: Rosso'
|
||||
direction: input
|
||||
-->
|
||||
#Raspberry Pi Dots
|
||||
|
||||
###Dots è una scheda HAT punto-a-punto per il Raspberry Pi che ti permette di chiudere il circuito con la vernice conduttiva BARE!
|
||||
|
||||
Ogni puntino ("Dot") sulla scheda Dots è un contatto metallico temporaneo, in attesa di essere collegato con una pennellata di vernice.
|
||||
|
||||
Per leggere un Dot devi impostare il pin corrispondente come INPUT e assicurarti che sia impostato così:
|
||||
|
||||
```python
|
||||
import RPi.GPIO as GPIO
|
||||
GPIO.setmode(GPIO.BCM )
|
||||
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_UP)
|
||||
state = GPIO.input(dot_pin)
|
||||
```
|
||||
|
||||
È buona norma attivare il PULLUP soltanto quando vuoi leggere un Dot, quindi è preferibile utilizzare
|
||||
qualcosa del genere:
|
||||
|
||||
```python
|
||||
def is_dot_connected(dot_pin):
|
||||
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_UP)
|
||||
state = GPIO.input(dot_pin)
|
||||
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_OFF)
|
||||
return state == 0
|
||||
```
|
|
@ -0,0 +1,120 @@
|
|||
<!--
|
||||
---
|
||||
name: Explorer HAT Pro
|
||||
manufacturer: Pimoroni
|
||||
url: https://github.com/pimoroni/explorer-hat
|
||||
github: https://github.com/pimoroni/explorer-hat
|
||||
buy: http://shop.pimoroni.com/products/explorer-hat
|
||||
description: All-in-one luce, input, motore, touch e add-on output board.
|
||||
install:
|
||||
'devices':
|
||||
- 'i2c'
|
||||
'apt':
|
||||
- 'python-smbus'
|
||||
- 'python3-smbus'
|
||||
- 'python-dev'
|
||||
- 'python3-dev'
|
||||
'python':
|
||||
- 'explorerhat'
|
||||
'python3':
|
||||
- 'explorerhat'
|
||||
'examples': 'examples/'
|
||||
pincount: 40
|
||||
i2c:
|
||||
'0x28':
|
||||
name: Touch capacitivo
|
||||
device: cap1208
|
||||
'0x48':
|
||||
name: Input analogico
|
||||
device: ads1015
|
||||
pin:
|
||||
'3': {}
|
||||
'5': {}
|
||||
'7':
|
||||
name: LED 1
|
||||
mode: output
|
||||
active: high
|
||||
'8': {}
|
||||
'10': {}
|
||||
'11':
|
||||
name: LED 2
|
||||
mode: output
|
||||
active: high
|
||||
'12': {}
|
||||
'13':
|
||||
name: LED 3
|
||||
mode: output
|
||||
active: high
|
||||
'15':
|
||||
name: Input 2
|
||||
mode: input
|
||||
active: high
|
||||
'16':
|
||||
name: Input 1
|
||||
mode: input
|
||||
active: high
|
||||
'18':
|
||||
name: Input 3
|
||||
mode: input
|
||||
active: high
|
||||
'19': {}
|
||||
'21': {}
|
||||
'22':
|
||||
name: Input 4
|
||||
mode: input
|
||||
active: high
|
||||
'23': {}
|
||||
'24': {}
|
||||
'29':
|
||||
name: LED 4
|
||||
mode: output
|
||||
active: high
|
||||
'31':
|
||||
name: Output 1
|
||||
mode: output
|
||||
active: high
|
||||
'32':
|
||||
name: Output 2
|
||||
mode: output
|
||||
active: high
|
||||
'33':
|
||||
name: Output 3
|
||||
mode: output
|
||||
active: high
|
||||
'35':
|
||||
name: Motor 1 +
|
||||
mode: output
|
||||
active: high
|
||||
'36':
|
||||
name: Output 4
|
||||
mode: output
|
||||
active: high
|
||||
'37':
|
||||
name: Motore 2 -
|
||||
mode: output
|
||||
active: high
|
||||
'38':
|
||||
name: Motore 1 -
|
||||
mode: output
|
||||
active: high
|
||||
'40':
|
||||
name: Motore 2 +
|
||||
mode: output
|
||||
active: high
|
||||
-->
|
||||
#Explorer HAT Pro
|
||||
|
||||
Input ed output a 5V, touch pad, LED, input analogici e un motore H-Bridge sono le caratteristiche dell'Explorer HAT Pro--un asso nella manica per il tuo Raspberry Pi.
|
||||
|
||||
Per preparare e impostare il modulo puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/explorerhat
|
||||
```
|
||||
|
||||
Importalo poi nel tuo script Python e inizia a smanettare:
|
||||
|
||||
```bash
|
||||
import explorerhat
|
||||
explorerhat.light.on()
|
||||
```
|
|
@ -0,0 +1,92 @@
|
|||
<!--
|
||||
---
|
||||
name: Explorer HAT
|
||||
manufacturer: Pimoroni
|
||||
url: https://github.com/pimoroni/explorer-hat
|
||||
github: https://github.com/pimoroni/explorer-hat
|
||||
buy: http://shop.pimoroni.com/products/explorer-hat
|
||||
description: All-in-one luce, input, touch e add-on output board.
|
||||
install:
|
||||
'devices':
|
||||
- 'i2c'
|
||||
'apt':
|
||||
- 'python-smbus'
|
||||
- 'python3-smbus'
|
||||
- 'python-dev'
|
||||
- 'python3-dev'
|
||||
'python':
|
||||
- 'explorerhat'
|
||||
'python3':
|
||||
- 'explorerhat'
|
||||
'examples': 'examples/'
|
||||
pincount: 40
|
||||
i2c:
|
||||
'0x28':
|
||||
name: Touch capacitivo
|
||||
device: cap1208
|
||||
pin:
|
||||
'7':
|
||||
name: LED 1
|
||||
mode: output
|
||||
active: high
|
||||
'11':
|
||||
name: LED 2
|
||||
mode: output
|
||||
active: high
|
||||
'13':
|
||||
name: LED 3
|
||||
mode: output
|
||||
active: high
|
||||
'15':
|
||||
name: Input 2
|
||||
mode: input
|
||||
active: high
|
||||
'16':
|
||||
name: Input 1
|
||||
mode: input
|
||||
active: high
|
||||
'18':
|
||||
name: Input 3
|
||||
mode: input
|
||||
active: high
|
||||
'22':
|
||||
name: Input 4
|
||||
mode: input
|
||||
active: high
|
||||
'29':
|
||||
name: LED 4
|
||||
mode: output
|
||||
active: high
|
||||
'31':
|
||||
name: Output 1
|
||||
mode: output
|
||||
active: high
|
||||
'32':
|
||||
name: Output 2
|
||||
mode: output
|
||||
active: high
|
||||
'33':
|
||||
name: Output 3
|
||||
mode: output
|
||||
active: high
|
||||
'36':
|
||||
name: Output 4
|
||||
mode: output
|
||||
active: high
|
||||
-->
|
||||
#Explorer HAT
|
||||
|
||||
Input ed output a 5V, touch pad, LED sono le caratteristiche dell'Explorer HAT Pro--un asso nella manica per il tuo Raspberry Pi.
|
||||
|
||||
Per preparare e impostare il modulo puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/explorerhat
|
||||
```
|
||||
|
||||
Importalo poi nel tuo script Python e inizia a smanettare:
|
||||
|
||||
```bash
|
||||
import explorerhat
|
||||
explorerhat.light.on()
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
<!--
|
||||
---
|
||||
name: Ground
|
||||
description: Pin a massa del Raspberry Pi
|
||||
pin:
|
||||
'6':
|
||||
'9':
|
||||
'14':
|
||||
'20':
|
||||
'25':
|
||||
'30':
|
||||
'34':
|
||||
'39':
|
||||
-->
|
||||
#Massa
|
||||
|
||||
I pin a massa sul Raspberry Pi sono tutti collegati, quindi non importa quale colleghi nel fornire
|
||||
la tensione di alimentazione.
|
||||
|
||||
In generale la soluzione più pulita è scegliere il più conveniente da raggiungere o il più vicino alle
|
||||
tue connessioni; in alternativa puoi usarne uno vicino al pin di alimentazione che usi.
|
||||
|
||||
Di solito, è una buona idea utilizzare il pin fisico 17 per la 3v3 e il pin 25 per la massa, per esempio
|
||||
quando usi le connessioni [SPI](/pinout/spi), dal momento che sono vicini ai pin più importanti per l'SPIO.
|
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
---
|
||||
name: I2C
|
||||
description: Raspberry Pi pin i2c
|
||||
pin:
|
||||
'3':
|
||||
name: Dati
|
||||
direction: both
|
||||
active: high
|
||||
'5':
|
||||
name: Clock
|
||||
direction: both
|
||||
active: high
|
||||
'27':
|
||||
name: Dati EEPROM
|
||||
direction: both
|
||||
active: high
|
||||
'28':
|
||||
name: Clock EEPROM
|
||||
direction: both
|
||||
active: high
|
||||
|
||||
-->
|
||||
#I2C - Inter Integrated Circuit
|
||||
|
||||
L'I2C del Raspberry è un modo estremamente utile per comunicare con molti tipi diversi di periferiche esterne, dall'expander digitale MCP23017, ad un ATmega collegato.
|
||||
|
||||
Puoi controllare l'indirizzo delle periferiche I2C collegate con una singola riga di codice:
|
||||
|
||||
```bash
|
||||
sudo apt-get install i2c-tools
|
||||
sudo i2cdetect -y 1
|
||||
```
|
||||
|
||||
Puoi accedere ad i2c da Python usando la libreria smbus:
|
||||
|
||||
```bash
|
||||
sudo apt-get install python-smbus
|
||||
```
|
||||
|
||||
E poi sempre in Python:
|
||||
|
||||
```python
|
||||
import smbus
|
||||
DEVICE_BUS = 1
|
||||
DEVICE_ADDR = 0x15
|
||||
bus = smbus.SMBus(DEVICE_BUS)
|
||||
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
|
||||
```
|
|
@ -0,0 +1,52 @@
|
|||
<!--
|
||||
---
|
||||
name: "Pi-DAC+"
|
||||
manufacturer: IQaudIO
|
||||
buy: http://www.iqaudio.co.uk
|
||||
description: Un convertitore audio I2S da digitale ad analogico per il Raspberry
|
||||
install:
|
||||
'devices':
|
||||
- 'i2c'
|
||||
pincount: 40
|
||||
pin:
|
||||
3:
|
||||
mode: i2c
|
||||
5:
|
||||
mode: i2c
|
||||
12:
|
||||
name: I2S
|
||||
15:
|
||||
name: Muto/Non-muto
|
||||
description: Solo Pi-AMP+ (opzionale)
|
||||
16:
|
||||
name: Rotary Encoder
|
||||
description: (opzionale)
|
||||
18:
|
||||
name: Rotary Encoder
|
||||
description: (opzionale)
|
||||
22:
|
||||
name: Sensore IR
|
||||
description: (opzionale)
|
||||
35:
|
||||
name: I2S
|
||||
38:
|
||||
name: I2S
|
||||
40:
|
||||
name: I2S
|
||||
-->
|
||||
#IQaudIO Pi-DAC+
|
||||
|
||||
Il Pi-DAC+ prende i segnali audio digitali (I2S) dal Raspberry Pi e tramite l'integrato
|
||||
Texas Instruments PCM5122 DAC restituisce un audio analogico con output variabile
|
||||
(controllo volume hardware) ai connettori Pi-DAC+ Phono. Tramite l'amplificatore per cuffia
|
||||
Texas Instruments TPA6133A, il Pi-DAC+ supporta direttamente le cuffie tramite il jack audio
|
||||
da 3.5mm.
|
||||
|
||||
Il Pi Dac usa il GPIO22 per attivare o disattivare il muto sul Pi-AMP+.
|
||||
|
||||
Puoi usare il GPIO25 per collegare un sensore infrarossi e il GPIO23/24 per un rotary encoder
|
||||
(trasduttore di posizione angolare). Entrambe queste parti sono opzionali, ma sono a parte nel
|
||||
Pi-DAC+ per un accesso più comodo.
|
||||
|
||||
Nota: i pin riservati per l'encoder e il sensore infrarossi possono essere usati per altri scopi
|
||||
se gli addon menzionati non sono stati adattati ed abilitati dal software.
|
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
---
|
||||
name: Piano HAT
|
||||
manufacturer: Pimoroni
|
||||
url: https://github.com/pimoroni/piano-hat
|
||||
description: Un piccolo Pi-piano con 16 tasti touch
|
||||
pincount: 40
|
||||
i2c:
|
||||
'0x28':
|
||||
name: Touch capacitivo A
|
||||
device: cap1188
|
||||
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/CAP1188%20.pdf
|
||||
'0x2b':
|
||||
name: Touch capacitivo B
|
||||
device: cap1188
|
||||
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/CAP1188%20.pdf
|
||||
pin:
|
||||
3:
|
||||
mode: i2c
|
||||
5:
|
||||
mode: i2c
|
||||
7:
|
||||
name: Allarme A
|
||||
mode: input
|
||||
11:
|
||||
name: Reset A
|
||||
mode: output
|
||||
13:
|
||||
name: Allarme B
|
||||
mode: input
|
||||
15:
|
||||
name: Reset B
|
||||
mode: output
|
||||
-->
|
||||
#Piano HAT
|
||||
|
||||
Il Piano HAT ha 16 tasti touch, 13 di questi sono singole ottave, gli altri ti danno
|
||||
le ottave superiori e inferiori e la selezione dello strumento.
|
||||
|
||||
Utilizza due Microchip CAP1188 con indirizzi i2c 0x28 e 0x2b.
|
||||
|
||||
Per preparare e impostare l'HAT puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/pianohat | bash
|
||||
```
|
||||
|
||||
…e seguire le istruzioni!
|
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
---
|
||||
name: PiBorg LEDBorg
|
||||
description: Un singolo LED RBG per il tuo Raspberry Pi
|
||||
buy: https://www.piborg.org/ledborg
|
||||
pin:
|
||||
'11':
|
||||
name: LED rosso
|
||||
direction: output
|
||||
active: high
|
||||
description: PiBorg LED rosso
|
||||
'13':
|
||||
name: LED verde
|
||||
direction: input
|
||||
active: high
|
||||
description: PiBorg LED verde
|
||||
'15':
|
||||
name: LED blu
|
||||
direction: output
|
||||
active: high
|
||||
description: PiBorg LED blu
|
||||
-->
|
||||
###Il PiBorg LedBorg è un LED RGB ultra-luminoso per il Raspberry Pi.
|
||||
|
||||
PiBorg ha il suo driver, quindi non devi controllarlo manualmente.
|
||||
|
||||
Se vuoi una gamma di colori decisamente più ampia tuttavia, puoi controllarlo manualmente
|
||||
usando softPwm su WiringPi. L'assegnazione dei pin è come segue:
|
||||
|
||||
* WiringPi pin 0: LED rosso
|
||||
* WiringPi pin 2: LED verde
|
||||
* WiringPi pin 3: LED blu
|
||||
|
||||
È facile usando WiringPi con Python:
|
||||
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
wiringpi.wiringPiSetup()
|
||||
|
||||
wiringpi.softPwmCreate(0,0,100)
|
||||
wiringpi.softPwmCreate(2,0,100)
|
||||
wiringpi.softPwmCreate(3,0,100)
|
||||
|
||||
# Viola!
|
||||
wiringpi.softPwmWrite(3,100) # Blu al massimo
|
||||
wiringpi.softPwmWrite(0,100) # Rosso al massimo
|
||||
wiringpi.softPWMWrite(2,0) # Verde spento
|
||||
```
|
|
@ -0,0 +1,78 @@
|
|||
<!--
|
||||
---
|
||||
name: Pibrella
|
||||
manufacturer: Pimoroni Vs Cyntech
|
||||
url: https://github.com/pimoroni/pibrella
|
||||
description: Una scheda all-in-one per luci, suoni, input ed output.
|
||||
pincount: 26
|
||||
pin:
|
||||
'7':
|
||||
name: LED verde
|
||||
direction: output
|
||||
active: high
|
||||
'11':
|
||||
name: LED giallo
|
||||
direction: output
|
||||
active: high
|
||||
'12':
|
||||
name: Buzzer - cicalino
|
||||
direction: output
|
||||
active: high
|
||||
'13':
|
||||
name: LED rosso
|
||||
direction: output
|
||||
active: high
|
||||
'15':
|
||||
name: Output A
|
||||
direction: output
|
||||
active: high
|
||||
'16':
|
||||
name: Output B
|
||||
direction: output
|
||||
active: high
|
||||
'18':
|
||||
name: Output C
|
||||
direction: output
|
||||
active: high
|
||||
'19':
|
||||
name: Input D
|
||||
direction: output
|
||||
active: high
|
||||
'21':
|
||||
name: Input A
|
||||
direction: input
|
||||
active: high
|
||||
'22':
|
||||
name: Output D
|
||||
direction: output
|
||||
active: high
|
||||
'23':
|
||||
name: Button
|
||||
direction: input
|
||||
active: high
|
||||
'24':
|
||||
name: Input C
|
||||
direction: input
|
||||
active: high
|
||||
'26':
|
||||
name: Input B
|
||||
direction: input
|
||||
active: high
|
||||
-->
|
||||
#Pibrella
|
||||
|
||||
La scheda all-in-one per luci, suoni, input ed output di Pimoroni vs Cyntech utilizza molti dei pin IO
|
||||
del Raspberry, ma la seriale e l'I2C restano liberi, lasciando molto spazio alla creatività.
|
||||
|
||||
Pibrella è facile da usare; innanzitutto devi installare il modulo usando un terminale (LXTerminal):
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/pibrella
|
||||
```
|
||||
|
||||
E poi lo importi nel tuo script Python per smanettare:
|
||||
|
||||
```bash
|
||||
import pibrella
|
||||
pibrella.light.red.on()
|
||||
```
|
|
@ -0,0 +1,22 @@
|
|||
<!--
|
||||
---
|
||||
name: PiGlow
|
||||
manufacturer: Pimoroni
|
||||
url: https://github.com/pimoroni/piglow
|
||||
github: https://github.com/pimoroni/piglow
|
||||
buy: http://shop.pimoroni.com/products/piglow
|
||||
description: Semplicemente 18 LED disposti a spirale, controllati in Python.
|
||||
pincount: 26
|
||||
pin:
|
||||
'1': {}
|
||||
'2': {}
|
||||
'3':
|
||||
mode: i2c
|
||||
'5':
|
||||
mode: i2c
|
||||
'14': {}
|
||||
'17': {}
|
||||
-->
|
||||
#PiGlow
|
||||
|
||||
Semplicemente 18 LED disposti a spirale, controllati in Python.
|
|
@ -0,0 +1,58 @@
|
|||
<!--
|
||||
---
|
||||
name: Ryanteck Motor Controller Board
|
||||
manufacturer: Ryanteck
|
||||
url: https://ryanteck.uk/add-ons/6-ryanteck-rpi-motor-controller-board-0635648607160.html
|
||||
buy: https://ryanteck.uk/add-ons/6-ryanteck-rpi-motor-controller-board-0635648607160.html
|
||||
pincount: 26
|
||||
pin:
|
||||
'11':
|
||||
name: Motore 1 A
|
||||
direction: output
|
||||
active: high
|
||||
'12':
|
||||
name: Motore 1 B
|
||||
direction: output
|
||||
active: high
|
||||
'15':
|
||||
name: Motore 2 A
|
||||
direction: output
|
||||
active: high
|
||||
'16':
|
||||
name: Motore 2 B
|
||||
direction: output
|
||||
active: high
|
||||
-->
|
||||
#Ryanteck Motor Controller Board
|
||||
|
||||
###Una maniera facile e veloce per controllare dei motori dal tuo Raspberry
|
||||
|
||||
```python
|
||||
# Semplice script per i motori dell'RTK-000-001
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
# Imposta la numerazione Broadcom
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
|
||||
# Motore 1 = Pin 17 e 18
|
||||
# Motore 2 = Pin 22 e 23
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
|
||||
# Ora ripeti all'infinito attivando
|
||||
# alternativamente ogni direzione per 5s
|
||||
while (True):
|
||||
# Sleep di 1 secondo, poi attiva il 17
|
||||
GPIO.output(18, 0)
|
||||
time.sleep(1)
|
||||
GPIO.output(17, 1);
|
||||
time.sleep(5);
|
||||
# Ed ora l'opposto
|
||||
GPIO.output(17, 0)
|
||||
time.sleep(1);
|
||||
GPIO.output(18, 1);
|
||||
time.sleep(5);
|
||||
# E si ricomincia
|
||||
# Cleanup finale
|
||||
GPIO.cleanup()
|
||||
```
|
|
@ -0,0 +1,47 @@
|
|||
<!--
|
||||
---
|
||||
name: "Sense HAT"
|
||||
manufacturer: Raspberry Pi Foundation
|
||||
url: https://www.raspberrypi.org/products/sense-hat/
|
||||
description: Scheda add-on che include una matrice 8×8 LED RBG, un joystick a 5 bottoni, un IMU e sensori ambientali
|
||||
install:
|
||||
'devices':
|
||||
- 'i2c'
|
||||
- 'spi'
|
||||
pincount: 40
|
||||
pin:
|
||||
3:
|
||||
mode: i2c
|
||||
5:
|
||||
mode: i2c
|
||||
16:
|
||||
name: Joystick
|
||||
mode: input
|
||||
18:
|
||||
name: Joystick
|
||||
mode: input
|
||||
19:
|
||||
mode: spi
|
||||
21:
|
||||
mode: spi
|
||||
22:
|
||||
name: Joystick
|
||||
mode: input
|
||||
23:
|
||||
mode: spi
|
||||
24:
|
||||
mode: spi
|
||||
-->
|
||||
#Sense HAT
|
||||
|
||||
Il Sense HAT è una scheda add-on per il Raspberry Pi che comprende una matrice 8×8 LED RGB, un joystick a 5 bottoni e i
|
||||
seguenti sensori:
|
||||
|
||||
Giroscopio, Accelerometro, Magnetometro, Temperatura, Pressione barometrica e Umidità.
|
||||
|
||||
Lo shift register che controlla la matrice LED è un LED2472G, collegato tramite un ATTINY88 al bus SPI del Raspberry.
|
||||
Il Joystick/Switch multidirezionale SKRHABE010 è anch'esso connesso al bus SPI.
|
||||
|
||||
Di per sé, i sensori operano (prevalentemente) sul bus I2C; gli IMU (Giroscopio, Accelerometro, Magnetometro) operano tramite un LSM9DS1 collocato all'indirizzo i2c 0x1c(0x1e), 0x6a(0x6b), con interrupts sul ATTINY88.
|
||||
|
||||
I sensori ambientali sono implementati da un sensore LPS25H (pressione e temperatura) all'indirizzo 0x5c e da un sensore HTS221 (umidità e temperatura) all'indirizzo 0x5f sul bus I2C.
|
|
@ -0,0 +1,42 @@
|
|||
<!--
|
||||
---
|
||||
name: Skywriter HAT
|
||||
manufacturer: Pimoroni
|
||||
url: https://github.com/pimoroni/skywriter-hat
|
||||
github: https://github.com/pimoroni/skywriter-hat
|
||||
buy: http://shop.pimoroni.com/products/skywriter-hat
|
||||
description: Un sensore 3D posizionale per le dita.
|
||||
install:
|
||||
'apt':
|
||||
- 'python-smbus'
|
||||
- 'python3-smbus'
|
||||
- 'python-dev'
|
||||
- 'python3-dev'
|
||||
'python':
|
||||
- 'skywriter'
|
||||
'examples': 'python/examples/'
|
||||
pincount: 40
|
||||
pin:
|
||||
'3':
|
||||
mode: i2c
|
||||
'5':
|
||||
mode: i2c
|
||||
'11':
|
||||
name: Reset
|
||||
'13':
|
||||
name: Transfer
|
||||
-->
|
||||
#Skywriter HAT
|
||||
|
||||
Skywriter HAT percepisce la posizione del tuo dito in 3 dimensioni, e restituisce un asse in X, Y, Z
|
||||
che puoi usare nei tuoi script Python.
|
||||
|
||||
È anche in grado di riconoscere gesti, come ad esempio swipe ("scorrimento"), e molti altri.
|
||||
|
||||
Per preparare e impostare l'HAT puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/skywriter | bash
|
||||
```
|
||||
|
||||
…e seguire le istruzioni!
|
|
@ -0,0 +1,68 @@
|
|||
<!--
|
||||
---
|
||||
name: SPI
|
||||
description: Pin SPI del Raspberry
|
||||
pincount: 5
|
||||
pin:
|
||||
'11':
|
||||
name: SPI1 CE1
|
||||
'12':
|
||||
name: SPI1 CE0
|
||||
'19':
|
||||
name: SPI0 MOSI
|
||||
direction: output
|
||||
active: high
|
||||
description: Master Out / Slave In
|
||||
'21':
|
||||
name: SPI0 MISO
|
||||
direction: input
|
||||
active: high
|
||||
description: Master In / Slave Out
|
||||
'23':
|
||||
name: SPI0 SCLK
|
||||
direction: output
|
||||
active: high
|
||||
description: Clock
|
||||
'24':
|
||||
name: SPI0 CE0
|
||||
direction: output
|
||||
active: high
|
||||
description: Chip Select 0
|
||||
'26':
|
||||
name: SPI0 CE1
|
||||
direction: output
|
||||
active: high
|
||||
description: Chip Select 1
|
||||
'35':
|
||||
name: SPI1 MISO
|
||||
'36':
|
||||
name: SPI1 CE2
|
||||
'38':
|
||||
name: SPI1 MOSI
|
||||
'40':
|
||||
name: SPI1 SCLK
|
||||
-->
|
||||
#SPI - Serial Peripheral Interface
|
||||
|
||||
###Conosciuto come il bus seriale "four-wire", l'SPI ti permette di concatenare una serie di periferiche compatibili su un solo set di pin assegnandogli dei diversi pin chip-select.
|
||||
|
||||
Un esempio efficace di una periferica SPI è l'MCP23S17, un chip IO expander digitale (nota la S al posto dello zero nella versione I2C).
|
||||
|
||||
Per comunicare con una periferica SPI, devi controllare il suo chip-select pin corrispondente. Di default, il Raspberry ha CE0 e CE1.
|
||||
|
||||
```python
|
||||
import spidev
|
||||
|
||||
spi = spidev.SpiDev()
|
||||
spi.open(0, CHIP_SELECT_0_OR_1)
|
||||
spi.max_speed_hz = 1000000
|
||||
spi.xfer([value_8bit])
|
||||
```
|
||||
|
||||
Puoi utilizzare anche le porte SPI per fare "Bit-Bang" su un ATmega 328, caricando i progetti di Arduino tramite la versione modificata
|
||||
dell'AVRDude di Gordon.
|
||||
|
||||
Collega la porta SPI del Raspberry a quella dell'ATmega, ed alimenta l'ATmega dal pin a 3.3V sul Raspberry.
|
||||
Assicurati di non avere alcun driver SPI in esecuzione, ed esegui "avrdude -p m328p -c gpio" per verificare la connessione.
|
||||
|
||||
Controlla i pin individuali per imparare come collegare il tuo ATmega.
|
|
@ -0,0 +1,51 @@
|
|||
<!--
|
||||
---
|
||||
name: Traffic HAT
|
||||
manufacturer: Ryanteck LTD.
|
||||
url: http://www.ryanteck.uk/store/traffichat
|
||||
buy: http://www.ryanteck.uk/store/traffichat
|
||||
description: Una maniera facile e veloce per imparare le basi del GPIO a basso prezzo. Tutto in un singolo HAT.
|
||||
pincount: 40
|
||||
pin:
|
||||
'15':
|
||||
name: LED1 / verde
|
||||
direction: output
|
||||
active: high
|
||||
'16':
|
||||
name: LED2 / ambra
|
||||
direction: output
|
||||
active: high
|
||||
'18':
|
||||
name: LED3 / rosso
|
||||
direction: output
|
||||
active: high
|
||||
'22':
|
||||
name: Bottone
|
||||
direction: input
|
||||
active: high
|
||||
'29':
|
||||
name: Buzzer - cicalino
|
||||
direction: output
|
||||
active: high
|
||||
-->
|
||||
#Traffic HAT
|
||||
|
||||
###Una maniera facile e veloce per imparare le basi del GPIO a basso prezzo. Tutto in un singolo HAT.
|
||||
|
||||
```python
|
||||
import RPi.GPIO as IO
|
||||
from time import sleep
|
||||
|
||||
IO.setmode(IO.BCM)
|
||||
|
||||
#Luci
|
||||
IO.setup(22,IO.OUT)
|
||||
IO.setup(23,IO.OUT)
|
||||
IO.setup(24,IO.OUT)
|
||||
|
||||
#Buzzer
|
||||
IO.setup(5,IO.OUT)
|
||||
|
||||
#Bottone
|
||||
IO.setup(25,IO.IN,pull_up_down=IO.PUD_UP)
|
||||
```
|
|
@ -0,0 +1,34 @@
|
|||
<!--
|
||||
---
|
||||
name: UART
|
||||
description: Pin UART del Raspberry
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Trasmissione
|
||||
direction: output
|
||||
active: high
|
||||
'10':
|
||||
name: RXD / Ricezione
|
||||
direction: input
|
||||
active: high
|
||||
-->
|
||||
#UART - Universal Asynchronous Receiver/Transmitter
|
||||
|
||||
###I due pin UART in WiringPi sono il 15 e il 16.
|
||||
|
||||
UART è una maniera facile e semplice per collegare un Arduino (o un ATmega bootloaded) con il tuo Raspberry. Devi, tuttavia,
|
||||
fare attenzione alla differenza di tensione tra le due periferiche: il Raspberry è a 3.3V, e l'Arduino invece a 5V. Se
|
||||
li colleghi rischi di evocare del magico fumo blu.
|
||||
|
||||
Personalmente preferisco costruire un circuito con un Arduino Bootloaded ATmega 328 su una breadboard con un regolatore di tensione
|
||||
per prendere la linea a 5V del Raspberry e convertirla in 3.3V. L'ATmega 328 sembra piuttosto soddisfatto di funzionare a 3.3V con un
|
||||
cristallo a 16Mhz, e così ottieni un clone di Arduino con una logica a 3.3V.
|
||||
|
||||
Se hai WiringPi2-Python installato, questo esempio in python apre l'UART del Raspberry a 9600baud e ci scrive 'ciao mondo!'
|
||||
|
||||
```python
|
||||
import wiringpi2 as wiringpi
|
||||
wiringpi.wiringPiSetup()
|
||||
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
|
||||
wiringpi.serialPuts(serial,'ciao mondo!')
|
||||
```
|
|
@ -0,0 +1,47 @@
|
|||
<!--
|
||||
---
|
||||
name: Unicorn HAT
|
||||
manufacturer: Pimoroni
|
||||
url: http://shop.pimoroni.com/products/unicorn-hat
|
||||
buy: http://shop.pimoroni.com/products/unicorn-hat
|
||||
description: 64 LED RGB accecanti su un unico HAT
|
||||
github: https://github.com/pimoroni/unicornhat
|
||||
install:
|
||||
'apt':
|
||||
- 'python-dev'
|
||||
- 'python3-dev'
|
||||
'python':
|
||||
- 'unicornhat'
|
||||
'python3':
|
||||
- 'unicornhat'
|
||||
'examples': 'python/examples/'
|
||||
pincount: 40
|
||||
pin:
|
||||
'12':
|
||||
name: Dati
|
||||
direction: output
|
||||
mode: pwm
|
||||
active: high
|
||||
description: WS2812 Dati
|
||||
-->
|
||||
#Unicorn HAT
|
||||
|
||||
64 LED accecanti montati su un HAT e controllati da una velocissima libreria in C, con cui puoi comunicare
|
||||
via Python, rendono l'Unicorn HAT il fratello maggiore (e più luminoso) del PiGlow.
|
||||
|
||||
Nota: Unicorn HAT usa alcuni trucchetti col PWM, che sfruttano lo stesso hardware che ti permette di produrre
|
||||
suoni tramite il jack audio (analogico), per cui non puoi usare entrambi allo stesso momento!
|
||||
|
||||
Per preparare e impostare l'HAT puoi utilizzare l'installer fornito:
|
||||
|
||||
```bash
|
||||
curl -sS get.pimoroni.com/unicornhat | bash
|
||||
```
|
||||
|
||||
Importalo poi nel tuo script Python e inizia a smanettare:
|
||||
|
||||
```bash
|
||||
import unicornhat
|
||||
unicornhat.set_pixel(0, 0, 255, 255, 255)
|
||||
unicornhat.show()
|
||||
```
|
|
@ -0,0 +1,86 @@
|
|||
<!--
|
||||
---
|
||||
name: Mappa pin GPIO WiringPi
|
||||
page_url: wiringpi
|
||||
pin:
|
||||
'3':
|
||||
name: WiringPi 8
|
||||
'5':
|
||||
name: WiringPi 9
|
||||
'7':
|
||||
name: WiringPi 7
|
||||
'8':
|
||||
name: WiringPi 15
|
||||
'10':
|
||||
name: WiringPi 16
|
||||
'11':
|
||||
name: WiringPi 0
|
||||
'12':
|
||||
name: WiringPi 1
|
||||
'13':
|
||||
name: WiringPi 2
|
||||
'15':
|
||||
name: WiringPi 3
|
||||
'16':
|
||||
name: WiringPi 4
|
||||
'18':
|
||||
name: WiringPi 5
|
||||
'19':
|
||||
name: WiringPi 12
|
||||
'21':
|
||||
name: WiringPi 13
|
||||
'22':
|
||||
name: WiringPi 6
|
||||
'23':
|
||||
name: WiringPi 14
|
||||
'24':
|
||||
name: WiringPi 10
|
||||
'26':
|
||||
name: WiringPi 11
|
||||
'29':
|
||||
name: WiringPi 21
|
||||
'31':
|
||||
name: WiringPi 22
|
||||
'32':
|
||||
name: WiringPi 26
|
||||
'33':
|
||||
name: WiringPi 23
|
||||
'35':
|
||||
name: WiringPi 24
|
||||
'36':
|
||||
name: WiringPi 27
|
||||
'37':
|
||||
name: WiringPi 25
|
||||
'38':
|
||||
name: WiringPi 28
|
||||
'40':
|
||||
name: WiringPi 29
|
||||
-->
|
||||
#Raspberry Pi WiringPi
|
||||
|
||||
###WiringPi è un tentativo di portare la semplicità di connessione dell'Arduino sul Raspberry.
|
||||
|
||||
L'idea è di avere un'unica piattaforma comune e un insieme di funzioni per accedere alle porte GPIO da diversi linguaggi.
|
||||
WiringPi ha il cuore in una libreria C, ma è disponibile sia per Ruby che per Python; gli utenti possono installarla usando
|
||||
rispettivamente "gem install wiringpi" e "pip install wiringpi2".
|
||||
|
||||
Gli utenti Python noteranno il 2 alla fine del pacchetto; la libreria WiringPi2-Python finalmente porta tutta una serie di
|
||||
funzionalità preesistenti di WiringPi a Python, incluse le ultime presenti in WiringPi 2.
|
||||
|
||||
Per maggiori informazioni su WiringPi, dai un'occhiata al loro sito ufficiale.
|
||||
|
||||
##Primi passi con WiringPi
|
||||
|
||||
WiringPi usa il suo sistema di numerazione dei pin; qui imparerai come WiringPi indicizza i pin GPIO, cosa fanno tali pin e
|
||||
come realizzare progetti interessanti con Python o Ruby.
|
||||
|
||||
WiringPi, la libreria GPIO "simil-Arduino" per il Raspberry, è disponibile in C, direttamente dalla repository git di Gordon,
|
||||
in Python, in Ruby, e persino in Perl e PHP, sebbene non in maniera altrettanto completa.
|
||||
|
||||
Installarla in Python non potrebbe essere più semplice. Semplicemente:
|
||||
|
||||
```bash
|
||||
sudo pip install wiringpi2
|
||||
```
|
||||
|
||||
Hai notato il 2 alla fine? È la nuova, splendente libreria WiringPi!
|
|
@ -0,0 +1,368 @@
|
|||
---
|
||||
name: Assegnazione pin GPIO di Raspberry Pi
|
||||
pins:
|
||||
'1':
|
||||
name: Alimentazione a 3.3V
|
||||
type: "+3v3"
|
||||
'2':
|
||||
name: Alimentazione a 5V
|
||||
type: "+5v"
|
||||
'3':
|
||||
name: SDA
|
||||
description: Dati I2C
|
||||
type: GPIO/I2C
|
||||
scheme:
|
||||
wiringpi: 8
|
||||
bcm: 2
|
||||
bcmAlt: 0
|
||||
functions:
|
||||
alt0: SDA1
|
||||
alt1: SA3
|
||||
'4':
|
||||
name: Alimentazione a 5V
|
||||
type: "+5v"
|
||||
'5':
|
||||
name: SCL
|
||||
description: Clock I2C
|
||||
type: GPIO/I2C
|
||||
scheme:
|
||||
wiringpi: 9
|
||||
bcm: 3
|
||||
bcmAlt: 1
|
||||
functions:
|
||||
alt0: SCL1
|
||||
alt1: SA2
|
||||
'6':
|
||||
name: Massa
|
||||
type: GND
|
||||
'7':
|
||||
name: GPCLK0
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 7
|
||||
bcm: 4
|
||||
functions:
|
||||
alt0: GPCLK0
|
||||
alt1: SA1
|
||||
alt5: ARM_TDI
|
||||
'8':
|
||||
name: TXD
|
||||
description: Trasmissione UART
|
||||
type: GPIO/UART
|
||||
scheme:
|
||||
wiringpi: 15
|
||||
bcm: 14
|
||||
functions:
|
||||
alt0: TXD0
|
||||
alt1: SD6
|
||||
alt2: Riservato
|
||||
alt5: TXD1
|
||||
'9':
|
||||
name: Massa
|
||||
type: GND
|
||||
'10':
|
||||
name: RXD
|
||||
description: Ricezione UART
|
||||
type: GPIO/UART
|
||||
scheme:
|
||||
wiringpi: 16
|
||||
bcm: 15
|
||||
functions:
|
||||
alt0: RXD0
|
||||
alt1: SD7
|
||||
alt2: Riservato
|
||||
alt5: RXD1
|
||||
'11':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 0
|
||||
bcm: 17
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: SD9
|
||||
alt2: Riservato
|
||||
alt3: RTS0
|
||||
alt4: SPI1_CE1_N
|
||||
alt5: RTS1
|
||||
'12':
|
||||
name: PCM_C
|
||||
description: Clock PCM
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 1
|
||||
bcm: 18
|
||||
functions:
|
||||
alt0: PCM_CLK
|
||||
alt1: SD10
|
||||
alt2: Riservato
|
||||
alt3: BSCSL SDA / MOSI
|
||||
alt4: SPI1_CE0_N
|
||||
alt5: PWM0
|
||||
'13':
|
||||
name: PCM_D
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 2
|
||||
bcm: 27
|
||||
bcmAlt: 21
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: Riservato
|
||||
alt2: Riservato
|
||||
alt3: SD1_DAT3
|
||||
alt4: ARM_TMS
|
||||
'14':
|
||||
name: Massa
|
||||
type: GND
|
||||
'15':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 3
|
||||
bcm: 22
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: SD14
|
||||
alt2: Riservato
|
||||
alt3: SD1_CLK
|
||||
alt4: ARM_TRST
|
||||
'16':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 4
|
||||
bcm: 23
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: SD15
|
||||
alt2: Riservato
|
||||
alt3: SD1_CMD
|
||||
alt4: ARM_RTCK
|
||||
'17':
|
||||
name: Alimentazione a 3.3V
|
||||
type: "+3v3"
|
||||
'18':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 5
|
||||
bcm: 24
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: SD16
|
||||
alt2: Riservato
|
||||
alt3: SD1_DAT0
|
||||
alt4: ARM_TDO
|
||||
'19':
|
||||
name: MOSI
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 12
|
||||
bcm: 10
|
||||
functions:
|
||||
alt0: SPI0_MOSI
|
||||
alt1: SD2
|
||||
alt2: Riservato
|
||||
'20':
|
||||
name: Massa
|
||||
type: GND
|
||||
'21':
|
||||
name: MISO
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 13
|
||||
bcm: 9
|
||||
functions:
|
||||
alt0: SPI0_MISO
|
||||
alt1: SD1
|
||||
alt2: Riservato
|
||||
'22':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 6
|
||||
bcm: 25
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: SD17
|
||||
alt2: Riservato
|
||||
alt3: SD1_DAT1
|
||||
alt4: ARM_TCK
|
||||
'23':
|
||||
name: SCLK
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 14
|
||||
bcm: 11
|
||||
functions:
|
||||
alt0: SPI0_SCLK
|
||||
alt1: SD3
|
||||
alt2: Riservato
|
||||
'24':
|
||||
name: CE0
|
||||
description: SPI Chip Select 0
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 10
|
||||
bcm: 8
|
||||
functions:
|
||||
alt0: SPI0_CE0_N
|
||||
alt1: SD0
|
||||
alt2: Riservato
|
||||
'25':
|
||||
name: Massa
|
||||
type: GND
|
||||
'26':
|
||||
name: CE1
|
||||
description: SPI Chip Select 1
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 11
|
||||
bcm: 7
|
||||
functions:
|
||||
alt0: SPI0_CE1_N
|
||||
alt1: SWE_N / SRW_N
|
||||
alt2: Riservato
|
||||
'27':
|
||||
name: ID_SD
|
||||
description: Dati HAT EEPROM i2c
|
||||
type: GPIO/I2C
|
||||
scheme:
|
||||
wiringpi: 30
|
||||
bcm: 0
|
||||
functions:
|
||||
alt0: SDA0
|
||||
alt1: SA5
|
||||
alt2: Riservato
|
||||
'28':
|
||||
name: ID_SC
|
||||
description: Clock HAT EEPROM i2c
|
||||
type: GPIO/I2C
|
||||
scheme:
|
||||
wiringpi: 31
|
||||
bcm: 1
|
||||
functions:
|
||||
alt0: SCL0
|
||||
alt1: SA4
|
||||
alt2: Riservato
|
||||
'29':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 21
|
||||
bcm: 5
|
||||
functions:
|
||||
alt0: GPCLK1
|
||||
alt1: SA0
|
||||
alt2: Riservato
|
||||
alt5: ARM_TDO
|
||||
'30':
|
||||
name: Massa
|
||||
type: GND
|
||||
'31':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 22
|
||||
bcm: 6
|
||||
functions:
|
||||
alt0: GPCLK2
|
||||
alt1: SOE_N / SE
|
||||
alt2: Riservato
|
||||
alt5: ARM_RTCK
|
||||
'32':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 26
|
||||
bcm: 12
|
||||
functions:
|
||||
alt0: PWM0
|
||||
alt1: SD4
|
||||
alt2: Riservato
|
||||
alt5: ARM_TMS
|
||||
'33':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 23
|
||||
bcm: 13
|
||||
functions:
|
||||
alt0: PWM1
|
||||
alt1: SD5
|
||||
alt2: Riservato
|
||||
alt5: ARM_TCK
|
||||
'34':
|
||||
name: Massa
|
||||
type: GND
|
||||
'35':
|
||||
name: MISO
|
||||
description: Master-In SPI
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 24
|
||||
bcm: 19
|
||||
functions:
|
||||
alt0: PCM_FS
|
||||
alt1: SD11
|
||||
alt2: Riservato
|
||||
alt3: BSCSL SCL / SCLK
|
||||
alt4: SPI1_MISO
|
||||
alt5: PWM1
|
||||
'36':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 27
|
||||
bcm: 16
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: SD8
|
||||
alt2: Riservato
|
||||
alt3: CTS0
|
||||
alt4: SPI1_CE2_N
|
||||
alt5: CTS1
|
||||
'37':
|
||||
name: ''
|
||||
type: GPIO
|
||||
scheme:
|
||||
wiringpi: 25
|
||||
bcm: 26
|
||||
functions:
|
||||
alt0: Riservato
|
||||
alt1: Riservato
|
||||
alt2: Riservato
|
||||
alt3: SD1_DAT2
|
||||
alt4: ARM_TDI
|
||||
'38':
|
||||
name: MOSI
|
||||
description: Master-Out SPI
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 28
|
||||
bcm: 20
|
||||
functions:
|
||||
alt0: PCM_DIN
|
||||
alt1: SD12
|
||||
alt2: Riservato
|
||||
alt3: BSCSL / MISO
|
||||
alt4: SPI1_MOSI
|
||||
alt5: CPCLK0
|
||||
'39':
|
||||
name: Massa
|
||||
type: GND
|
||||
'40':
|
||||
name: SCLK
|
||||
description: Clock SPI
|
||||
type: GPIO/SPI
|
||||
scheme:
|
||||
wiringpi: 29
|
||||
bcm: 21
|
||||
functions:
|
||||
alt0: PCM_DOUT
|
||||
alt1: SD13
|
||||
alt2: Riservato
|
||||
alt3: BSCSL / CE_N
|
||||
alt4: SPI1_SCLK
|
||||
alt5: GPCLK1
|
|
@ -0,0 +1,3 @@
|
|||
###Il pin 3v3, di alimentazione a 3.3 Volt, può fornire una corrente massima di circa 50 mA. Abbastanza da alimentare un paio di led o un microprocessore, ma non molto di più.
|
||||
|
||||
Generalmente, la porta a 5V è da preferire, insieme ad un regolatore 3v3 per i progetti a 3.3V.
|
|
@ -0,0 +1,9 @@
|
|||
Questo pin fa il paio con il pin di trasmissione UART, TXD. È anche noto come "Seriale" e, di default, restituisce una console dal tuo
|
||||
Raspberry che, con un cavo seriale adeguato, puoi utilizzare per controllare il tuo Raspberry da riga di comando.
|
||||
|
||||
Per questo, i pin UART sono utili per preparare un Raspberry "headless" (cioè senza alcuno schermo) e collegarlo ad una rete.
|
||||
|
||||
L'UART risulta estremamente utile se vuoi comunicare con una scheda Arduino o Propeller dal tuo Raspberry; devi tuttavia far attenzione
|
||||
a disabilitare la console seriale in raspi-config.
|
||||
|
||||
[Maggiori informazioni su UART](/pinout/uart)
|
|
@ -0,0 +1,3 @@
|
|||
L'output PWM0 del pin BCM 18 è particolarmente utile in combinazione con un po' di accesso rapido e diretto alla memoria,
|
||||
per controllare periferiche capricciose con dei timing estremamente specifici. I LED WS2812 dell'[Unicorn HAT](/pinout/unicorn_hat) sono
|
||||
un buon esempio di questa tecnica in azione.
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1,3 @@
|
|||
###Il pin 3v3, di alimentazione a 3.3 Volt, può fornire una corrente massima di circa 50 mA. Abbastanza da alimentare un paio di led o un microprocessore, ma non molto di più.
|
||||
|
||||
Generalmente, la porta a 5V è da preferire, insieme ad un regolatore 3v3 per i progetti a 3.3V.
|
|
@ -0,0 +1,6 @@
|
|||
###I pin di alimentazione a 5V sono collegati direttamente all'alimentazione del Raspberry stesso, e sono in grado di fornire tutta la corrente del tuo alimentatore principale, meno quella usata dallo stesso Raspberry.
|
||||
|
||||
Con un'alimentazione decente, come l'alimentatore ufficiale del Raspberry, puoi ragionevolmente ottenere circa 1.5A.
|
||||
|
||||
Non farti ingannare da quelli che sembrano pochi miseri Volt. Puoi fare molto con 5V: alimentare Arduino, e persino alimentare
|
||||
un inverter elettroluminescente direttamente dal pin a 5V!
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1 @@
|
|||
Questi pin sono generalmente riservati per la comunicazione I2C con un'EEPROM HAT.
|
|
@ -0,0 +1 @@
|
|||
Questi pin sono generalmente riservati per la comunicazione I2C con un'EEPROM HAT.
|
|
@ -0,0 +1,6 @@
|
|||
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)
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1,6 @@
|
|||
###I pin di alimentazione a 5V sono collegati direttamente all'alimentazione del Raspberry stesso, e sono in grado di fornire tutta la corrente del tuo alimentatore principale, meno quella usata dallo stesso Raspberry.
|
||||
|
||||
Con un'alimentazione decente, come l'alimentatore ufficiale del Raspberry, puoi ragionevolmente ottenere circa 1.5A.
|
||||
|
||||
Non farti ingannare da quelli che sembrano pochi miseri Volt. Puoi fare molto con 5V: alimentare Arduino, e persino alimentare
|
||||
un inverter elettroluminescente direttamente dal pin a 5V!
|
|
@ -0,0 +1 @@
|
|||
SCL è uno dei pin i2c del Raspberry, [maggiori informazioni su i2c](/pinout/i2c).
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1,9 @@
|
|||
Questo pin fa il paio con il pin di ricezione UART, RXD. È anche noto come "Seriale" e, di default, restituisce una console dal tuo
|
||||
Raspberry che, con un cavo seriale adeguato, puoi utilizzare per controllare il tuo Raspberry da riga di comando.
|
||||
|
||||
Per questo, i pin UART sono utili per preparare un Raspberry "headless" (cioè senza alcuno schermo) e collegarlo ad una rete.
|
||||
|
||||
L'UART risulta estremamente utile se vuoi comunicare con una scheda Arduino o Propeller dal tuo Raspberry; devi tuttavia far attenzione
|
||||
a disabilitare la console seriale in raspi-config.
|
||||
|
||||
[Maggiori informazioni su UART](/pinout/uart)
|
|
@ -0,0 +1 @@
|
|||
Massa!
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
default_desc: La guida completa ai pin GPIO del Raspberry Pi originale, del Modello
|
||||
B+ e del Raspberry Pi 2
|
||||
default_title: Assegnazione pin GPIO del Raspberry Pi - Pi 1, B+, Pi 2
|
||||
title_suffix: " - Assegnazione pin GPIO del Raspberry Pi"
|
||||
base_url: /pinout/
|
||||
resource_url: /resources/
|
||||
domain: pinout.xyz
|
||||
url_suffix:
|
||||
urls:
|
||||
GND: ground
|
||||
strings:
|
||||
- made_by: '* Prodotto da {manufacturer}'
|
||||
- type_hat: '* Fattore di forma HAT'
|
||||
- type_classic: '* Fattore di forma classico'
|
||||
- pin_header: '* {} pin header'
|
||||
- uses_i2c: '* Utilizza I2C'
|
||||
- wiring_pi_pin: 'Wiring Pi pin {}'
|
||||
overlays:
|
||||
- ground
|
||||
- spi
|
||||
- uart
|
||||
- i2c
|
||||
- wiringpi
|
||||
- arduino-spi
|
||||
- rtk-000-001
|
||||
- piborg-ledborg
|
||||
- piglow
|
||||
- pibrella
|
||||
- unicorn-hat
|
||||
- skywriter-hat
|
||||
- explorer-hat-pro
|
||||
- explorer-hat
|
||||
- display-o-tron
|
||||
- display-o-tron-hat
|
||||
- dots
|
||||
- traffic-hat
|
||||
- iqaudio-pi-dac
|
||||
- piano-hat
|
||||
- sense-hat
|
|
@ -0,0 +1,68 @@
|
|||
<!doctype html>
|
||||
<html lang="en-GB">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<title>{{title}}</title>
|
||||
<meta name="description" content="{{description}}" />
|
||||
<link href='//fonts.googleapis.com/css?family=Sanchez|Ubuntu+Mono' rel='stylesheet' type='text/css' />
|
||||
<link href='{{resource_url}}prettify/prettify.css' rel='stylesheet' />
|
||||
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
|
||||
<link href="{{resource_url}}pinout.css?v={{v}}" rel="stylesheet">
|
||||
<link href="{{resource_url}}print.css?v={{v}}" rel="stylesheet" media="print">
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
{{hreflang}}
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-69846516-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<ul class="main-nav">
|
||||
<li><a href="http://pi.gadgetoid.com/">Pi Blog</a></li>
|
||||
<li><a href="http://eagle.gadgetoid.com">Impara Eagle</a></li>
|
||||
<li><a href="https://twitter.com/gadgetoid"><i class="fa fa-twitter"></i> @Gadgetoid</a></li>
|
||||
<li><a href="https://twitter.com/5p4k"><i class="fa fa-twitter"></i> @5p4k</a></li>
|
||||
<li><a href="https://github.com/Gadgetoid/Pinout2"><i class="fa fa-github"></i> Contribuisci</a></li>
|
||||
{{lang_links}}
|
||||
</ul>
|
||||
<h1 class="logo"><a title="Mappa pin GPIO del Raspberry Pi - Home" href="/"><img src="{{resource_url}}pinout-logo.png" style="top:8px;" /><span>Raspberry Pi</span>n<span class="out">out</span></a></h1>
|
||||
<div class="overlay-container">
|
||||
<span>Informazioni sui pin e add-ons <i class="fa fa-arrow-right"></i></span>
|
||||
<div class="drop-down">
|
||||
<span>Scegli…</span>
|
||||
<ul class="overlay">
|
||||
{{overlays}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="gpio">
|
||||
<div id="pinbase"></div>
|
||||
<div id="pinbasebplus"></div>
|
||||
{{nav}}
|
||||
</nav>
|
||||
<div id="content">
|
||||
<div id="pages">
|
||||
{{content}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" style="clear: both;padding: 20px 0px;text-align:center;">
|
||||
<p>Hai trovato un errore, o vuoi aggiungere l'assegnazione pin della tua scheda? <br>
|
||||
<a href="https://github.com/gadgetoid/Pinout2">Dai un'occhiata alla nostra repository su GitHub</a> e apri un'Issue o effettua una Pull Request!</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1.9.1/jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/prettify/0.1/prettify.js"></script>
|
||||
<script src='{{resource_url}}prettify/lang-ruby.js'></script>
|
||||
<script src='{{resource_url}}prettify/lang-bash.js'></script>
|
||||
<script src='{{resource_url}}gaat.js'></script>
|
||||
<script src='{{resource_url}}pinout.js?v={{v}}'></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue