Skip to content

Instantly share code, notes, and snippets.

Lukelectro /
Created June 6, 2019 17:56 — forked from marians/
How to read data from SDS011 sensor via USB serial connection, from
# Anpassung für big endian unter RHEL 7
while true; do
stty -F /dev/ttyUSB0 9600 raw
INPUT=$(dd conv=swab bs=10 count=1 </dev/ttyUSB0 2>/dev/null | od -x -N10 |head -n 1|cut -f2-10 -d" ");
#echo $INPUT