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

Patch supermini #205

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

dtashmore547
Copy link

Update to platformio.ini to allow the ESP32C3 SuperMini board to work along with the onboard blue LED.

The following Files were added to the .platformio folder:-

  1. in folder ~/.platformio/packages/framework-arduinoespressif32/variants/super_mini_esp32c3

pins.arduino_super_mni_esp32c3.zip

  1. in folder ~/.platformio/platforms/espressif32/boards

super_mini_esp32c3.json

On the original Ispindel board the super mini board is small enough to be stuck onto the board by double sided 3M Pads and fly wired to the correct connections.
I have a PCB available on PCBWay.com mainly intended for the Rapt Pill housing but should also fit the ISpindel tube.

@mp-se mp-se changed the base branch from master to dev January 9, 2025 17:21
@mp-se
Copy link
Owner

mp-se commented Jan 10, 2025

Hi, thanks for the contribution but in order to merge this to the codebase please correct the following:

  • I'm using automated builds via github actions and there is no way to manually add the defintions to make a build. Please create the needed scripts that add the board definitions to arduino before the build so the automated build process will work.
  • Since this is a modified version i want to have some updates to the documentation that describe this target as well as links to where detailed documentation and the pcb can be found so that those who wants to use this can make the build. I dont need to include the full details in gravitymon just a placeholder to where details can be found.
  • I'm fine with supporting multiple hardware versions (ispindel and floaty) and this could be seen as a separate hardware setup if you have your own pcb and build instructions. There is a return value in the /api/status that can be used to indicate what hardware gravitymon is running on. Whats your view on this ? is this a standard ispindle hardware or another variant?

Update your own branch and any changes there should automatically be reflected in this PR.

@dtashmore547
Copy link
Author

dtashmore547 commented Jan 15, 2025 via email

@mp-se
Copy link
Owner

mp-se commented Jan 15, 2025

No worries, its just a few more things that needs to be added for it to work properly. Let me know if you need any help with the tasks. You have some example in the thread for how to add the arduino board. Let me know if you need more info

@dtashmore547
Copy link
Author

dtashmore547 commented Jan 15, 2025 via email

@mp-se
Copy link
Owner

mp-se commented Jan 17, 2025

Hi! Since i'm getting more requests for custom boards I have done some refactor to better support this aspect.

  • The board ID will now be used for the PIN configuration in the main.hpp file. A script will inject a define with the board ID so that can be used to map the pins correctly. See: scripts/board.py
  • Firmware script will now also copy the file and name it custom-board.bin unless its one of the targets that I can test. This way its visible which ones are custom. So adding a custom board should not require any changes to that script.
    *One thing remains to be adressed and that is the OTA support since that is in the espframework, I need to change that so the filename can be set from gravitymon. I will also look into how to add this to the documentation.

In you case we also need to patch the arduino framework with your new board and you can use the patch_arduino.py script as a base for that. You can put the board files in a directory called patch/

Please have a look at the changes and give me some feedback.

@mp-se
Copy link
Owner

mp-se commented Jan 17, 2025

I've added a script to patch platformio with new board defintions to the dev branch. Just copy the files to the correct location in the patch directory, script is run before a build

@dtashmore547
Copy link
Author

dtashmore547 commented Jan 18, 2025 via email

@mp-se
Copy link
Owner

mp-se commented Jan 18, 2025

hi Magnus Great sounds like you have been very busy, i am a one arm bandit at present, had a shoulder op but will check out the new build as soon as i can best regards Dave
On 17 January 2025 19:02:27 GMT+02:00, Magnus @.> wrote: I've added a script to patch platformio with new board defintions to the dev branch. Just copy the files to the correct location in the patch directory, script is run before a build -- Reply to this email directly or view it on GitHub: #205 (comment) You are receiving this because you authored the thread. Message ID: @.>
-- Sent from my Android phone with K-9 Mail. Please excuse my brevity.

It was not that much work, since i already had some code lying around it would be a quick task to add that possibility. I tested with your files so if you put them in the right folder and adjust the main.hpp file to match the new structure it should be a quick update for you. You need to do a new pull from my dev branch to integrate my changes before, when you do a new push the PR should be updated automatically with your changes.

I also added a file src_docs/custom.rst where you can add the documentation and links to where more information can be found.

I've also added some instructions in the CONTRIBUTE.md file on what steps are needed to add a new custom board...

Its not a rush, make sure your shoulder is healed and take care of yourself.

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

Successfully merging this pull request may close these issues.

2 participants