commit 6ec4a1063e9d4a4b62b5c0bbf53246c025141e57
Author: dsorber <david.sorber@gmail.com>
Date:   Mon Apr 29 00:20:13 2013 -0400

    Made a few minor changes to the RPi client.

diff --git a/525.743/code/rpi_client.py b/525.743/code/rpi_client.py
index 60314bc..cfc5bba 100644
--- a/525.743/code/rpi_client.py
+++ b/525.743/code/rpi_client.py
@@ -25,9 +25,9 @@ SENSORS = None
 
 THRESHOLD_TEMP = 82
 
-HOST = '192.168.1.2'
+HOST = '192.168.1.1'
 PORT = 2243
-REMOTE_DATA_INTERVAL = 20 # in seconds
+REMOTE_DATA_INTERVAL = 1 # in seconds
 
 def button_isr(gpio_id, val):
 	global CURRENT_IDX
@@ -47,6 +47,11 @@ def main():
 	global CURRENT_IDX
 	global SENSORS
 
+	# Make sure the script is being run as root before continuing
+	if os.geteuid() != 0:
+		print 'ERROR: You must run the client as root!'
+		return
+
 	# Disable "channel already in use" warnings
 	RPIO.setwarnings(False)
 
@@ -57,11 +62,6 @@ def main():
 		if sys.argv[1] == '-d':
 			DEBUG = True
 
-	# Make sure the script is being run as root before continuing
-	if os.geteuid() != 0:
-		print 'ERROR: You must run the client as root!'
-		return
-
 	# Attempt to connect to the server, make 5 attempts
 	print '\n\nAttempting to connect to server...',
 	sys.stdout.flush()
@@ -137,6 +137,8 @@ def main():
 		if interval_counter == REMOTE_DATA_INTERVAL:
 			interval_counter = 0
 
+		interval_counter += 1
+
 		# Grab the current date/time
 		now = datetime.datetime.now()
 
@@ -189,8 +191,6 @@ def main():
 				if DEBUG:
 					print 'ERROR'
 
-		interval_counter += 1
-
 		# Read once every second (approximated to account for processing 
 		# latencies)
 		time.sleep(0.9)
