I finished testing the communications between the BeagleBone Black Webserver and the Arduino controller using the EZR32WG 915MHz Wireless Starter Kits as a serial to wireless link. The current set up looks like the picture below:
The Arduino is used for all real time control tasks. Control commands can be sent, inputs can be queried, and control variables can be adjusted by commands sent through the UART serial port. The outputs are: three lights, two pumps, and two heaters (with room for a third if it gets cold enough this winter. The inputs are 4 Dallas DS18S20 One Wire temperature sensors, 3 photo cells (Cds photoresistors), and 1 HC-sr04 ultrasonic sensor. Eighteen control variables are used in the control algorithms, and all of them can be adjusted by serial commands. The Arduino is powered from the 5VDC and GND pins of the EZR32WG 915MHz Wireless Starter Kit. The LEUART Tx pin of the kit is connected directly to the Arduino Rx pin, and the LEAURT Rx pin is connected to the Arduino Tx pin through a voltage divider which brings the 5v from the Arduino down to 3V.
I spent quite a bit of time with the EZR32WG 915MHz Wireless Starter Kits, but not enough to really use the full power of the platform. Unfortunately I just didn't have time to go really deep in exploring all of the possibilites, but I was extremely impressed with the radio configuration and network analyzer tools. The ability to debug network communications with Simplicity Studio is better and than any other platform I have used. With that said, I did pretty much the bare minimum needed to take in a command, send a 24 byte packet from one radio to the other, and relay the command to the serial port on the other end. I have attached the code. The quality of the code is well... almost embarrassing, but I have really no time to improve it before the contest is over. I hope someone finds it useful.
The code for the Gateway and the node are the same except for the Gateway uses the VCOM port so the #define USE_VCOM line in the serialcomms.h file is uncommented, and the Node uses the LEUART0 port so the #define USE_VCOM line is commented and the #define USE_LEUART0 line is uncommented.
The BeagleBone Black will handle all data storage and run the live webpage, email alerts, and timekeeping. It will send and receive commands through the ttyACM0 serial port. When data is received, it will update a current state file, store some data in a database, and send out an email if an alert is triggered. This is the final code that must be complete for me to be able to demonstrate a truly web-enabled solution. Right now the system is running fine, but I am not collecting the data I want, and I can't adjust control variables unless I send commands through the BBB serial port using something like: echo "o,1,1;" > /dev/ttyACM0 on the command line.
I have been harvesting lettuce everyday for the last 4 days. Each harvest has been approximately 2oz which is enough for the whole family to have a salad everyday! This is a very delicious variety, and I look forward to a salad a day all winter long! Here is a picture of what I picked yesterday. This is about what I have been picking everyday. I did not weigh it, but I'm pretty sure 2oz is a close guess.
Top Comments