Homebrew RELEASE CommunityController | Pro controller Python Bot

  • Thread starter Deleted User
  • Start date
  • Views 18,054
  • Replies 15
  • Likes 6
D

Deleted User

Guest
OP
As most of you may already know, I ran the prominent Twitch Plays Nintendo Switch channel, or as more of you may know it as Twitch Plays Super Mario Odyssey that received quite a bit of traffic thanks to both this community and places like Kotaku.

To thank everyone for a time I will never forget, I've decided to go ahead and share all of the files that I used to make this happen so that you guys can create some awesome bots/tools of your own!

Now with that sappy boring introduction out of the way, lets get too what you all really want to hear.

This is of course based off of the RE'd Pokken controller done by @shinyquagsire23 which can be found here. Unfortunately however I lost the modified C code due to me having a hard head and not having backups, however the modified HEX code can be found in my Github either here

To use this you will need the following
Simply flash the hex file to your arduino using FLIP, connect your serial Adapter to the Arduino and than plug the arduino into your Switch using the Micro B cable, and the serial adapter into the Pi! EZPZ right?

Once this is running you can make a plethora of things, as this emulates the Pokken controller. Meaning you can do something complicated like making a rudimentary TAS bot for your favorite game, or even creating a bot to duplicate & sell items so that you can have virtually an infiite amount of gold!


Of course, if there are any questions or concerns please do not hesitate to ask! If something is not clear in this thread, or you would like me to elaborate upon please also let me know and I will be sure to update this.

We also have a Discord server for this bot if you would like to share what you're working on, or even ask for help in regards to making a script of your own! If you would like to join the server you may do so here: https://discord.gg/euEpTxB
 
Last edited by ,

FiveZeroes

Member
Newcomer
Joined
Nov 21, 2018
Messages
10
Trophies
0
Age
28
XP
134
Country
United States
So first off, hi, same person that requested this back in August, and thank you so much for posting this. Secondly, I was curious about your design and possible improvements, as I was under the impression that you could send serial directly from the Pi. Obviously now that the source code is lost this would be harder to do, but I was wondering if using the Arduino was a design decision or if it was actually necessary for some reason.
 
  • Like
Reactions: Tinnetju
D

Deleted User

Guest
OP
So first off, hi, same person that requested this back in August, and thank you so much for posting this. Secondly, I was curious about your design and possible improvements, as I was under the impression that you could send serial directly from the Pi. Obviously now that the source code is lost this would be harder to do, but I was wondering if using the Arduino was a design decision or if it was actually necessary for some reason.
The arduino is being used, because I used the RE'd Pokken controller from Shiny Quagsire as a base.

Surely if you soldered directly to the pads of either the joycons or a pro controller and wired them to the GPIO of the pi you could do it that way as well. But I saw no point in doing that if there was already an "easy" way of controlling the buttons. Plus this is less messy.

The only improvements that really need to be made IMO are bug fixes. This program has two major bugs that I can't seem to track down.

The left thumbstick isn't completely centered(its in the upper left quadrant ever so slightly) which causes some wonkyness in games) and the serial connection gets closed our randomly(hence by shell script workarounds)

This of course can be replicated directly with just a Pi if someone took the time to do so, however it would be easier to innovate upon this code IMO as its already in a working state
 

FiveZeroes

Member
Newcomer
Joined
Nov 21, 2018
Messages
10
Trophies
0
Age
28
XP
134
Country
United States
The arduino is being used, because I used the RE'd Pokken controller from Shiny Quagsire as a base.

Surely if you soldered directly to the pads of either the joycons or a pro controller and wired them to the GPIO of the pi you could do it that way as well. But I saw no point in doing that if there was already an "easy" way of controlling the buttons. Plus this is less messy.

I might be misunderstanding the process in the op, but what about using the same form of serial to usb used by the Arduino, just straight from serial on the pi?
 
D

Deleted User

Guest
OP
I might be misunderstanding the process in the op, but what about using the same form of serial to usb used by the Arduino, just straight from serial on the pi?
It might be because it's late but I'm not quite following your Question. It's currently hooked up like so

Switch < Arduino < Serial Adapter < Pi

So the pi is sending the commands(inputs) to the serial adapter, which the arduino is than processing and sending back to the switch
 

FiveZeroes

Member
Newcomer
Joined
Nov 21, 2018
Messages
10
Trophies
0
Age
28
XP
134
Country
United States
Ok, sorry that was my misunderstanding then. How is the Arduino wired to the Switch? Or rather, what is the communication standard between them (I realize its a USB cable, just not understanding if its serial data or what)?

Ignore me, running on far too much server maintenance work and far too little sleep, just realized your code is modified from the Pokken controller repo and I read that months ago...
 
Last edited by FiveZeroes,
D

Deleted User

Guest
OP
Ok, sorry that was my misunderstanding then. How is the Arduino wired to the Switch? Or rather, what is the communication standard between them (I realize its a USB cable, just not understanding if its serial data or what)?

Ignore me, running on far too much server maintenance work and far too little sleep, just realized your code is modified from the Pokken controller repo and I read that months ago...
Plug the micro B cable into the Arduino and than the USB A end of that Micro B cable into the switch
 

FiveZeroes

Member
Newcomer
Joined
Nov 21, 2018
Messages
10
Trophies
0
Age
28
XP
134
Country
United States
I think I'm going to go to bed before I confuse you or myself anymore. Thank you for the code, I plan on making a few changes when I have a free weekend (namely replacing Twitch with a standalone program so that I can tie this in with a low latency stream for remote couch coop). In the meantime I did notice that the v3 files don't work with your current file structure without adding the python init file. I submitted a pull request with the file added.
 
D

Deleted User

Guest
OP
Code for serial-controlled controller: https://blog.feelmy.net/control-nintendo-switch-from-computer/
I used it to automate some actions in games.
That's completely different code. While yes it is similar if you checked my Github you would see that mine functions differently.

His code only allows you to do one button input at once, not multiple. For example you can only press a or b, not both A and B at the same time.

Want to want to draw your bow, aim it, and shoot it in BOTW? Thats not possible with his code. Want to simply walk forward and jump over a ledge? Not possible with his.
 
Last edited by ,
D

Deleted User

Guest
OP
I think I'm going to go to bed before I confuse you or myself anymore. Thank you for the code, I plan on making a few changes when I have a free weekend (namely replacing Twitch with a standalone program so that I can tie this in with a low latency stream for remote couch coop). In the meantime I did notice that the v3 files don't work with your current file structure without adding the python init file. I submitted a pull request with the file added.
I merged your pull request thank you.

Tonight I’ll probably work on some example files since it seems like some people are confused as to both what you can do with this and what it does still. Which I can only assume is because my only examples are a twitch bot
 
D

Deleted User

Guest
OP
I'm going to look into making a few example scripts/bots for this. What would you guys like to see?
 

FiveZeroes

Member
Newcomer
Joined
Nov 21, 2018
Messages
10
Trophies
0
Age
28
XP
134
Country
United States
Well a good simple one would be just a terminal-like setup for typing commands as you would in Twitch chat. Xinput or similar would be another nice one, though a little more to implement and a bit more tangential to your project.
 

raspirate

New Member
Newbie
Joined
Feb 14, 2019
Messages
1
Trophies
0
Age
39
XP
54
Country
United States
I'm going to look into making a few example scripts/bots for this. What would you guys like to see?

I just came across this post, and I wouldn't mind seeing a simple example script. Something like pressing a button every x seconds would be enough to get me along my way. I plan to use it to power-level magic skills in skyrim. Also, this part may be a dumb question, but how do I go about connecting the serial adapter to the uno? As in, which pins connect where? Thanks in advance!
 
D

Deleted User

Guest
OP
I just came across this post, and I wouldn't mind seeing a simple example script. Something like pressing a button every x seconds would be enough to get me along my way. I plan to use it to power-level magic skills in skyrim. Also, this part may be a dumb question, but how do I go about connecting the serial adapter to the uno? As in, which pins connect where? Thanks in advance!
Tx and rx connect to the tx and rx pins same with 5v and GND

As for pressing a batting ever 5 seconds call the button, sleep for 5 seconds release the button and repeat
 
  • Like
Reactions: raspirate

MrFizzyBubbs

New Member
Newbie
Joined
Dec 31, 2019
Messages
1
Trophies
0
Age
28
XP
38
Country
United States
Thank you for sharing this. Since your original post, have there been any updates or advancements? I want to make sure I've done my research before purchasing any hardware as this is all very new to me.
 
Last edited by MrFizzyBubbs,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • AncientBoi
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    AncientBoi @ AncientBoi: k