Botanicalls Home
Botanicalls Kit
1 2 3 4 5 6 7 8
start
& parts
moisture
sensor
XPort
Shield
Proto
Shield
the
sandwich
software going
live
share

 

6

software

You'll need to configure your XPort's Channel 1 to use Flow 02 and ConnectMode D4.
Check out the excellent XPort tutorial on LadyAda.net for more information on connecting with and setting up your XPort.

You also may want to reference the XPort User Guide on the Lantronix documentation web site.
Plug in your power supply and Ethernet cable then connect the USB cables to your computer. Your board is now set up for downloading code to the Arduino.
Download the Arduino environment for your computer system from the Arduino site. Arduino is a free, cross-platform and open-source electronics prototyping system created and maintained by a worldwide network of physical computing enthusiasts. 
Download the Botanicalls Twitter Code (v 2.13) and unzip the archive. The unzipped Botanicalls Twitter folder should be put in the Arduino documents directory (MyDocuments\Arduino on Windows or  Documents:Arduino on the Mac). It will now appear when you select Sketchbook from the File menu in Arduino.



Open the BotanicallsTwitter sketch in Arduino. You'll need to make at least one change before uploading the code:

  • Update the line that begins with #define USERNAMEPASS "username:password" with the real username and password for your Twitter account, separated by a :

You may also want to change some other settings. The Botanicalls system operates based on a variety of moisture thresholds. These will vary by plant, soil composition and even your own personal horticultural style. Start with the default values, and adjust until you are happy with the system's behaviors:

This line defines the value between 0 and 1023 below which the plant is in need of water:
  • #define MOIST 450 

This line defines the value between 0 and 1023 that defines an urgent state of dryness:
  • #define DRY 350 

This line defines the moisture value between 0 and 1023 that represents a proper watering.
  • #define SOAKED 600

Finally, this line defines the positive change in moisture level that indicates a watering event has occurred.
  • #define WATERING_CRITERIA 100

The plant's Twitter messages are defined in the "checks" tab. The Arduino has very limited RAM memory for text strings, so keep these messages short. If they get to long you'll overflow the memory stack and the system will begin to behave erratically.

There are a variety of other settings that can easily be changed to suit your taste including sampling intervals, quantity of samples, Arduino pin connections and so forth. These are documented in the comments for each setting.

When you are ready to upload the code, select the correct serial port and board type on the Tools menu, then select Upload to I/O Board from the File menu. (You may need to disconnect the wire from the Arduino digital pin 0 that connects to the USB-serial adapter's TX port to avoid an error message. We don't use this connection in the basic example anyway.)

Once the code is uploaded, your system is ready to go. You can monitor the system with the Serial Monitor in Arduino at 9600 baud.


When you power up the system you should see a message "Botanicalls starting..." Next you will see a series of moisture readings, interspersed occasionally with a watering detection reading. By touching the nails together, you can simulate a high level of soil moisture. By moving them apart, you will simulate a high level of dryness. Use this procedure to test the sensor system.

Press the Twitter button on the Proto Shield to manually send a Twitter with the current moisture level. Check the plant’s Twitter feed (http://twitter.com/username) to make sure that the Twitter has gone through successfully. If a Twitter message does not appear within a few minutes, recheck your power and Ethernet connections.

When BotanicallsTwitter has a message to send, you will see a series of Twitter connection messages in the Serial Monitor, followed by a long string of HTML responses. A final message will let you know if the twitter message was sent successfully or not. Check your Twitter account to see if the message arrived properly. If it did, feel free to do a little happy dance–you've made a Botanicalls!


Questions?
Email: support [at] botanicalls [dot] com
next step >

These instructions are for the Botanicalls DIY Kit V1.0. This kit was for sale April - October 2008 and is no longer available.
For information about the new and improved kit, please visit the Botanicalls Kit page.