Merge branch 'master' of http://git.wolfsberg.local/philipp.clima/heisser_draht
This commit is contained in:
commit
3fdfa3286b
@ -56,23 +56,23 @@ pin_blue, pin_green, pin_red
|
|||||||
|
|
||||||
pin_start
|
pin_start
|
||||||
|
|
||||||
Type: Input, Pull Up
|
Type: Input, Pull Down
|
||||||
Use: Start pin. If this is active, the game starts.
|
Use: Start pin. If this is active, the game starts.
|
||||||
|
|
||||||
pin_stop
|
pin_stop
|
||||||
|
|
||||||
Type: Input, Pull Up
|
Type: Input, Pull Down
|
||||||
Use: Stop pin. If this is active, the game ends
|
Use: Stop pin. If this is active, the game ends
|
||||||
|
|
||||||
pin_error
|
pin_error
|
||||||
|
|
||||||
Type: Input, Pull Up
|
Type: Input, Pull Down
|
||||||
Use: This is to be attached to the game wire. If the wire is touched,
|
Use: This is to be attached to the game wire. If the wire is touched,
|
||||||
the pin is pulled up and an error is registered.
|
the pin is pulled up and an error is registered.
|
||||||
|
|
||||||
pin_shutdown
|
pin_shutdown
|
||||||
|
|
||||||
Type: Input, Pull Up
|
Type: Input, Pull Down
|
||||||
Use: Triggering this input causes a system shutdown.
|
Use: Triggering this input causes a system shutdown.
|
||||||
|
|
||||||
GPIO Pinout for assembly:
|
GPIO Pinout for assembly:
|
||||||
@ -117,20 +117,18 @@ Circuit diagrams for the contact and button electronics:
|
|||||||
|
|
||||||
All buttons are close-contact.
|
All buttons are close-contact.
|
||||||
|
|
||||||
+3.3V DC ---+-----------+-----------+-----------+-------->
|
+3.3V DC ---+-----------+-------------------------------->
|
||||||
| | | |
|
| | | |
|
||||||
|
R2 R4 R4 R4
|
||||||
| | | |
|
| | | |
|
||||||
start \ stop \ shutdown \ error \
|
+----+ +----+ +----+ +----+
|
||||||
contact \ contact \ button \ contact \
|
| | | | | | | |
|
||||||
|
| P_32 | P_37 | P_32 | P_32
|
||||||
|
\ \ \ \
|
||||||
|
\ \ \ \
|
||||||
\ \ \ \
|
\ \ \ \
|
||||||
* * * *
|
* * * *
|
||||||
| | | |
|
| | | |
|
||||||
R1 R3 R5 R7
|
|
||||||
| | | |
|
|
||||||
+-----+ +-----+ +-----+ +-----+
|
|
||||||
| | | | | | | |
|
|
||||||
R2 P_32 R4 P_37 R6 P_36 R8 P_33
|
|
||||||
| | | |
|
|
||||||
GND --------+-----------+-----------+-----------+-------->
|
GND --------+-----------+-----------+-----------+-------->
|
||||||
|
|
||||||
LED Strip controller and driver:
|
LED Strip controller and driver:
|
||||||
@ -190,13 +188,9 @@ and the other 3 the ground connections for the corresponding LED colour.
|
|||||||
Part list:
|
Part list:
|
||||||
|
|
||||||
Resistors:
|
Resistors:
|
||||||
R1............1,800 Ohm
|
|
||||||
R2...........10,000 Ohm
|
R2...........10,000 Ohm
|
||||||
R3............1,800 Ohm
|
|
||||||
R4...........10,000 Ohm
|
R4...........10,000 Ohm
|
||||||
R5............1,800 Ohm
|
|
||||||
R6...........10,000 Ohm
|
R6...........10,000 Ohm
|
||||||
R7............1,800 Ohm
|
|
||||||
R8...........10,000 Ohm
|
R8...........10,000 Ohm
|
||||||
R9............1,000 Ohm
|
R9............1,000 Ohm
|
||||||
R10..........10,000 Ohm
|
R10..........10,000 Ohm
|
||||||
@ -533,8 +527,6 @@ def enter_name():
|
|||||||
# Caution: this includes all sorts of weird letters, control sequences, and other unprintable chars.
|
# Caution: this includes all sorts of weird letters, control sequences, and other unprintable chars.
|
||||||
else:
|
else:
|
||||||
name += event.unicode
|
name += event.unicode
|
||||||
# none of the following may be needed
|
|
||||||
# TODO: Testing
|
|
||||||
# if someone presses the erase key, erase 1 letter
|
# if someone presses the erase key, erase 1 letter
|
||||||
elif event.key == pygame.K_BACKSPACE:
|
elif event.key == pygame.K_BACKSPACE:
|
||||||
name = name[:-1]
|
name = name[:-1]
|
||||||
@ -588,14 +580,14 @@ def check_highscores(time):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def draw_border():
|
def draw_border():
|
||||||
"""draw logos"""
|
|
||||||
screen.blit(img_itlablogo_image, (screen_size_x-img_itlablogo_imagex-20, screen_size_y-img_itlablogo_imagey-20))
|
|
||||||
# TODO: Metallic Logo
|
|
||||||
|
|
||||||
def draw_logos():
|
|
||||||
"""draw rectangle border around everything"""
|
"""draw rectangle border around everything"""
|
||||||
pygame.draw.rect(screen, pygame_color_black, (500, 200, (screen_size_x-500*2), (screen_size_y-200*2)), 5)
|
pygame.draw.rect(screen, pygame_color_black, (500, 200, (screen_size_x-500*2), (screen_size_y-200*2)), 5)
|
||||||
|
|
||||||
|
def draw_logos():
|
||||||
|
"""draw logos"""
|
||||||
|
screen.blit(img_itlablogo_image, (screen_size_x-img_itlablogo_imagex-20, screen_size_y-img_itlablogo_imagey-20))
|
||||||
|
screen.blit(img_metalliclogo_image, (20, screen_size_y-img_metalliclogo_imagey-20))
|
||||||
|
|
||||||
def show_debug():
|
def show_debug():
|
||||||
"""show debug information"""
|
"""show debug information"""
|
||||||
print('#############')
|
print('#############')
|
||||||
@ -638,11 +630,10 @@ img_itlablogo_image = pygame.image.load(img_itlablogo)
|
|||||||
img_itlablogo_imagex = get_image_width(img_itlablogo)
|
img_itlablogo_imagex = get_image_width(img_itlablogo)
|
||||||
img_itlablogo_imagey = get_image_height(img_itlablogo)
|
img_itlablogo_imagey = get_image_height(img_itlablogo)
|
||||||
|
|
||||||
# TODO: Metallic Logo einfügen
|
img_metalliclogo = 'img/metalliclogo.png'
|
||||||
#img_metalliclogo = 'img/metalliclogo.png'
|
img_metalliclogo_image = pygame.image.load(img_metalliclogo)
|
||||||
#img_metalliclogo_image = pygame.image.load(img_metalliclogo)
|
img_metalliclogo_imagex = get_image_width(img_metalliclogo)
|
||||||
#img_metalliclogo_imagex = get_image_width(img_metalliclogo)
|
img_metalliclogo_imagey = get_image_height(img_metalliclogo)
|
||||||
#img_metalliclogo_imagey = get_image_height(img_metalliclogo)
|
|
||||||
|
|
||||||
# initialise led strip
|
# initialise led strip
|
||||||
led_init()
|
led_init()
|
||||||
|
BIN
img/metalliclogo.png
Normal file
BIN
img/metalliclogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in New Issue
Block a user