{"id":21363576,"url":"https://github.com/acvigue/tranquilfirmware","last_synced_at":"2025-07-13T03:31:48.066Z","repository":{"id":168438685,"uuid":"642975992","full_name":"acvigue/TranquilFirmware","owner":"acvigue","description":"ESP32 firmware for custom kinetic drawing robots","archived":false,"fork":false,"pushed_at":"2023-12-06T20:42:19.000Z","size":99625,"stargazers_count":18,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T18:41:58.350Z","etag":null,"topics":["drawing","esp32","steppers"],"latest_commit_sha":null,"homepage":"https://vigue.me","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acvigue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"acvigue"}},"created_at":"2023-05-19T19:32:00.000Z","updated_at":"2024-04-29T23:14:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"59ecf317-36cf-497e-a00a-c5929f38ba26","html_url":"https://github.com/acvigue/TranquilFirmware","commit_stats":null,"previous_names":["acvigue/tranquilfirmware"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acvigue%2FTranquilFirmware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acvigue%2FTranquilFirmware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acvigue%2FTranquilFirmware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acvigue%2FTranquilFirmware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acvigue","download_url":"https://codeload.github.com/acvigue/TranquilFirmware/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225851247,"owners_count":17534271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drawing","esp32","steppers"],"created_at":"2024-11-22T06:19:59.030Z","updated_at":"2024-11-22T06:20:00.215Z","avatar_url":"https://github.com/acvigue.png","language":"C++","funding_links":["https://github.com/sponsors/acvigue"],"categories":[],"sub_categories":[],"readme":"# TranquilFirmware\n\n[![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/)\n[![CodeFactor](https://www.codefactor.io/repository/github/acvigue/tranquilfirmware/badge)](https://www.codefactor.io/repository/github/acvigue/tranquilfirmware)\n\nFirmware for the ESP32-based Tranquil kinetic sand drawing robots.\n\n## Requirements\n\nThis is *not* a drop-in replacement for Rob Dobson's original RBotFirmware! Many things have been changed/moved around.\n\nHardware:\n- Stepper drivers (preferably TMC2208/2209, generics can be used)\n- Endstops\n- ESP32, must have at least 4MB flash for proper OTA operation\n- SD Card - can either use MMC mode or SPI mode, SPI mode can use any pins, albeit is much slower.\n\n\u003e This project requires an operational [TranquilAPI](https://github.com/acvigue/TranquilAPI) server! Run your own on CloudFlare Workers!\n\n## Notes\n\nThe firmware is setup to automatically check for updates from a central server. The firmware binaries are built upon commit to this repository and are automatically uploaded to the OTA server.\n\nSee [cloudflare-ota-server](https://github.com/acvigue/cloudflare-ota-server) for more information. \n\n## Robot Configuration Reference\n\nRobot configuration is stored in NVRAM and can be viewed by sending GET request to `/settings/robot` and can be changed by POSTing JSON to `/settings/robot`\n\nSimilarly, wifi/ntp/scheduler/light settings can be changed at\n\n- /settings/wifi \u003c Network settings (supports WPA2-Enterprise)\n- /settings/ntp \u003c time zone and ntp server\n- /settings/scheduler \u003c stores scheduled commands\n- /settings/lights \u003c LED lights\n- /settings/security \u003c used to store PIN code\n- /settings/tranquil \u003c only used for storing TranquilAPI encrypted JWT\n\n\u003e LED strip _must_ be attached to GPIO5\n\n```js\n//See RobotConfig.example.json for an uncommented version.\n{\n  \"robotConfig\": {\n    \"robotType\": \"TranquilSmall\", //custom robot config name, please change if building your own and submitting PR.\n    \"cmdsAtStart\": \"\", //commands to run on startup, seperated by ';' ex. \"G28\" to home.\n    \"evaluators\": {\n      \"thrContinue\": 0, //must be 0\n      \"thrThetaMirrored\": 1, //to mirror theta axis or not (flip drawings)\n      \"thrThetaOffsetAngle\": 0.5 //rotate drawings around the bed (DEGREES)\n    },\n    \"robotGeom\": {\n      \"model\": \"SandBotRotary\", //keep SandBotRotary\n      \"motionController\": {\n        \"chip\": \"TMC2209\", //tmc2208 or tmc2209, omit whole object if not using Trinamics, if you are, rest of params are required.\n        \"TX1\": 32, //UART for drv1\n        \"TX2\": 33, //UART for drv2, rest of params are self explanatory.\n        \"driver_TOFF\": 4, //hysterisis TOFF time\n        \"run_current\": 600, //motor run current (mA)\n        \"microsteps\": 16, //motor microsteps\n        \"stealthChop\": 1 //stealthchop, sets stealthchop2 for 2209, stealthchop1 for 2208,2130\n      },\n      \"homing\": {\n        //homing string, axis A is rotary, B linear.\n        \"homingSeq\": \"FR3;A+38400n;B+3200;#;A+38400N;B+3200;#;A+200;#B+400;#;B+30000n;#;B-30000N;#;B-340;#;A=h;B=h;$\",\n        \"maxHomingSecs\": 120\n      },\n      \"blockDistanceMM\": 1, //movement resolution in mm (keep at 1, lower stalls bot)\n      \"allowOutOfBounds\": 0, //keep 0\n      \"stepEnablePin\": \"25\", //motor enable GPIO pin\n      \"stepEnLev\": 0, //motor active logic level\n      \"stepDisableSecs\": 30, //seconds after last move to turn motors off\n      \"axis0\": {\n        \"maxSpeed\": 15, //no idea\n        \"maxAcc\": 25, //no idea\n        \"maxRPM\": 4, //max RPM for rotary axis\n        \"stepsPerRot\": 38400, //steps (including microsteps) for one full rotation of the primary rotary axis\n        \"stepPin\": \"19\", //step pin for this axis\n        \"dirnPin\": \"21\", //dir pin for this axis\n        \"dirnRev\": \"1\", //is direction reversed?\n        \"endStop0\": {\n            \"sensePin\": \"22\", //endstop GPIO pin\n            \"actLvl\": 0, //triggered at what level?\n            \"inputType\": \"INPUT\"\n        }\n      },\n      \"axis1\": { //same as above, changes highlighted\n        \"maxSpeed\": 15,\n        \"maxAcc\": 25,\n        \"maxRPM\": 30,\n        \"stepsPerRot\": 3200,\n        \"unitsPerRot\": 40.5, //for each rotation of the upper central gear, how much does the linear arm move in MM\n        \"maxVal\": 145, //maximum MM the linear arm can go out from center\n        \"stepPin\": \"27\",\n        \"dirnRev\": \"1\",\n        \"dirnPin\": \"3\",\n        \"endStop0\": { \"sensePin\": \"23\", \"actLvl\": 0, \"inputType\": \"INPUT\" }\n      }\n    },\n    \"fileManager\": {\n      \"spiffsEnabled\": 1, //must be 1\n      \"spiffsFormatIfCorrupt\": 1, //self explanatory, i advise against it.\n      \"sdEnabled\": 1, //must be 1\n      \"sdSPI\": 0, //OPTIONAL, set to 1 for sdspi, if omitted, SDMMC is used.\n      \"sdMISO\": 0, //REQUIRED FOR SDSPI, omit for SDMMC, miso pin\n      \"sdMOSI\": 0, //REQUIRED FOR SDSPI, omit for SDMMC, mosi pin\n      \"sdCLK\": 0, //REQUIRED FOR SDSPI, omit for SDMMC, clock pin\n      \"sdCS\": 0, //REQUIRED FOR SDSPI, omit for SDMMC, CS pin\n      \"sdLanes\": 1 //1 or 4, sets bus width for SDMMC, not used for SDSPI\n    },\n    \"ledStrip\": {\n      \"ledRGBW\": 1, //1 for SK6812, 0 for ws2812\n      \"ledCount\": \"143\", //led count\n      \"tslEnabled\": \"1\", //does robot have TSL2561\n      \"tslSDA\": \"16\", //if so, i2c pins.\n      \"tslSCL\": \"17\" // ^^^\n    }\n  },\n  \"cmdSched\": { \"jobs\": [] }, //don't edit, doesn't do anything but fw still relies on it being here\n  \"name\": \"Tranquil\" //robot name, not hostname, that is set in wifi settings.\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facvigue%2Ftranquilfirmware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facvigue%2Ftranquilfirmware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facvigue%2Ftranquilfirmware/lists"}