From 23226e249b9e74ba9b0ba38899b7439d9f95ed8a Mon Sep 17 00:00:00 2001 From: jpzg Date: Sat, 27 Dec 2014 21:49:06 -0500 Subject: [PATCH] Added flamethrower servo support to linino butane_on() rotates both servos 60 deg one way, butane_off() rotates them back. Currently functional and has been tested. --- python/linino.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/linino.py b/python/linino.py index fc4bc3e..37802b6 100644 --- a/python/linino.py +++ b/python/linino.py @@ -22,14 +22,17 @@ m2 = s.get_motor(2) m1.dir, m2.dir = FORWARD, FORWARD m1.spd, m2.spd = 0,0 +yun.servo_config(9); +yun.servo_config(10); +yun.digital[10].write(60); # Start it at a different angle, so it can move opposite the other servo def butane_on(): - yun.digital[9].analogWrite(100); - yun.digital[10].analogWrite(100); + yun.digital[9].write(60); + yun.digital[10].write(0); def butane_off(): - yun.digital[9].analogWrite(255); - yun.digital[10].analogWrite(255); + yun.digital[9].write(0); + yun.digital[10].write(60); def retrieve(client,value): client.send(value)