Herunterladen Inhalt Inhalt Diese Seite drucken

SunFounder Da Vinci Kit Bedienungsanleitung Seite 178

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
data.append(current)
if
last
!=
unchanged_count
last
=
else:
unchanged_count
unchanged_count
if
break
state
=
STATE_INIT_PULL_DOWN
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
174
current:
=
0
current
+=
1
>
MAX_UNCHANGE_COUNT:
=
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)
(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