Overview
| module url | https://pypi.org/project/pycro-hal.html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git repository | https://bitbucket.org/arrizza-public/pycro-hal | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git command | git clone git@bitbucket.org:arrizza-public/pycro-hal.git | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verification report | https://arrizza.com/web-ver/pycro-hal-report.html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version info |
|
- copyright: Copyright and License
- repo status: Repo Information
- installation: Common Setup
Summary
A python interface to a microcontroller with a Hardware Abstraction Layer (HAL).
This module allows a python script to control an Arduino. It reads or writes to any of the Digital or Analog pins.
Currently only works with Arduino Nano.
See pycro page
for the full communications protocol or the doc/comm_protocol.md file.
Current commands
The current app has the following CLI:
zpm doit ping # ping-pong - check communication to the Arduino
zpm doit version # get microcontroller version
zpm doit gpio_read # read a digital pin; currently set to D10
zpm doit digport # read all digital pins in a port
zpm doit gpio_write # write to a digital pin; currently set to D12
zpm doit fast_gpio # write a high/low sequence to a pin as quickly as possible; currently set to D13 = internal LED
zpm doit adc # read the voltage an analog pin; currently A7
zpm doit graphic # show a dynamically updated plot of voltages from adc; turn the pot in the schematic to make it change
zpm doit logger_off # test turning off the logger and turning it back on again; checks the impact that relatively slow action
zpm doit pwm # set PWM on digital pin; currently D5
zpm doit servo # test servo control; currently on D6
zpm doit adhoc # do an adhoc test as implemented on the microcontroller; currently just an echo
zpm doit dev # used for dev purposes only
zpm doit all # run all of these (except dev); takes a few minutes
Future enhancements
- Expand the functionality, e.g. allow ISP communications between two Arduinos to be controlled by the python script.
- Add additional support for Arduino shields. There probably is a need to have an "easy to add" interface to multiple shields.
- Abstract out specific and common functions so that the same script (with minor changes) can be used on multiple or any Arduino. If this goes well, it may be possible to abstract ot other microcontroller chips.
Initial setup
- see
doc/test_process.mdfor set of instructions to correctly setup the python venv, and to make sure all other tools are installed. You can check by usingzpm check - The Arduino you use must be flashed with pycro-arduino page
Nano breadboard
Schematic:

- setup Nano on breadboard
- attach USB-C to Nano
- Nano GND pin to breadboard -ve
- Nano +5V pin to breadboard +ve
- setup a 10K potentiometer
- middle pin attached to Nano A7
- one other pin attached to breadboard -ve (Gnd)
- one other pin attached to breadboard +ve (5V)
- check with
doit adcordoit graph(turning the pot, should change the voltage read)
- oScope for fastest GPIO cycling:
- gnd lead to breadboard -ve (Gnd)
- +ve lead to Nano D13
- check with
doit gpio_fast(should see a square wave)
- oScope for PWM duty cycle:
- gnd lead to breadboard -ve (Gnd)
- +ve lead to Nano D5
- check with
doit pwm(should see a square wave with a 50/50 duty cycle with a 1.024mS period)
- external LED:
- Nano D12 to 2k resistor
- other end of 2k resistor to LED long leg (+ve)
- LED short leg (-ve) to breadboard -ve (GND)
- check with
doit gpio_write(LED should blink)
- Nano digital pins
- Nano D2 to breadboard +ve (5V)
- Nano D11 to breadboard +ve (5V)
- check with
doit digport(D2 and D11 should be 1, others should be 0)
Wiring the breadboard
As an aside I found a very nice way to clean up the breadboard wiring.
I used the 3d-models to mount the breadboard and the motor together (note these use OpenScad but have the STLs in the repos)
- see Mounting Brackets to hold the holder and servo holder together
- see Breadboard Legs to hold the breadboard holder up, nice and stable
- see Half Breadboard Holder to hold the half-length breadboard
- see Servo Holder to hold the server
Then to wire this nice and clean I used this tool:
Originally the breadboard looked pretty bad:

but the new layout is nice and clean:

Sample App
See sample/app.py for an example of how to use PycroHalInterface.
In short, there are 4 steps:
Step 1 set up serial port
Communication with the Arduino is UART/Serial. Specify that by setting the configuration:
self._pycro.cfg.protocol = 'uart'
self._pycro.cfg.uart_port = '/dev/ttyUSB0'
- currently only the 'uart' protocol is recognized
- the uart_port must match the serial/uart port the Arduino is connected to.
Step 2 start the communications
self._pycro.start()
Note: the Arduino sends 2 or 3 empty responses to ensure the communication channel is running correctly. If these stop or fail or hang, then there is a communication issue that needs to be resolved.
Step 3 send a command and receive of a response
As an example, send a ping and receive the pong response.
self._pycro.ping()
self._pycro.recv() # note: not all commands have a response.
See doc/comm_protocol.md for specific behaviors for all the possible commands.
You can do as many commands as you need in this step.
Stop communications
It is very good practice to cleanly terminate communications. Most OSs are pretty good at automatically cleaning up, but it is worth the effort to close, shut down, and clean up any communications, threads etc. when the app closes.
self._pycro.stop()
Run it
- Power on the Arduino
- Check the comm port is connected
- run
zpm doitto run the app
ls /dev/ttyUSB* # on Ubuntu; other OSs are different
zpm doit # defaults to ping-pong
Typical output:
00:00.001 App.run tests:ping
00:00.203 checking communications...
00:01.462 rx: 0000: 00 # two empty rsp automatically sent by Arduino
00:01.462 rx: 0000: 00
00:01.462 comm_ok: 1
00:01.462 comm_ok: 2
00:01.462 OK connection: 2 comm_ok rsp received; 14 loops
00:01.462 tx: 0000: 03 00 00 # tx a ping
00:01.465 rx: 0000: 03 01 01 # rx a pong
00:01.465 tx: 0000: 03 00 00 # ping again
00:01.468 rx: 0000: 03 01 01 # pong again
ADC notes
Note: to get accurate values in zpm doit adc you must set the supply voltage correctly
# in app.py run()
# my USB port supplies 4.69 volts; measure yours from the GND pin to the +5V pin using a multimeter
self._pycro.supply_voltage = 4.69
PWM notes
- When the serial port is disconnected, the pin reverts back to 0 (non-pulsing).
- enter an integer to bump the duty cycle up / down from the default of 127
zpm doit pwm
<skip>
00:01.463 pwm: setting to: 127
00:01.463 tx: 0000: 05 00 07 05 7F
pwm: press +, - or q to quit: -120 <=== subtract 120 from 127
00:03.337 pwm: setting to: 7
00:03.337 tx: 0000: 05 00 07 05 07
pwm: press +, - or q to quit: -10
00:06.338 WARN pwm: new val is too low: 7 + -10 => -3 <=== went too far
00:06.338 tx: 0000: 05 00 07 05 07
pwm: press +, - or q to quit: +250 <=== the "+" is optional
00:36.457 WARN pwm: new val is too high: 7 + 250 => 257
Servo notes
I used an HS-311 servo, see HS-311 specs for specs. Your servo may require different settings.
- Voltage Range: 4.8V - 6.0V
- Max PWM Signal Range: 575-2460 uSec
- Max Rotation: 202 degrees
- I used a separate power supply that can handle 5V up to 1A with a 100 uF capacitor, see servo motors
- It uses similar +/- commands as PWM but these are for degrees (0 - 202), not duty cycle
Sample App doit all
After the setup is done, the Arduino is programmed and all of it tested, you can run of the segments of the app in one go.
$ zpm doit all
==== doit: run doit python: sample/main.py
---> gen files...
rc=0 constants_version.py
rc=0 build_info.txt
---> doit python...
-- 00:00.000 ==== App.init
-- 00:00.000 version: 1.0.0 # <= the current expected version string
# check the USB serial port
-- 00:00.003 found port /dev/ttyUSB0: USB Serial [USB VID:PID=1A86:7523 LOCATION=3-1.1.4]
-- 00:00.003 App.run tests:all
# check communications
-- 00:00.205 checking communications...
-- 00:01.463 rx:
-- 00:01.463 0 0x00: 00
-- 00:01.464 rx:
-- 00:01.464 0 0x00: 00
-- 00:01.464 comm_ok: 1
-- 00:01.464 comm_ok: 2
-- 00:01.464 OK connection: 2 comm_ok rsp received; 14 loops
# do a ping/pong
-- 00:01.464 ---> test: ping
-- 00:01.464 tx:
-- 00:01.464 0 0x00: 03 00 00
-- 00:01.467 rx:
-- 00:01.467 0 0x00: 04 01 00 01
-- 00:01.467 tx:
-- 00:01.467 0 0x00: 03 00 00
-- 00:01.470 rx:
-- 00:01.470 0 0x00: 04 01 00 01
# get the actual version string
-- 00:01.470 ---> test: version
-- 00:01.470 tx:
-- 00:01.470 0 0x00: 03 00 05
-- 00:01.474 rx:
-- 00:01.474 0 0x00: 0D 01 05 00 00 31 2E 30 2E 30 20 20 20
-- 00:01.474 uctrl type: "Arduino Nano" version: "1.0.0"
# do GPIO pin reads
-- 00:01.474 ---> test: gpio_read
-- 00:01.474 tx:
-- 00:01.474 0 0x00: 05 00 01 0A 02
-- 00:01.474 tx:
-- 00:01.474 0 0x00: 04 00 03 0A
-- 00:01.478 rx:
-- 00:01.478 0 0x00: 04 01 03 01
-- 00:01.478 [ 0] pin:D10 state:3
-- 00:01.978 tx:
-- 00:01.978 0 0x00: 04 00 03 0A
-- 00:01.981 rx:
-- 00:01.981 0 0x00: 04 01 03 01
-- 00:01.981 [ 1] pin:D10 state:3
-- 00:02.481 tx:
-- 00:02.481 0 0x00: 04 00 03 0A
-- 00:02.485 rx:
-- 00:02.485 0 0x00: 04 01 03 01
-- 00:02.485 [ 2] pin:D10 state:3
-- 00:02.985 tx:
-- 00:02.985 0 0x00: 04 00 03 0A
-- 00:02.988 rx:
-- 00:02.988 0 0x00: 04 01 03 01
-- 00:02.988 [ 3] pin:D10 state:3
-- 00:03.488 tx:
-- 00:03.488 0 0x00: 04 00 03 0A
-- 00:03.491 rx:
-- 00:03.491 0 0x00: 04 01 03 01
-- 00:03.492 [ 4] pin:D10 state:3
-- 00:03.992 tx:
-- 00:03.992 0 0x00: 04 00 03 0A
-- 00:03.995 rx:
-- 00:03.995 0 0x00: 04 01 03 01
-- 00:03.995 [ 5] pin:D10 state:3
-- 00:04.496 tx:
-- 00:04.496 0 0x00: 04 00 03 0A
-- 00:04.499 rx:
-- 00:04.499 0 0x00: 04 01 03 01
-- 00:04.499 [ 6] pin:D10 state:3
-- 00:04.999 tx:
-- 00:04.999 0 0x00: 04 00 03 0A
-- 00:05.003 rx:
-- 00:05.003 0 0x00: 04 01 03 01
-- 00:05.003 [ 7] pin:D10 state:3
-- 00:05.503 tx:
-- 00:05.503 0 0x00: 04 00 03 0A
-- 00:05.506 rx:
-- 00:05.506 0 0x00: 04 01 03 01
-- 00:05.506 [ 8] pin:D10 state:3
-- 00:06.007 tx:
-- 00:06.007 0 0x00: 04 00 03 0A
-- 00:06.010 rx:
-- 00:06.010 0 0x00: 04 01 03 01
-- 00:06.010 [ 9] pin:D10 state:3
-- 00:06.510 tx:
-- 00:06.510 0 0x00: 04 00 03 0A
-- 00:06.513 rx:
-- 00:06.513 0 0x00: 04 01 03 01
-- 00:06.513 [ 10] pin:D10 state:3
-- 00:07.014 tx:
-- 00:07.014 0 0x00: 04 00 03 0A
-- 00:07.017 rx:
-- 00:07.017 0 0x00: 04 01 03 01
-- 00:07.017 [ 11] pin:D10 state:3
-- 00:07.517 tx:
-- 00:07.517 0 0x00: 04 00 03 0A
-- 00:07.520 rx:
-- 00:07.520 0 0x00: 04 01 03 01
-- 00:07.521 [ 12] pin:D10 state:3
-- 00:08.021 tx:
-- 00:08.021 0 0x00: 04 00 03 0A
-- 00:08.024 rx:
-- 00:08.024 0 0x00: 04 01 03 01
-- 00:08.024 [ 13] pin:D10 state:3
-- 00:08.524 tx:
-- 00:08.524 0 0x00: 04 00 03 0A
-- 00:08.527 rx:
-- 00:08.527 0 0x00: 04 01 03 01
-- 00:08.528 [ 14] pin:D10 state:3
-- 00:09.028 tx:
-- 00:09.028 0 0x00: 04 00 03 0A
-- 00:09.031 rx:
-- 00:09.031 0 0x00: 04 01 03 01
-- 00:09.031 [ 15] pin:D10 state:3
-- 00:09.531 tx:
-- 00:09.531 0 0x00: 04 00 03 0A
-- 00:09.535 rx:
-- 00:09.535 0 0x00: 04 01 03 01
-- 00:09.535 [ 16] pin:D10 state:3
-- 00:10.035 tx:
-- 00:10.035 0 0x00: 04 00 03 0A
-- 00:10.038 rx:
-- 00:10.038 0 0x00: 04 01 03 01
-- 00:10.039 [ 17] pin:D10 state:3
-- 00:10.539 tx:
-- 00:10.539 0 0x00: 04 00 03 0A
-- 00:10.542 rx:
-- 00:10.542 0 0x00: 04 01 03 01
-- 00:10.542 [ 18] pin:D10 state:3
-- 00:11.042 tx:
-- 00:11.042 0 0x00: 04 00 03 0A
-- 00:11.046 rx:
-- 00:11.046 0 0x00: 04 01 03 01
-- 00:11.046 [ 19] pin:D10 state:3
# read the entire GPIO port (much faster)
-- 00:11.546 ---> test: digport
-- 00:11.546 tx:
-- 00:11.546 0 0x00: 03 00 06
-- 00:11.549 rx:
-- 00:11.549 0 0x00: 05 01 06 0C 04
-- 00:11.550 raw :0x0C04
-- 00:11.550 D2 :1
-- 00:11.550 D3 :0
-- 00:11.550 D4 :0
-- 00:11.550 D5 :0
-- 00:11.550 D6 :0
-- 00:11.550 D7 :0
-- 00:11.550 D8 :0
-- 00:11.550 D9 :0
-- 00:11.550 D10 :1
-- 00:11.550 D11 :1
-- 00:11.550 D12 :0
-- 00:11.550 D13 :0
-- 00:11.550 tx:
-- 00:11.550 0 0x00: 03 00 06
-- 00:11.553 rx:
-- 00:11.553 0 0x00: 05 01 06 0C 04
-- 00:11.553 raw :0x0C04
-- 00:11.553 D2 :1
-- 00:11.553 D3 :0
-- 00:11.553 D4 :0
-- 00:11.553 D5 :0
-- 00:11.553 D6 :0
-- 00:11.553 D7 :0
-- 00:11.553 D8 :0
-- 00:11.553 D9 :0
-- 00:11.553 D10 :1
-- 00:11.553 D11 :1
-- 00:11.553 D12 :0
-- 00:11.553 D13 :0
# do GPIO pin writes (not reads done)
-- 00:11.553 ---> test: gpio_write
-- 00:11.553 tx:
-- 00:11.553 0 0x00: 05 00 01 0C 01
-- 00:11.553 tx:
-- 00:11.553 0 0x00: 05 00 02 0C 00
-- 00:12.054 tx:
-- 00:12.054 0 0x00: 05 00 02 0C 01
-- 00:12.054 [ 0] pin:D12 state:HIGH
-- 00:12.554 tx:
-- 00:12.554 0 0x00: 05 00 02 0C 00
-- 00:12.554 [ 0] pin:D12 state:LOW
-- 00:13.054 tx:
-- 00:13.054 0 0x00: 05 00 02 0C 01
-- 00:13.555 tx:
-- 00:13.555 0 0x00: 05 00 02 0C 00
-- 00:14.055 tx:
-- 00:14.055 0 0x00: 05 00 02 0C 01
-- 00:14.055 [ 2] pin:D12 state:HIGH
-- 00:14.556 tx:
-- 00:14.556 0 0x00: 05 00 02 0C 00
-- 00:14.556 [ 2] pin:D12 state:LOW
-- 00:15.056 tx:
-- 00:15.056 0 0x00: 05 00 02 0C 01
-- 00:15.557 tx:
-- 00:15.557 0 0x00: 05 00 02 0C 00
-- 00:16.057 tx:
-- 00:16.057 0 0x00: 05 00 02 0C 01
-- 00:16.057 [ 4] pin:D12 state:HIGH
-- 00:16.557 tx:
-- 00:16.557 0 0x00: 05 00 02 0C 00
-- 00:16.557 [ 4] pin:D12 state:LOW
-- 00:17.057 tx:
-- 00:17.057 0 0x00: 05 00 02 0C 01
-- 00:17.558 tx:
-- 00:17.558 0 0x00: 05 00 02 0C 00
# do fast GPIO pin writes (use a oScope on D13 to check the waveform)
-- 00:17.558 ---> test: fast_gpio
-- 00:17.558 turning logger off; there will be no output for about 40s...
-- 00:00.000 done.
# test the ADC pin; move the (blue) pot to see the voltages change
-- 00:00.000 ---> test: adc
-- 00:00.000 [ 0] pin:A7 2.049V
-- 00:00.503 [ 1] pin:A7 2.389V
-- 00:01.007 [ 2] pin:A7 2.054V
-- 00:01.511 [ 3] pin:A7 3.507V
-- 00:02.015 [ 4] pin:A7 2.943V
-- 00:02.518 [ 5] pin:A7 4.461V
-- 00:03.022 [ 6] pin:A7 4.534V
-- 00:03.526 [ 7] pin:A7 4.690V
-- 00:04.030 [ 8] pin:A7 4.039V
-- 00:04.534 [ 9] pin:A7 3.296V
-- 00:05.037 [ 10] pin:A7 1.861V
-- 00:05.541 [ 11] pin:A7 0.000V
-- 00:06.045 [ 12] pin:A7 0.000V
-- 00:06.549 [ 13] pin:A7 1.531V
-- 00:07.053 [ 14] pin:A7 1.201V
-- 00:07.557 [ 15] pin:A7 1.903V
-- 00:08.061 [ 16] pin:A7 2.439V
-- 00:08.565 [ 17] pin:A7 1.903V
-- 00:09.069 [ 18] pin:A7 2.072V
-- 00:09.573 [ 19] pin:A7 2.952V
# check ping/pong communication with the logger turned off
-- 00:10.073 ---> test: logger_off
-- 00:10.073 tx:
-- 00:10.073 0 0x00: 03 00 00
-- 00:10.076 rx:
-- 00:10.076 0 0x00: 04 01 00 01
-- 00:00.000 tx:
-- 00:00.000 0 0x00: 03 00 00
-- 00:00.003 rx:
-- 00:00.003 0 0x00: 04 01 00 01
# do some adhoc testing (for dev purposes)
-- 00:00.003 ---> test: adhoc
-- 00:00.003 tx:
-- 00:00.003 0 0x00: 08 00 FF 00 01 02 03 04
-- 00:00.006 rx:
-- 00:00.006 0 0x00: 08 01 FF 00 01 02 03 04
-- 00:00.007 tx:
-- 00:00.007 0 0x00: 0E 00 FF 68 65 6C 6C 6F 20 77 6F 72 6C 64
-- 00:00.011 rx:
-- 00:00.011 0 0x00: 0E 01 FF 68 65 6C 6C 6F 20 77 6F 72 6C 64
-- 00:00.011 echo: "hello world"
# show a Python Matplot on the PC showing the ADC pin output;
-- 00:00.011 ---> test: graphic
-- 00:00.000 [ 0] pin:A7 2.957V
-- 00:00.293 [ 1] pin:A7 2.971V
-- 00:00.558 [ 2] pin:A7 1.174V
-- 00:00.821 [ 3] pin:A7 2.962V
-- 00:01.085 [ 4] pin:A7 2.168V
-- 00:01.348 [ 5] pin:A7 2.068V
-- 00:01.612 [ 6] pin:A7 3.081V
-- 00:01.875 [ 7] pin:A7 1.783V
-- 00:02.139 [ 8] pin:A7 3.182V
-- 00:02.402 [ 9] pin:A7 1.774V
-- 00:02.665 [ 10] pin:A7 3.136V
-- 00:02.929 [ 11] pin:A7 3.388V
-- 00:03.192 [ 12] pin:A7 3.351V
-- 00:03.456 [ 13] pin:A7 3.351V
-- 00:03.720 [ 14] pin:A7 3.351V
-- 00:03.984 [ 15] pin:A7 3.351V
-- 00:04.247 [ 16] pin:A7 3.351V
-- 00:04.518 [ 17] pin:A7 3.351V
-- 00:04.784 [ 18] pin:A7 3.351V
-- 00:05.052 [ 19] pin:A7 3.356V
-- 00:05.325 [ 20] pin:A7 3.351V
-- 00:05.589 [ 21] pin:A7 3.351V
-- 00:05.854 [ 22] pin:A7 3.351V
-- 00:06.125 [ 23] pin:A7 3.351V
-- 00:06.399 [ 24] pin:A7 3.351V
-- 00:06.669 [ 25] pin:A7 3.351V
-- 00:06.934 [ 26] pin:A7 3.351V
-- 00:07.203 [ 27] pin:A7 3.351V
-- 00:07.469 [ 28] pin:A7 3.351V
-- 00:07.732 [ 29] pin:A7 3.351V
-- 00:07.997 [ 30] pin:A7 3.351V
-- 00:08.262 [ 31] pin:A7 3.351V
-- 00:08.530 [ 32] pin:A7 3.351V
-- 00:08.795 [ 33] pin:A7 3.351V
-- 00:09.060 [ 34] pin:A7 3.351V
-- 00:09.331 [ 35] pin:A7 3.351V
-- 00:09.603 [ 36] pin:A7 3.351V
-- 00:09.874 [ 37] pin:A7 3.351V
-- 00:10.140 [ 38] pin:A7 3.351V
-- 00:10.405 [ 39] pin:A7 3.351V
-- 00:10.670 [ 40] pin:A7 3.351V
-- 00:10.936 [ 41] pin:A7 3.351V
-- 00:11.208 [ 42] pin:A7 3.351V
-- 00:11.474 [ 43] pin:A7 3.351V
-- 00:11.742 [ 44] pin:A7 3.351V
-- 00:12.007 [ 45] pin:A7 3.351V
-- 00:12.273 [ 46] pin:A7 3.351V
-- 00:12.539 [ 47] pin:A7 3.351V
-- 00:12.809 [ 48] pin:A7 3.351V
-- 00:13.074 [ 49] pin:A7 3.351V
-- 00:13.340 [ 50] pin:A7 3.351V

# test the PWM; use an oScope to see this
-- 00:13.611 ---> test: pwm
-- 00:13.611 tx:
-- 00:13.611 0 0x00: 05 00 01 05 01
-- 00:13.611 pwm: current: None, setting to: 127
-- 00:13.611 tx:
-- 00:13.611 0 0x00: 05 00 07 05 7F
-- 00:14.611 pwm: current:127 setting to: 137
-- 00:14.612 tx:
-- 00:14.612 0 0x00: 05 00 07 05 89
-- 00:15.612 pwm: current:137 setting to: 127
-- 00:15.612 tx:
-- 00:15.612 0 0x00: 05 00 07 05 7F
-- 00:16.612 pwm: current:127 setting to: 147
-- 00:16.612 tx:
-- 00:16.612 0 0x00: 05 00 07 05 93
# test the PWM moving the servo; moves +ve max, -ve max, then +100, then -50 degrees
-- 00:16.612 ---> test: servo
-- 00:16.612 tx:
-- 00:16.612 0 0x00: 04 00 08 06
-- 00:16.612 tx:
-- 00:16.612 0 0x00: 05 00 09 02 3F
-- 00:17.863 servo: setting to: 195 deg, 2395uS
-- 00:17.863 tx:
-- 00:17.863 0 0x00: 05 00 09 09 5B
-- 00:19.113 servo: setting to: 0 deg, 575uS
-- 00:19.113 tx:
-- 00:19.113 0 0x00: 05 00 09 02 3F
-- 00:20.364 servo: setting to: 100 deg, 1508uS
-- 00:20.364 tx:
-- 00:20.364 0 0x00: 05 00 09 05 E4
-- 00:21.614 servo: setting to: 50 deg, 1042uS
-- 00:21.614 tx:
-- 00:21.614 0 0x00: 05 00 09 04 12
-- 00:21.614 tx:
-- 00:21.614 0 0x00: 05 00 09 02 3F
# does the dev test
-- 00:22.614 ---> test: dev
# all done, no errors
OK doit python: rc=0
---> doit: overall rc=0