This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
blink_electricity_monitor [2021/04/05 21:34] admin [Blink Electricity Monitor] |
blink_electricity_monitor [2022/01/06 03:08] (current) admin |
||
---|---|---|---|
Line 43: | Line 43: | ||
To dump this to a file, on the Linux box (or Raspberry Pi) the Arduino is plugged into, you need to use ''stty'' set the baud rate, then just use cat to read directly from the Ardunio (I also use ''ts'' to prefix each line with a timestamp): | To dump this to a file, on the Linux box (or Raspberry Pi) the Arduino is plugged into, you need to use ''stty'' set the baud rate, then just use cat to read directly from the Ardunio (I also use ''ts'' to prefix each line with a timestamp): | ||
<code bash> | <code bash> | ||
- | stty -F /dev/ttyASM0 9600 | + | stty -F /dev/ttyACM0 9600 |
- | cat /dev/ttyASM0 | ts > /tmp/electric_meter.log | + | cat -s /dev/ttyACM0 | awk NF | ts > electricmeter.log |
</code> | </code> | ||