Closed Bananagab closed 3 years ago
This is by design as this is part of a complete curriculum. The python program main.py expects that the Grove Pi hat and sensors are connected to the Pi. I was able to reproduce this by removing the hat and sensors.
To purchase a kit, or to find what hardware and sensors you need, please visit: https://aka.ms/FBFSKit
This is by design as this is part of a complete curriculum. The python program main.py expects that the Grove Pi hat and sensors are connected to the Pi. I was able to reproduce this by removing the hat and sensors.
To purchase a kit, or to find what hardware and sensors you need, please visit: https://aka.ms/FBFSKit
I have the kit and the hat is installed. I had the air temperature sensor connected to the right port. Does it expect all sensors to be connected to work?
All sensors are expected for complete and accurate data readings. You can run main.py without them connected but it will generate these types of errors and the serial data will not be complete with missing data points for the missing sensors, to be expected. In some cases the data will be inaccurate, for example, if the soil moisture sensor is disconnected the data will reflect the analog voltage of the input pin regardless of whether or not the sensor is attached.
[edit:] While it is possible to hot swap the sensors, removing and replacing the Sunlight Sensor may cause failure in the sensor readings (visible and infrared). Rebooting is required to reinitialize the sensor. Similarly, removing the Grove hat while the Pi is running will result in the Pi rebooting.
To verify that the serial data is streaming from the FarmBeats application connect the Serial-TTL cable to the Pi and to your laptop, and open the serial port in a serial terminal, or Excel using Data Streamer. Then you can see in real-time the effect of missing sensors on the data being captured.
To verify that the serial data is streaming from the FarmBeats application connect the Serial-TTL cable to the Pi and to your laptop, and open the serial port in a serial terminal, or Excel using Data Streamer. Then you can see in real-time the effect of missing sensors on the data being captured.
I tried runnning main.py with all the sensors installed. There's still some errors with DataSettings.py? And there's no information coming out to the Serial Monitor.
>>> %Run main.py
Fatal Python error: Cannot recover from stack overflow.
Thread 0xb4fa0460 (most recent call first):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 483 in read
File "/home/pi/farmbeats-datastreamer/data_streamer/DataStreamer.py", line 50 in read_data
File "/home/pi/farmbeats-datastreamer/main.py", line 32 in read_incoming_serial
File "/usr/lib/python3.7/threading.py", line 865 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Current thread 0xb6f00ad0 (most recent call first):
File "/usr/lib/python3.7/dbm/__init__.py", line 122 in whichdb
File "/usr/lib/python3.7/dbm/__init__.py", line 78 in open
File "/usr/lib/python3.7/shelve.py", line 227 in __init__
File "/usr/lib/python3.7/shelve.py", line 243 in open
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 353 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings
File "/home/pi/farmbeats-datastreamer/data/DataSettings.py", line 363 in save_settings```
I started from scratch with a new SD card and manual install, and the only way I can repro this is when the pi hat is removed entirely. Is it possible that the pins are not perfectly aligned?
Please give me a list of the steps to repro, as detailed as possible including how you created the SD card, what shell commands, etc. I will follow them exactly and try to repro.
I started from scratch with a new SD card and manual install, and the only way I can repro this is when the pi hat is removed entirely. Is it possible that the pins are not perfectly aligned?
Please give me a list of the steps to repro, as detailed as possible including how you created the SD card, what shell commands, etc. I will follow them exactly and try to repro.
I will restart from scratch tomorrow and I will document everything here.
I tried all that without the sensors, just wanted main.py to run at all.
Found the issue. The Raspberry Pi 4 outputs Serial Data to ttyAMA0 by default and not ttyS0 in DataStreamer.y
I have followed the exact steps as mentioned by @Bananagab and got an error in step 8. Then I performed the following steps using sudo raspi-config --> Interface Options --> Serial.
Still getting the error of Step 8. Is there a way to troubleshoot? I was also not able to understand @Bananagab comments on the serial port.
Can you please help me to resolve this @damyka? - I am trying to get this project ready for my kid.
@Bananagab, I now understand the problem you are having. There are 2 issues here:
main.py
as the root user. If you want to also run this file manually in a python shell you must first stop the service. See the section: Manually running the python application.I will update the README to clarify installation options.
@rishabhIn, Please see the updated README and follow the instruction in the section SD Card Installation.
Hi @damyka , I have got success in the installation, after following the steps, I am getting
What are your thoughts? Do you think it will show the values ?
@rishabhIn, with the SD card installation you do not need to log into to the Pi and change anything or stop/start services. After reboot the services will run automatically and assuming that the hardware build is correct, sensor data will start streaming.
Verify that serial data is streaming from the Pi by connecting the serial-ttl cable to a serial monitor.
Instructions are updated in README and both of the install options are fully tested:
I tried reinstalling with the install.sh file, reflashing the SD card but I can't get any data out from the Pi to Excel