Controlling a Nintendo 3DS from a IRC stream using Arduino
Python Other
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 21 commits ahead, 1 commit behind sunshinekitty:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Twitch Plays Hardware

v0.0 Built at Hack Into The BemyApp Factory
Won best use of Arduino platform :)

For the hackathon we created a method to control a Nintendo3Ds via Internet Relay Chat. The code was written Hackathon Style and was a fork of clone of the program Twitch channel "Twitch Plays Pokemon" uses and abstracts it in such a way we can control hardware.

This is both an opensourced hardware and software hackathon and we are providing everything you need to get started. A big part of learning is trying to figure things out and understand how they work. If you are having trouble, try the twitch plays pokemon project using an emulator. Once you can play Pokemon through the emulator, then you can move on to using a DS.

Please see the project page for full documentation including how to hack that 3DS and set up hardware!

Software Documentation

The software implementation is a fork of TwitchPlaysPokemon clone and provides implementation for both use for windows applications like an emulator, as well as to write to arduino via serial. The current implementation uses arduino, but similar methods can be used for other hardware devices.

The currently hardware and network stack is the following:

Nintendo 3DS <--Digital Write-- Arduino <--SerialWrite-- Python on PC <--IRC-- viewers

The Nintendo 3DS is streamed via webcam to the computer running Python.

Key notes, please read:

  • The python code is NOT written by me. I only added the serial code implementation.
  • The python script and the Arduino can not connect to the arduino at the same time. Please ensure you close the python script before trying to use the ide.
  • COM port must be manually configured in the python code. You can use the arduino IDE to find the correct COM port, and modify the python script to connect to the correct port.

Built for Windows, written in Python 3 32 BITv##


Please note, this uses the PyWin32 and PySerial which requires the 32 bit version of Python 3. This will not work on any operating system other than windows.

How to use

  • Install all the required prerequisites
  • Follow the instruction and set up using Emulator here
  • Check out this video if you are having issues. The twitch chat authentication can be found here
  • Configure the hardware as outlined in the page
  • Download the arduino located in /ArduinoCode/ and load onto arduino using IDE. Please ensure you set the correct board, serial port and that the pins are the correct number
  • Confirm that you are write to the Arduino via the serial terminal on the Arduino IDE. Arduino should return the command you send.
  • Ensure you close the arduino IDE once you upload the code. Python can not talk to the arduino if the port is busy (being used by the arduino IDE)
  • Inside /TwitchPythonBot/ run using your favourite python interpreter. Follow the same steps you followed when using the Emulator here except set Notepad as the program instead of VisualGameBoyAdvance
  • For the sake of flexibility, the file in /game/ will open and is set at notepad as default.
  • If you set things up right, the Python script should sniff the steam and send the commands to Arduino

To get people to play via stream just type the commands in the chat:

A:    		a
B:			b
X:			x
Y:			y
Up:         up
Right: 		right
Down: 		down
Left: 		left

My Channel

  • My channel will be available here
  • At the hackathon there was about a 30 second lag at the hackathon.
  • Derek, my partner at the hackathon owns the DS and possibly will post in the future, stay tuned.