Getting Software Running on PFC V1.0


#1

Hi Everyone!

I’ve built a PFC, hooked up all the sensors, and uploaded the latest gro-microcontroller code to the Arduino Mega 2560. So far, all except the DHT22 are talking and getting pretty decent results. I’ve debugged the harness by hooking up an arduino uno with sample code (a la adafruit) to make sure it was good (it was) and also hooked up an oscilloscope to the analog 0 pin to make sure there were signals going through (there was, and it looked like it was operating according to specification). Unless I’m missing something, I’m just going to call it good because the cozir also gets temp and humidity and the DHT22 is therefore redundant temp/humidity. Also got all the relays tested and working.

What I really would like some aid in is getting the software setup on the Raspberry Pi 3 model B. So far, I have:

  1. Updated the RPI
  2. git cloned gro-api repository https://github.com/OpenAgInitiative/gro-api and followed all the steps in the github readme, got it running locally.
  3. Downloaded gro-daemon to a host computer

Questions:

  1. Looks like there are several repositories for the RPi/client, am I trying to use a workable version? I see that there is openag_brain/ros/ui, but looks to be in development and not released.
  2. Looks like when I run “sudo gro_api_call_command loaddata pfc_data”, it looks like it runs a development build of django, which to my knowledge does not allow connections from other computers on the network. I tried to connect to it with gro-daemon on another computer but was not able to.
  3. Shouldn’t the api be setup and started automatically upon RPi bootup?
  4. I noticed that JSkinykin mentioned to edit server_ip.txt, but can’t find it on the RPi. Where is it/where do I create it?
  5. What is the robusto board? don’t see it used anywhere atm.

Comments:

  1. I’ve found it hard to locate documentation about the software. Sometimes even none (i.e gro-daemon, would of been nice if it mentioned where the compiled binaries were).
  2. Unsure at this point what software is required where (i.e. Arduino (I have experience with it so it was not too bad, but still had to hunt for the .ino), RPi (looks like at least 3 repositories right now), and host (gro-daemon to my knowledge, but not sure if it is compatible with all versions)) and what works with what.
  3. Have not found any gro software for the little touchscreen, where is the documentation for it?
  4. Build guides were good. Not sure if anyone has a shop bot normally, but I got away building most of it with a knife, a drill, a circular saw, a carpenters square, a ratchet set, a jigsaw, and an angle grinder.
  5. An arduino pinout map is really helpful for debugging where the sensors go. I made a spreadsheet of each sensor and actuator, added information about what they do and where to get them, how to use them, and which pins they go to on the Arduino. Made debugging really easy
  6. The gro-hardware ElectronicsSchematicLarge wiring for the AC outlet is wrong. AC outlet 1 goes to relay 1, AC Outlet 2 goes to relay 2, etc. Right now it shows AC outlet 1 going to 4 AC outlet 2 going to relay 3, etc…
  7. The pH sensor, according to https://www.dfrobot.com/index.php?route=product/product&product_id=1025, is not meant for continuous operation. Probably should use https://www.dfrobot.com/index.php?route=product/product&path=36_68&product_id=1110 for continuous operation.

So I’d be grateful for your help in getting my PFC to be a fully operational (battlestation. ha, Star Wars joke)! Looks like all of the wiki pages are immutable right now, but If I get the PFC working I’d be happy to put more information in the wiki about getting the software setup and auto-running. Same for V1.1 software.


#2

Hi I also saw some difficulty with the DHT22 sensor, so i start to read the datasheet of the DHT22 and then i see the OUT PUT SIGNAL.

It say that is a digital signal, and in the arduino .ino conect this sensor to a ANALOG pin.


#3

It is odd that the PFC connects the grove temp/humidity sensor to the analog pin even though it is a digital signal. However, the arduino can use the analog pin as digital I/O. To test this, i used an arduino UNO with code from https://learn.adafruit.com/dht/using-a-dhtxx-sensor. It does work, so I suspect that there is an issue (maybe just configuration?) in the PFC arduino code.


#4

I connected it to the Digital Pin 2. And it worked for me.


#5

Hmm, I tried doing that, but then I lost SATM 1 and SAHU 1. Plugging the DHT22 back into A0 populated SATM 1 and SAHU 1 again. Therefore, it seems the issue is actually with reading the COZIR sensor, which is weird because I’m getting CO2 measurements just fine.


#6

Still need help with setting up the Raspberry Pi, I’m using Gro-API and running “sudo gro_api_call_command runserver” but not being able to connect using Gro-Daemon. Any help would be appreciated.


#7

Tried installing openag_brain by following https://github.com/OpenAgInitiative/openag_brain_docker_rpi. I then opened https://openaginitiative.github.io/openag_ui/ and inputted the ip of my raspberry pi. Initially, I saw the web interface but without anything populating and nothing showing. Trying to connect with another browser, the https://openaginitiative.github.io/openag_ui/ said that there was no raspberry pi on the ip I had on the other window. Maybe I’ll try another power supply and see if it helps.