
Serial Interface
nOb is able to send data and receive commands over a simple serial interface. To be able to access
this serial interface in Windows, you may have to install the Arduino Leonardo drivers. Follow the
official instructions here
https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro#toc10
and you
are ready to go. A serial device (
COM port
) will then appear in
Windows Device Manager
.
In Linux and MacOSX, there is no need to install any extra drivers. The serial interface is available
as a
ttyUSB
device in
/dev
.
The serial connection operates at a baud rate of 9600 bps. nOb repeatedly sends two bytes,
describing its current state:
1.
State Byte
This byte describes the general state, which nOb is currently in. The most significant bit is always a
zero
. The State Byte is encoded as follows:
MSB
D
7
= 0
D
6
D
5
D
4
D
3
D
2
D
1
D
0
LSB
•
D
6
= 1, if the big knob is being touched, 0, otherwise.
•
D
5
= 1, if the left toggle switch is being touched, 0, otherwise.
•
D
4
= 1, if the right toggle switch is being touched, 0, otherwise.
•
D
3
= 1, if the left toggle switch is flipped upwards, 0, if it is flipped downwards.
•
D
2
= 1, if the right toggle switch is flipped upwards, 0, if it is flipped downwards.
•
D
1
D
0
=
◦
00, if everything works normally.
◦
11, if there is a general error (sent repeatedly) or if the last command failed to execute
(transmitted only once).
◦
01, if the last command has just been successfully executed (transmitted only once).
◦
10, if the last command was unknown (transmitted only once).
2. Encoder Byte
This byte describes how much and in which direction the knob has been turned since the last
transmission. The most significant bit is always a
one
. The Encoder Byte is encoded as follows:
MSB
D
7
= 1
D
6
D
5
D
4
D
3
D
2
D
1
D
0
LSB
•
D
6
= 0, if the knob has been turned clockwise, 1, if it has been turned counter-clockwise.
•
D
5
D
4
D
3
D
2
D
1
D
0
= Ranging from 000000 (decimal 0) to 111111 (decimal 63), describing the
number of ticks the rotary encoder counted since the last transmission. If you sum the
number of ticks during a full knob turn, this should add up to 2400 ticks.
Copyright © 2015-2020 NOB CONTROL SOLUTIONS
11