microsoft / farmbeatsforstudents

MIT License
18 stars 15 forks source link

No data locally in /home/pi/Documents/fbfs_log.csv #5

Closed VeggieVampire closed 2 years ago

VeggieVampire commented 2 years ago

I am unable to see any data in /home/pi/Documents/fbfs_log.csv

but when I connect a computer I can see everything on the com port and in the excel spreadsheet. Just trying to read the data without the computer connected. Any way to read the serial data stream locally on the pi?

damyka commented 2 years ago

Hi @VeggieVampire, this is by design. The file (/home/pi/Documents/fbfs_log.csv) is a log file only gets written to once an hour.

If you want to change this the time interval is managed in main.py, line 74.

Since the farmbeats python app is attached to the serial port (dev/ttyS0) you would need an application like serial port monitor for Linux to be able to see serial data and events from other applications.

I hope this helps!

VeggieVampire commented 2 years ago

Thanks for the reply but I've have this on for weeks and nothing ever writes in the directory. Is there anything I need to do to start it without connecting to the serial port?

damyka commented 2 years ago

OK, I understand. By default data logging must be initiated by the user. Using the custom Excel workbook, there is a Start logging data button on the Data Journal worksheet in the workbook that will send a start logging command to the Pi. Once started, the logger will write data once per hour and will continue until a end logging command is sent to the Pi.

These commands can also be sent to the Pi using a serial terminal and a set of commands to control the logger functionality that you can read about here.