I was shipped a new board to use with the Smart Plant Care Kit. Its a Seeeduino 4.2. Also, tech support gave me the attached code to run on the board, and here is what I am seeing:
With the code provided on the Seeeduino v4.2, here are the warnings upon compilation:
WARNING: library Wire claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (Seeeduino_AVR) architecture(s).
WARNING: library EEPROM claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (Seeeduino_AVR) architecture(s).
Sketch uses 17598 bytes (54%) of program storage space. Maximum is 32256 bytes.
Global variables use 1062 bytes (51%) of dynamic memory, leaving 986 bytes for local variables. Maximum is 2048 bytes.
Here is the output in the serial monitor when pressing the button and turning the encoder. The OLED screen did not change from “Smart Plant Care Press Button to start watering Moisture: 0.0%”
SwitchtoWateringFlag=0
loop! 10078
SwitchtoWateringFlag=0
loop! 10245
SwitchtoWateringFlag=0
loop! 10412
Hum=39.00
Temp=25.00
MoisHumidity=0.00
UVIndex=0.52
SwitchtoWateringFlag=0
loop! 11114
SwitchtoWateringFlag=0
loop! 11276
SwitchtoWateringFlag=0
loop! 11438
SwitchtoWateringFlag=0
loop! 20164
SwitchtoWateringFlag=0
loop! 20325
SwitchtoWateringFlag=0
loop! 20487
Hum=39.00
Temp=25.00
MoisHumidity=0.00
UVIndex=0.52
SwitchtoWateringFlag=0
loop! 21189
SwitchtoWateringFlag=0
loop! 21351
SwitchtoWateringFlag=0
loop! 21513
Thanks for your help,
Steve Albright
Smart_plant.zip (4.96 KB)
While troubleshooting this I noticed that the sensor / pin assignments in the sketch do not match those in the instruction manual. So I reorganized the sensors to match the assignments in the sketch:
#define DHTPIN A0 // what pin we’re connected to
#define MoisturePin A1
#define SI1145_pin A2
#define ButtonPin 0
// Uncomment whatever type you’re using!
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
#define EncoderPin1 7
#define EncoderPin2 8
#define WaterflowPin 5
#define RelayPin 6
Now I am getting different errors when trying to upload the sketch to the board:
Sketch uses 15712 bytes (48%) of program storage space. Maximum is 32256 bytes.
Global variables use 1058 bytes (51%) of dynamic memory, leaving 990 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM17 -b115200 -D -Uflash:w:C:\Users\Owner\AppData\Local\Temp\arduino_build_107341/Gardening.ino.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2014 Joerg Wunsch
System wide configuration file is “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”
Using Port : COM17
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.
An error occurred while uploading the sketch
Hi:
Can you take some pictures to let the question more clear? And compiling the warnings has no effect, because we have test. I have checked again,sensors’ pin assignments match those in the instruction manual. Here is the code <LINK_TEXT text=“https://github.com/Seeed-Studio/Gardeni … dening.ino”>https://github.com/Seeed-Studio/Gardening_demo_Arduino/blob/master/Gardening/Gardening.ino</LINK_TEXT> .