Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright (c) 2014-2016 NicoHood
- See the readme for credit to other people.
- GamecubeConsole example
- Read controller and mirror data to the gamecube
- */
- #include "Nintendo.h"
- // Define a Gamecube Controller and a Console
- CGamecubeController GamecubeController1(7);
- CGamecubeConsole GamecubeConsole1(8);
- void setup()
- {
- }
- void loop()
- {
- // Try to read the controller data
- if (GamecubeController1.read())
- {
- // Mirror the controller data to the console
- if (!GamecubeConsole1.write(GamecubeController1))
- {
- delay(2000);
- }
- }
- else
- {
- delay(1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement