User Manual
pg. 22
Copyright © 2017- www.SingleTact.com
4.3 Arduino Demo Outline
The diagrams in this section provide an outline of the Arduino demo functionality as described in the
previous section. In this case the PC to Arduino interface was setup to mirror the I
2
C interface,
keeping the Arduino code as simple as possible.
Figure 14 Arduino example - communication architecture
Figure 15 Arduino Application flow
PC
1 Arduino Uno
N SingleTacts
Request data (I2C)
Send sensor
data
Send new data to
PC
If new data (compare
itr) - update Graph
repeats
repeats
Request data
(USB/UART)
Scan
sensors*
repeats
Transfer
to output
buffer
and
timestam
p
Read
output
buffer
*Scan cycle is
asynchronous
Loop
Relay commands
over I2C
Command needs
I2C result?
Send result / ack to
PC
Read result over
I2C
Y
Parse command
packet
Y
Timestamp
reading*1
N
New
Command?
N
(*1 Note: The Arduino contains a crystal
oscillator so it is able to produce a more
accurate time stamp than the SingleTact
interface board.)