wokwi / wokwi-boards

Custom board definitions for wokwi.com
23 stars 21 forks source link

Not an issue / feature request - I would update the guidelines for PR to add custom boards #29

Open geekgarage opened 9 months ago

geekgarage commented 9 months ago

I would love to see a specific guideline with these fields that must be added when doing a custom board PR.

Requirements for PR:

  1. Title Name, could be saved as a simple txt file named "title.txt" so it can be read easily by other systems, like auto generated page Example: AITEWIN ROBOT ESP32-C3 SuperMini
  2. Unique name, is the folder name, could be constructed like this: manufacturer_name-board_name-revision_or_model_name Would be: aitewin_robot-esp32_c3-supermini
  3. board.svg
  4. board.json
  5. diagram.png / jpeg / gif / webp (Pinout Overview Image)
  6. purchase.csv (List with "Site Name" and "Link to buy") Example: Aliexpress,https://www.aliexpress.com/item/1005005757810089.html Ebay,https://www.ebay.com/itm/276300462231 Temu,https://www.temu.com/dk/esp32-c3-development-board-esp32-supermini-wifi-wireless-g-601099534456789.html

Feature request: Add the option to add a "diagram.png / jpeg / gif / webp", then add the "?" above the board like some other components have in Wokwi interface and when clicking it, it will show a new page auto generated from the content of the custom board folder so it will show the Title Name as the page title, below that the board.svg, then the diagram.png (or one of the other file types) and then the board.json, and finally a list where to buy, read from the CSV.

This way if a board gets updated on GitHub, the website is automatically updated with the latest info as the PR gets approved. This way you can have more people helping maintaining information without actually doing any work except making sure no sneaky website have been added by a nefarious player before approving PR.

urish commented 9 months ago

Thanks for sharing your suggestions, this is really useful.

I've started to work on a document with guidelines:

https://docs.google.com/document/d/1K59xkKL70uN_c_GNCs_Xk09F3tK12B-ygmFbw6i14t4/edit

Would appreciate any feedback - especially if there's anything crucial missing.

As for "title.txt" and "purchase.csv" - I believe it's better to keep a single format (JSON, in this case), rather than introduce multiple format. The "board.json" file already includes a "name" property, so I'm not sure what's the use case for having a title in addition to the name. As for the purchase link, we can add a new field in "board.json" with a list of relevant links.

geekgarage commented 8 months ago

Thanks for sharing your suggestions, this is really useful.

I've started to work on a document with guidelines:

https://docs.google.com/document/d/1K59xkKL70uN_c_GNCs_Xk09F3tK12B-ygmFbw6i14t4/edit

Would appreciate any feedback - especially if there's anything crucial missing.

As for "title.txt" and "purchase.csv" - I believe it's better to keep a single format (JSON, in this case), rather than introduce multiple format. The "board.json" file already includes a "name" property, so I'm not sure what's the use case for having a title in addition to the name. As for the purchase link, we can add a new field in "board.json" with a list of relevant links.

Great idead, consolidate it all in JSON file. Don't know why I didn't think of that xD and yes, just reuse the Name field!

urish commented 8 months ago

Thanks! Also added new guidelines for Pin naming (following my recent feedback on your PR)

geekgarage commented 8 months ago

Thanks! Also added new guidelines for Pin naming (following my recent feedback on your PR)

Adding my response here as well as it is regarding guidelines and feedback on it :)

While I see your point in relation to other boards, and I've changed it, I don't agree at all with simplifying the names. My reasoning being when you run wires between devices, it can be hard to remember what pin is what and have what functionality, and then you would constantly have to refer back to the diagram. So while i see the aesthetically pleasing look by simplifying pin names, you also make it a much worse user experience, by prioritizing form over function.

As a tablet and PC user, I can say that prioritizing the form over function, is just compounded when working on a tablet with a single screen and you have to flip flop between tabs to see the functions of the pins. The user experience just gets even worse, then on top of that, add in if you are a new user to all of this, both arduino and Wokwi, you have enough information to keep track on and start learning, the simplifying name will not help with that :)

urish commented 8 months ago

Thanks for the feedback! There are two ways we could potentially resolve this:

  1. When you pause the simulation, Wokwi already shows you the actual pin functions as they are set by the code. This is especially useful for chips like the ESP32, where the pin functions can be assigned to pins different than the board designer labeling:

image

  1. We could potentially add a "label" or "description" field to the pins.

The reason I'd like to keep the pin names as consistent as possible across different boards (and especially the RX / TX pins), is to make it simpler to switch between different boards, and to reduce the chance of typos when people manually edit diagram.json.

geekgarage commented 8 months ago

regarding point 1. I actually didn't know :) But then again simulation is after you already run wires, so that is where your point number 2 comes in handy and that would be nice. Then you could make them be optional show by a toggle?