summaryrefslogtreecommitdiff
path: root/julia-arduino-master/examples/Servomotor/servo-loop.jl
blob: afba259756b38b0d037ad455496afbbd5104b36d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
using SerialPorts
using ArduinoTools

ser = connectBoard(115200)
ServoAttach(ser,1)
sleep(1)
angle = 20
for i = 1:9
  ServoMove(ser,1,angle*i)
  sleep(1)
end
ServoDetach(ser,1)
close(ser)