<commit_before>adaFruitRight = Runtime.createAndStart("adaFruitRight","Adafruit16CServoDriver")
sleep(1)
adaFruitRight.connect("COM4")
# Set I2C address ( x40 = 4*16 + 0 = 64 )
#adaFruitRight.setI2CAddress(64)
sleep(1)
# create a new servo
thumb = Runtime.createAndStart("Thumb", "Servo")
sleep(1)
elbow = Runtime.createAndStart("Elbow", "Servo")
sleep(1)
# attach it to the pwm board - pin 3 & 8
sleep(1)
thumb.attach(adaFruitRight,3)
elbow.attach(adaFruitRight,8)
#adaFruitRight.attach(thumb,3)
thumb.setMinMax(8,142)
elbow.setMinMax(0,180)<commit_msg>Changed to use latest methods to connect<commit_after>webgui = Runtime.createAndStart("WebGui","WebGui")
# Create and start the Arduino servicen and connect it to the serial port
arduino = Runtime.createAndStart("Arduino","Arduino")
arduino.connect("COM4")
# Start the Adafruit16CServodriver that can be used for all PCA9685 devices
# and connect it to the Arduino i2c interface using the default bus and
# address
adaFruit16c = Runtime.createAndStart("AdaFruit16C","Adafruit16CServoDriver")
adaFruit16c.setController("Arduino")
# create a new servo
thumb = Runtime.createAndStart("Thumb", "Servo")
elbow = Runtime.createAndStart("Elbow", "Servo")
# attach it to the pwm board - pin 3 & 8
thumb.attach(adaFruit16c,3)
elbow.attach(adaFruit16c,8)
# When this script has been executed you should be able to 
# move the servos using the GUI or using python
{'fraction_non_alphanumeric': 0.1116642958748222, 'fraction_numerical': 0.04054054054054054, 'mean_word_length': 6.730769230769231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2341271', 'n_tokens_mistral': 520, 'n_tokens_neox': 477, 'n_words': 132}