Tappy is a Tapster based sofware adapted for TestDevLab needs. Includes improved calibration method using web browser, web based control panel and record and play tool for automating tests.
This is a fork of the original guntiss' tappy project. We opted to use tappy rather than the original tapsterbot code since it has a better server and calibration interface than original's. In our robotic projects, we use tappy as a server bridging to robot's Arduino's serial port; we expect Firmata runs as the Arduino's firmware; clients are not provided: we use the original tapsterbot clients available in the tapsterbot clients folder.
-Multiple points calibration -Reworked callback nightmare with async/await calls
Tested with Node.js v16.13.2 (lts/gallium as of March 2023). You might want to use nvm to sync with correct node version. If using sudo for running the server, recall to have the correct nodejs version also when impersonating root.
It might be comfortable to enable serial port access to your user. In Ubuntu >11.10:
sudo adduser <yourusername> dialout
$ git clone https://github.com/guntiss/tappy.git
$ cd tappy
ensure you node version is correct with nvm:
nvm use 16.13.2
Newer versions of node might be working but are untested.
$ npm install
$ (sudo) node server.js (if serial not accessible by your user)
Edit config.js according to your setup (config.pins, defaultPosition height, ..)
To access control panel, navigate to http://server_ip:server_port/control
Features available:
- Servo motor position adjustment
- Linear movements
Calibration consists of two parts:
-
Manual servo arm calibration must be done only once after assembling the robot. While rods are detached you can use "Control panel" to adjust all servos for horizontal and vertical arm state, and put those values in config.js accordingly: config.sX = { pin: X, min: 19, max: 101 }; After this calibration, linear movement should work correctly, if not, something is wrong.
-
Device calibration is done by opening http://server_ip/cal on mobile device web browser. This is needed to be able to work with phone screen coordinates. Make sure that phone recognises stylus touches (it must be grounded to arduino GND) and that screen coordinates are being displayed at server console when touching screen. Then you just press "calibrate" and automatic calibration happens, that writes correct values inside calibration.json. You should NOT edit this file manually. If during calibration stylus moves outside phone dimensions, decrease config.calWidth value.
Navigate to http://server_ip/record_and_play You Should see this screen: To use just click on screen and coordinates will be added to textarea. Note: realtime screen update is not yet integrated. There is known bug if you stop and restart script.