This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Flojoy snake demo #149
Open
izi-on
wants to merge
31
commits into
main
Choose a base branch
from
flojoy_snake_demo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Flojoy snake demo #149
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
GAMEPAD node:
The gamepad node uses the hidapi package to read input devices. It scans for a device that has the name "gamepad" in it,
and then it listens to inputs from it. The inputs are described by a list of booleans that is set on the "y" field of the DataContainer of type ordered_pair.
Suggestions: add new type "gamepad input"?
SNAKE_GAME node:
The snake game node takes as an input an ordered_pair DataContainer and reads the "y" field for the list of booleans.
It grabs its previous game state from Small Memory, then with the new inputs calculates its new state and writes it again to Small Memory. The node returns a DataContainer of type 'image' that corresponds to snake game matrix.
LED_MATRIX node:
The LED matrix node takes as an input a DataContainer of type image. Using the following Arduino script:
It communicates via serial to the Arduino that has a WS2812B LED Matrix connected to the 6th digital pin.
Styleguide
Docs
Testing