Skip to content

Instantly share code, notes, and snippets.

@costyn
Last active December 26, 2020 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save costyn/73d5e8a91ca4e6fb269a9d71da10ca3d to your computer and use it in GitHub Desktop.
Save costyn/73d5e8a91ca4e6fb269a9d71da10ca3d to your computer and use it in GitHub Desktop.
; https://docs.platformio.org/en/latest/projectconf/section_env_upload.html#upload-command
; https://stackoverflow.com/questions/9134003/binary-data-posting-with-curl
[env:uno]
platform = atmelavr
framework = arduino
board = uno
upload_protocol = custom
upload_flags =
--header "Content-Type: application/json"
--data "@diagram.json"
upload_command = curl $UPLOAD_FLAGS https://wokwi.com/api/projects/save
extra_scripts =
post:curl --request POST --data-binary "@$SOURCE" https://wokwi.com/api/projects/save/hex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment