{"id":16993253,"url":"https://github.com/rogerhardiman/node-pan-tilt-driver","last_synced_at":"2026-04-16T19:10:15.288Z","repository":{"id":143807197,"uuid":"301146031","full_name":"RogerHardiman/node-pan-tilt-driver","owner":"RogerHardiman","description":"NodeJS driver for Pan-Tilt HAT from Pimoroni and from Waveshare and Pan Tilt Platform from Arducam","archived":false,"fork":false,"pushed_at":"2022-01-03T20:36:42.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-27T05:51:17.070Z","etag":null,"topics":["javscript","nodejs","pan-tilt","pan-tilt-zoom","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/RogerHardiman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-04T14:14:20.000Z","updated_at":"2022-09-12T18:39:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"12cd990a-d5dc-4cb6-b368-01cdfd5d4393","html_url":"https://github.com/RogerHardiman/node-pan-tilt-driver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RogerHardiman%2Fnode-pan-tilt-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RogerHardiman%2Fnode-pan-tilt-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RogerHardiman%2Fnode-pan-tilt-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RogerHardiman%2Fnode-pan-tilt-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RogerHardiman","download_url":"https://codeload.github.com/RogerHardiman/node-pan-tilt-driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244907456,"owners_count":20529867,"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":["javscript","nodejs","pan-tilt","pan-tilt-zoom","raspberrypi"],"created_at":"2024-10-14T03:32:44.950Z","updated_at":"2026-04-16T19:10:10.232Z","avatar_url":"https://github.com/RogerHardiman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-pan-tilt-driver\nNodeJS driver for the Pan-Tilt HAT from _Pimoroni_ and the Pan-Tilt HAT from _Waveshare_.\nCOMING SOON - support for the Pan-Tilt Platform B0283 from _Arducam_\n100% Javascript. No need for any external Python libraries.\n\nThere are two makes of Pan-Tilt HAT board for the Raspberry Pi that sit on top of the Pi, one made by _Pimoroni_ in the UK and one made by _Waveshare_ in China.\nThere is also a Pan-Tilt platform designed for the Pi and the Jetson Nano made by Arducam that can sit alongside the Pi with 4 jumper wires back to the Pi. (DRIVER SUPPORT COMING SOON)\nAll boards have some similarities and some differences\n\n|Feature|Pimoroni|Waveshare|Arducam (Under Development)|\n|-------|--------|---------|---------|\n|Designed for the Raspberry Pi|Yes|Yes|Yes|\n|Servo Type|Tower Pro SG90|Waveshare WS-SG90|PES GH-S37D digital servo|\n|Control Chip|PIC16F1503 with custom firmware on the i2c bus. PIC generates the PWM signals|Standard PCA9685 PWM/LED controller on the i2c bus|Standard PCA9685 PWM/LED controller on the i2c bus|\n|I2C address|0x15|0x40 (with ability to be changed)|TBC|\n|Extra feature|Has a 3rd output for PWM controlled LEDs and Lights and NeoPixels (this driver does not control the LED/Lights)|Has a Light Sensor on the i2c bus (this driver does not read the light level sensor)|None|\n|Extra features|Brings the I2C, UART, Broadcom PWM and SPI signals to the edge of the board|Has tall header pins to allow access to all 40 Pi pins. Has solder pads to allow the i2c address to be changed|Can sit to the side of the Pi (does not need to go on top) Uses jumper wires to connect to a Pi's i2c bus|\n|Pi HAT Standard Compliance|Yes, has the HAT EEPROM. The Pi device tree will show the Pimoroni Pan-Tilt HAT is connected|No. Does not implement the HAT identification EEPROM|N/A. Not a HAT|\n|Country of origin|UK|China||\n|URLs|http://shop.pimoroni.com/products/pan-tilt-hat|http://www.waveshare.com/pan-tilt-hat.htm|https://www.arducam.com/product/arducam-pan-tilt-platform-for-raspberry-pi-camera-2-dof-bracket-kit-with-digital-servos-and-ptz-control-broad-b0283/|\n\n# USAGE\n```\nvar PanTiltHAT = require('pan-tilt-hat');\nvar pan_tilt = new PanTiltHAT();\nconsole.log('Goto position Pan 0, Tilt 0');\npan_tilt.pan(0);\npan_tilt.tilt(0);\n```\n\n\n# INITIALISAION\n  The library autodetects the Pan/Tilt boards by checking the I2C addresses (0x15 and 0x40)\n\n# ABSOLUTE POSITIONING\n* Pan=0, Tilt=0 has the camera looking forword.\n* Pan of +90 makes the Pi Camera look to the left\n* Pan of -90 makes the Pi Camera look to the right\n* Tilt of -80 makes the Pi Cammera look up\n* Tilt of +80 makes the Pi Cammera look down\n* (The positive and negative directions are the same as the Pimoroni Python driver)\n\n```\n  pan(angle)                      // angle between -90 and 90\n  servo_one(angle)                // angle between -90 and 90\n  tilt(angle)                     // angle between -80 and 80\n  servo_two(angle)                // angle between -80 and 80\n  ```\n\n\n# CONTINUOUS MOVE API (START AND STOP COMMANDS)\n   The camera will start to turn at the specificated speed and continue to turn until told to stop\n   ```\n   pan_left(speed)                 // start moving with a speed from 0 to 15. 0 means stop\n   pan_right(speed)                // start moving with a speed from 0 to 15. 0 means stop\n   tilt_up(speed)                  // start moving with a speed from 0 to 15. 0 means stop\n   tilt_down(speed)                // start moving with a speed from 0 to 15. 0 means stop\n   stop()                          // stop the pan and the tilt\n   ```\n\n # SHUTDOWN\n ```\n   close()                         // closes the class and frees resources\n```\n\n# SERVO SIGNAL\n  After 2 seconds the servo PWM drive signal on the Pimoroni board is turned off to save power.\n  This has not been implemented on the Waveshare or Arducam board yet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogerhardiman%2Fnode-pan-tilt-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogerhardiman%2Fnode-pan-tilt-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogerhardiman%2Fnode-pan-tilt-driver/lists"}