Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-based controller converter? #12

Open
TheChatty opened this issue Jan 12, 2023 · 13 comments
Open

ESP32-based controller converter? #12

TheChatty opened this issue Jan 12, 2023 · 13 comments

Comments

@TheChatty
Copy link

This project is already able to emulate a Switch Pro Controller. Is it possible to have different brand controllers paired, convert their protocol and feed it to the emulator like the 8BitDo USB dongle does? The emulator would then be paired to a real Switch console.

@mitchellcairns
Copy link
Collaborator

It's certainly possible but it's out of the scope and unplanned for this project. Let me know if you have any other questions on this!

@TheChatty
Copy link
Author

Since documentation is lacking at the moment: how do you use your current piece of code?

@mitchellcairns
Copy link
Collaborator

Since documentation is lacking at the moment: how do you use your current piece of code?

Documentation is being worked on, nothing public yet please stay tuned should be something in the next two weeks.

@mitchellcairns
Copy link
Collaborator

Since documentation is lacking at the moment: how do you use your current piece of code?

I have created one example project with some detailed commentary for learning purposes. Let me know if this helps
https://github.com/HandHeldLegend/HOJA-LIB-ESP32/tree/main/examples/basic-wired-gamepad

@TheChatty
Copy link
Author

I'm missing an end-to-end example.

  • Does this project enable oneself to push push a button (shorten the defined GPIOs) and one can see the result on one's Switch console?
  • If yes, what steps a necessary to accomplish this (mainly how does the pairing work)?
  • Are there any nightlies I can flash my ESP32 to avoid the hassle of setting up a working IDE?
  • Please add gitpod.io compatibilty for easy compilation

@mitchellcairns
Copy link
Collaborator

I'm missing an end-to-end example.

  • Does this project enable oneself to push push a button (shorten the defined GPIOs) and one can see the result on one's Switch console?
  • If yes, what steps a necessary to accomplish this (mainly how does the pairing work)?
  • Are there any nightlies I can flash my ESP32 to avoid the hassle of setting up a working IDE?
  • Please add gitpod.io compatibilty for easy compilation

Until I have the time to get all of the full documentation together, I recommend looking through the code using intellisense in VS Code IDE. I can certainly look into gitpod.io

No nightlies at the moment. Please take a close look at the example code, read all of the notes and let me know if you have any questions.

@TheChatty
Copy link
Author

I've compiled a few ESP8266/ESP32 projects already (Tasmota, OpenMQTTGateway, ...) mostly using gitpod.io but I'm unable to get this compiled. And I'm still wondering how a useful end-to-end scenario would look like. Maybe @JPZV could shed a little light on how he's using it?

@mitchellcairns
Copy link
Collaborator

I've compiled a few ESP8266/ESP32 projects already (Tasmota, OpenMQTTGateway, ...) mostly using gitpod.io but I'm unable to get this compiled. And I'm still wondering how a useful end-to-end scenario would look like. Maybe @JPZV could shed a little light on how he's using it?

What build errors are you getting?

Thanks

@TheChatty
Copy link
Author

TheChatty commented Jan 25, 2023

Well... I using my above link to gitpod which creates a remote IDE and this source code. I then tried to manually install all required dependencies in the remote shell but eventually failed to setup ESP-IDF correctly:

gitpod /workspace/HOJA-LIB-ESP32 (main) $ idf.py build
Executing action: all (aliases: build)
Running cmake in directory /workspace/HOJA-LIB-ESP32/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/gitpod/.espressif/python_env/idf5.1_py3.8_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /workspace/HOJA-LIB-ESP32"...
CMake Error: Error: generator : Ninja
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
cmake failed with exit code 1, output of the command is in the /workspace/HOJA-LIB-ESP32/build/log/idf_py_stderr_output_5377 and /workspace/HOJA-LIB-ESP32/build/log/idf_py_stdout_output_5377

Hmm, after remove CMakeCache.txt and retrying I now get:

CMake Error at CMakeLists.txt:2 (idf_component_register):
  Unknown CMake command "idf_component_register".

@mitchellcairns
Copy link
Collaborator

It looks like you're trying to build the component-- try running the build command from the example directory and let me know if that works

@TheChatty
Copy link
Author

TheChatty commented Jan 25, 2023

That was it and now it worked and I got the basic-wired-gamepad.bin.
This proves compilation with gitpod is easily possible (requires IDF5 and libusb installation). Now if this project would be set up correctly then all that would be required is to follow my above link, wait for automatic setup to finish and download and flash the compiled bin.

Still needed:

@mitchellcairns
Copy link
Collaborator

mitchellcairns commented Jan 25, 2023

That was it and now it worked and I got the basic-wired-gamepad.bin. This proves compilation with gitpod is easily possible (requires IDF5 and libusb installation). Now if this project would be set up correctly then all that would be required is to follow my above link, wait for automatic setup to finish and download and flash the compiled bin.

Still needed:

It's something I will look into when I have more time available, I appreciate the effort and the recommendation!

Does that build environment also take care of building the bootloader?

@TheChatty
Copy link
Author

Isn't the bootloader part of the IDF? In any case it's also present in the build directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants