Hello!! I am trying to build a system that uses the Yun to control a greenhouse (fans/lights/pumps) and to relay sensor information to a database. I am using python and bridgeClient to get and put values from the python and arduino scripts, and have created a basic test to pull one value and send one value. I have put my script in a folder called "www" in the same folder as the arduino sketch, and it appears on the SD card when I upload the sketch wirelessly. The problem is that the get() within the arduino always returns nothing... I am not sure what is wrong because the code seems correct... :-[ please help!!!
Here is the python code:
import sys sys.path.insert(0, '/usr/lib/python2.7/bridge/') from bridgeclient import BridgeClient as bridgeclient value = bridgeclient() A0_State = value.get("A0") value.put("Digital5", "155")
And here's the arduino main loop:
char D5_state; //sending value to python Bridge.put("A0", String(analogRead(A0))); //pulling value from python Bridge.get("Digital5", D5_state, 5); int D5int = atoi(D5_state); analogWrite(5, D5int); delay(1000);
Great thanks for any help!!! :grinning: :grinning: