-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial unicorn banshee implementation.
- Loading branch information
1 parent
d4f0d59
commit 9b972b4
Showing
2 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"name": "RX-0 Unicorn Banshee", | ||
"leds": [ | ||
{ | ||
"name": "r_leg", | ||
"pin": 0, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_leg", | ||
"pin": 16, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "r_thigh", | ||
"pin": 1, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_thigh", | ||
"pin": 17, | ||
"color": "orange" | ||
} | ||
, | ||
{ | ||
"name": "r_waist", | ||
"pin": 2, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_waist", | ||
"pin": 18, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "r_chest", | ||
"pin": 3, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_chest", | ||
"pin": 19, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "r_pauldron", | ||
"pin": 4, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_pauldron", | ||
"pin": 20, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "r_arm", | ||
"pin": 5, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_arm", | ||
"pin": 21, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "r_weapon", | ||
"pin": 6, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "l_weapon", | ||
"pin": 22, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "head", | ||
"pin": 7, | ||
"color": "orange" | ||
}, | ||
{ | ||
"name": "head_camera", | ||
"pin": 23, | ||
"color": "green" | ||
} | ||
], | ||
"lightshow": [ | ||
{ | ||
"name": "Glow Gundam", | ||
"path": "glow", | ||
"method": "glow" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import time | ||
|
||
from src.gunpla.BaseGundam import BaseGundam | ||
from src.phew.server import Request, Response | ||
from src.pi.led_effect import LEDEffects | ||
|
||
|
||
class UnicornBansheeGundam(BaseGundam): | ||
""" | ||
RX-0 Unicorn Gundam 02 Banshee(https://gundam.fandom.com/wiki/RX-0_Unicorn_Gundam_02_Banshee) | ||
""" | ||
|
||
def get_config_file(self) -> str: | ||
""" | ||
:return: The Unicorn Banshee Gundam config file | ||
""" | ||
return "src/config/unicorn_banshee.json" | ||
|
||
def glow(self, request: Request) -> Response: | ||
""" | ||
Runs the glow lightshow | ||
""" | ||
LEDEffects.brighten_all(self.get_all_leds()) | ||
time.sleep(3) | ||
self._all_leds_off() | ||
return Response("finished", 200) |