Skip to content

Commit ffc8ae0

Browse files
author
Stefania
authored
Merge pull request #28 from robsoncouto/patch-23
Translated shiftIn() function
2 parents ce422c2 + 733c28e commit ffc8ae0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: shiftIn()
33
categories: [ "Functions" ]
4-
subCategories: [ "Advanced I/O" ]
4+
subCategories: [ "Entradas e Saídas Avançadas" ]
55
---
66

77
:source-highlighter: pygments
@@ -17,32 +17,32 @@ subCategories: [ "Advanced I/O" ]
1717
--
1818

1919
[float]
20-
=== Description
21-
Shifts in a byte of data one bit at a time. Starts from either the most (i.e. the leftmost) or least (rightmost) significant bit. For each bit, the clock pin is pulled high, the next bit is read from the data line, and then the clock pin is taken low.
20+
=== Descrição
21+
Receb um byte de dados, um bit de cada vez. Começa com ou o bit mais significante (o mais à esquerda) ou o menos significante (mais à direita). Para cada bit, o pino de clock é colocado em estado em HIGH, o próximo bit é lido no pino de dados (data), e então o pino é colocado em estado LOW novamente.
2222

23-
If you're interfacing with a device that's clocked by rising edges, you'll need to make sure that the clock pin is low before the first call to `shiftIn()`, e.g. with a call to `digitalWrite(clockPin, LOW)`.
23+
Se está conectando um dispositivo que funciona a partir da borda de subida sinal de clock, você irá precisar garantir que o pino de clock está em estado LOW antes da primeira chamada de `shiftIn()`, ex. chamando `digitalWrite(clockPin, LOW)`.
2424

25-
Note: this is a software implementation; Arduino also provides an link:../SPI[SPI library] that uses the hardware implementation, which is faster but only works on specific pins.
25+
Nota: essa é uma implementação por software; O Arduino também provê uma link:../SPI[biblioteca SPI] que faz a implementação em hardware, que é mais rápida, mas apenas funciona em pinos específicos.
2626
[%hardbreaks]
2727

2828

2929
[float]
30-
=== Syntax
30+
=== Sintaxe
3131
`byte incoming = shiftIn(dataPin, clockPin, bitOrder)`
3232

3333

3434
[float]
35-
=== Parameters
36-
`dataPin`: the pin on which to input each bit (int)
35+
=== Parâmetros
36+
`dataPin`: o pino no qual receber cada bit (int)
3737

38-
`clockPin`: the pin to toggle to signal a read from *dataPin*
38+
`clockPin`: o pino alternado para sinalizar uma leitura de *dataPin*
3939

40-
`bitOrder`: which order to shift in the bits; either *MSBFIRST* or *LSBFIRST*.
41-
(Most Significant Bit First, or, Least Significant Bit First)
40+
`bitOrder`: em que ordem receber os bits; pode ser *MSBFIRST* ou *LSBFIRST*.
41+
Respectivamente primeiro o bit mais significativo (Most Significant Bit First), ou o primeiro o bit menos significativo (Least Significant Bit First)
4242

4343
[float]
44-
=== Returns
45-
the value read (byte)
44+
=== Retorna
45+
O valor lido (byte)
4646

4747
--
48-
// OVERVIEW SECTION ENDS
48+
// OVERVIEW SECTION ENDS

0 commit comments

Comments
 (0)