{"id":16753086,"url":"https://github.com/bsutton/arduino-robot-arm-controller","last_synced_at":"2025-07-18T10:33:09.451Z","repository":{"id":8095468,"uuid":"38907060","full_name":"bsutton/Arduino-Robot-Arm-Controller","owner":"bsutton","description":"A simple UI to control a Arduino based Robotic Arm using the Adfruit PWM contoller.","archived":false,"fork":false,"pushed_at":"2021-12-14T21:13:14.000Z","size":46,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-14T09:06:32.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsutton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-10T23:56:29.000Z","updated_at":"2022-11-08T17:43:59.000Z","dependencies_parsed_at":"2022-07-16T07:03:36.964Z","dependency_job_id":null,"html_url":"https://github.com/bsutton/Arduino-Robot-Arm-Controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bsutton/Arduino-Robot-Arm-Controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsutton%2FArduino-Robot-Arm-Controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsutton%2FArduino-Robot-Arm-Controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsutton%2FArduino-Robot-Arm-Controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsutton%2FArduino-Robot-Arm-Controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsutton","download_url":"https://codeload.github.com/bsutton/Arduino-Robot-Arm-Controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsutton%2FArduino-Robot-Arm-Controller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265742625,"owners_count":23820872,"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":[],"created_at":"2024-10-13T02:49:08.762Z","updated_at":"2025-07-18T10:33:09.424Z","avatar_url":"https://github.com/bsutton.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino-Robot-Arm-Controller\nA simple UI to control a Arduino based Robotic Arm using the Adfruit PWM contoller.\n\nThis is a very simple project which provides a Java based (swing) application which allows direct control over motors attached to Adafruit PWM Servo Driver.\n\nThe application lets you send structured commands to the Arduino to move the motors.\n\nYou can also save a set of commands to a file, reload the file and play them as a 'pre-programmed' sequence.\n\nThe application is designed to allows you to do simple testing of your hardware.\n\nExample command sequence:\n\n\n\thi\n\tset,base,1 \n\ton,1\n\tmov,1,200\n\tmov,base,200\n\tmov,2,340\n\tmov,3,150\n\twait,3000\n\tstop,1\n\tstop,2\n\tstop,3\n\n\nThe command structure is:\n\n\t\u003ccmd\u003e,\u003carg, arg, ...\u003e\u003cnewline\u003e\n\nThe following commands are supported:\n\n* hi\n* mov\n* on\n* set\n* stop\n* status\n* wait\n\n\n##Comments\nWhen running a sequence file you can comment out a line by prefixing it with:\n\n// \n\ne.g.\n\n\t// mov,1,200\n\nThe above line will be ignored.\n\n\n##Command: Hi\n\n###Overview\n\nUsed to ensure the Arduino controller is responding and to retrieve the version number of the on board control software.\n\nArgs: none\n\nAction: none\n\nReturns:\n\n\tversion: 1.0\n\t\n###Example\nhi\nversion 1.0\t\n\n##Command: mov\n\n###Overview\n\nMoves a motor to a given position.\n\nArgs: \n\n\t\u003cmotor\u003e,\u003cfrequency\u003e\n\n\t\u003cmotor\u003e - integer from 0-15 which maps to the adafruit PWM pin outs for each server.\n\n\t\u003cfrequency\u003e - integer from 0 - 4000 (?) which sets the PWM frequency on the adafruit PWM for the selected motor.\n\t\n\tNot: on my test kit the range is generally 100-600\n\n\u003cb\u003eAction:\u003c/b\u003e \n\nSets the given motor to the given frequency\n\nReturns:\n\n\tMov: motor \u003cmotor\u003e, frequency \u003cfrequency\u003e\n\t\n###Example\nmov,1,200\nMov: motor 1, frequency 200\n\n\n\n\n##Command: on\n\n##Overview\n\nTurns the power on the motor by using the last know frequency. Use this to power up motors so that don't sag when you start moving other motors.\n\nThe 'on' command is translated to a 'mov' command before it is sent to the Arduino. The java application caches the last know position to facilitate this.\n\nArgs: \n\n\t\u003cmotor\u003e\n\n\t\u003cmotor\u003e - integer from 0-15 which maps to the adafruit PWM pin outs for each server.\n\n\u003cb\u003eActions:\u003c/b\u003e\n\nTurns the selected motor on\n\nReturns: \n\n\tMov: motor \u003cmotor\u003e, frequence \u003cfrequency\u003e\n\t\n\n###Example\non,1\nMov: motor 1, frequency 200\n\n\n##Command: set\n\n##Overview\n\nThe set command is more of a meta command as it lets you define variables that can be used in the rest of the script.\n\nOnce a variable is set the system does a simple find and replace on each command argument.\n\nFor example you can use set to map each motor no. to a easy to remember name:\n\ne.g.\nIf you have three motors referenced by 1,2,3 then normally to move them you would use:\nmov,1,200\nmov,2,200\nmov,3,200\n\nWith the set command you can:\n\nset,base,1\nset,shoulder,2\nset,elbow,3\n\n// the mov command no become\nmov,base,200\nmov,shoulder,200\nmov,elbow,200\n\nYou can also replace the frequencies using the set command:\n\ne.g.\n// var for the elbow at 90 degrees\nset,elbow-90,200\n// move the elbow motor to its 90 degree position\nmov,elbow,elbow-90\n\nArgs: \n\n\t\u003cvariable name\u003e - name for the variable\n\n\t\u003cvariable value\u003e - variable value\n\n\u003cb\u003eActions:\u003c/b\u003e\n\nCreates a variable which can be used later in the script.\n\nReturns: \n\n\tno return as not sent to the controller.\n\n###Example\nstop,1\nStop: motor 1\n\n## Command: status\n###Overview\nReturns the controllers current status.\n\nArgs: none\n\n\u003cb\u003eActions:\u003c/b\u003e\n\nReturns the controller's current status.\n\nReturns:\nFeeling groovy.\n\n##Command: stop\n\n##Overview\n\nStops the selected motor by setting the frequency to zero. Motor will be un powered and will rotate freely under load.\n\nArgs: \n\n\t\u003cmotor\u003e\n\n\t\u003cmotor\u003e - integer from 0-15 which maps to the adafruit PWM pin outs for each server.\n\n\u003cb\u003eActions:\u003c/b\u003e\n\nStops the selected motor\n\nReturns: \n\n\tStop: motor \u003cmotor\u003e\n\n###Example\nstop,1\nStop: motor 1\n\n##Command: wait\n\n###Overview\n\nPuts the controller to sleep for a given number of milliseconds. Use this command to allow motors the time required to complete their movement.\nCurrently the controller will respond to no other commands until the wait period has elapsed.\n\nArgs:\n \n\t\u003cdelay\u003e\n\n\t\u003cdelay\u003e - time in milliseconds to wait\n\n\u003cb\u003eActions:\u003c/b\u003e\n\nMakes the controller sleep for the given number of milliseconds.\n\nReturns:\n\n\tWait: \u003cwait\u003e\n\t\n###Example\nwait,2000\nWait: 2000\t\n\n\n#Install Arduino control software\n\nThe Arduino controller is located in:\nsrc/main/arduino/Controller/Controller.ino\n\nThe controller requires the Adafruit PWM Servo Library to be installed.\n\n[Servo Library](https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library)\n\nOnce the adafruit library is installed then compile and upload the Controller.ino to your Arduino and its ready to go.\n\nIf you open the Arduino IDE serial monitor (Tools | Serial Monitor) you can now directly interact with the controller.\n\nType a command at the terminal and press enter to run it.\n\n\tHi\n\tversion: 1.0\n\t\nIf the 'Hi' command works then the controller is up and running.\n\n#Install java swing UI\n\nThe UI is written in java and has been complied with Java 8.\n\nDevelopment is done using Eclipse Luna and Maven 3\n\nYou can build the application from the command line (once maven is installed) by running:\n\n\tcd \u003croot directory where you saved the java source\u003e\n\tmvn install\n\t\n#Run java swing UI\n\n\nTo run the UI\n\n\tcd target\n\tjava -jar robotarm-1.0-jar-with-dependencies.jar\n\n\n##Using earlier versions of java\nYou can probably run it with a earlier version of java by changing the 'source' and 'target' properties in the pom.xml file:\n\nFor java 7\n\nChange\n\n\t\u003csource\u003e1.8\u003c/source\u003e\n\t\u003ctarget\u003e1.8\u003c/target\u003e\nTo\n\n\t\u003csource\u003e1.7\u003c/source\u003e\n    \u003ctarget\u003e1.7\u003c/target\u003e\n          \nthen run:\n\t\n\tmvn install\n\t\n\n\n# Using the UI to control your robot\n\nAfter starting the UI you first need to select a port from the drop list.\n\nIf your port is missing click the 'Refresh Ports' button to refresh the list of ports. You will often need to do this if you have unplugged and then plugged the USB connector in as the port name will often change.\n\nWith you Arduino up and running and the USB connected click the 'Connect' button to connect to the Arduino.\n\nThe Arduino should respond with the Controller's version no.\n\nYou can now type commands into the command bar to the left of the 'Send Action' button.\n\nResponses from the Controller are displayed in the log area below the Command Bar.\n\nUse the 'Stop All' button to power down all of the motors.\n\nThe 'Sequences' button opens a UI that allows you to enter/save and reload a sequence of commands which you can then Run on the Arduino.\n\nJust make certain you only enter one command per line.\n\nyou can comment out a line by inserting leading // characters (standard java/C/C++ single line comment)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsutton%2Farduino-robot-arm-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsutton%2Farduino-robot-arm-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsutton%2Farduino-robot-arm-controller/lists"}