Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Added flamethrower servo support to linino
Browse files Browse the repository at this point in the history
butane_on() rotates both servos 60 deg one way, butane_off() rotates
them back. Currently functional and has been tested.
  • Loading branch information
jpzg committed Dec 28, 2014
1 parent 9b64c94 commit 23226e2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions python/linino.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 23226e2

Please sign in to comment.