Herunterladen Inhalt Inhalt Diese Seite drucken

SunFounder Da Vinci Kit Bedienungsanleitung Seite 240

Für den raspberry pi 4 modell b, 3 modell a +, 3 modell b +, 3 modell b, 2 modell b, 1 modell b +, 1 modell a +, zero w and zero
Inhaltsverzeichnis

Werbung

SunFounder Da Vinci Kit
lengths
=
[]
current_length
for
current
in
current_length
if
state
==
if
current
state
else:
continue
if
state
==
if
current
state
else:
continue
if
state
==
if
current
state
else:
continue
if
state
==
if
current
current_length
state
else:
continue
if
state
==
if
current
lengths.append(current_length)
state
else:
continue
if
len(lengths)
#print ("Data not good, skip")
return False
shortest_pull_up
longest_pull_up
halfway
=
(longest_pull_up
bits
=
[]
the_bytes
=
[]
byte
=
0
for
length
in
lengths:
bit
=
0
if
length
>
bit
=
1
bits.append(bit)
#print ("bits: %s, length: %d" % (bits, len(bits)))
for
i
in
range(0, len(bits)):
byte
=
byte
if
(bits[i]):
byte
=
else:
byte
=
236
=
0
data:
+=
1
STATE_INIT_PULL_DOWN:
==
GPIO.LOW:
=
STATE_INIT_PULL_UP
STATE_INIT_PULL_UP:
==
GPIO.HIGH:
=
STATE_DATA_FIRST_PULL_DOWN
STATE_DATA_FIRST_PULL_DOWN:
==
GPIO.LOW:
=
STATE_DATA_PULL_UP
STATE_DATA_PULL_UP:
==
GPIO.HIGH:
=
0
=
STATE_DATA_PULL_DOWN
STATE_DATA_PULL_DOWN:
==
GPIO.LOW:
=
STATE_DATA_PULL_UP
!=
40:
=
min(lengths)
=
max(lengths)
+
shortest_pull_up)
halfway:
<<
1
byte
|
1
byte
|
0
(Fortsetzung der vorherigen Seite)
/
2
(Fortsetzung auf der nächsten Seite)
Kapitel 1. Über das Da Vinci Kit

Werbung

Inhaltsverzeichnis
loading

Verwandte Produkte für SunFounder Da Vinci Kit

Diese Anleitung auch für:

Davinci-kit-for-raspberry-pi

Inhaltsverzeichnis