aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Delmar Davis <don@suspectdevices.com>2013-05-10 20:06:39 -0700
committerDonald Delmar Davis <don@suspectdevices.com>2013-05-10 20:06:39 -0700
commit94d2ba00f1604aa1ae172039bbcfc72cdf9b8d88 (patch)
tree66997aabbe352313b1eaeeab9d39344f843e5439
parent7bab0027f335ad30c0eabcb553b968daf7c03698 (diff)
Modified trimet.lua for wr740 and new location.
-rw-r--r--sketches/trackdisplay1/trimet.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/sketches/trackdisplay1/trimet.lua b/sketches/trackdisplay1/trimet.lua
index 34716af..99920e5 100644
--- a/sketches/trackdisplay1/trimet.lua
+++ b/sketches/trackdisplay1/trimet.lua
@@ -1,3 +1,9 @@
+-- trimet transit tracker
+-- 7536 = 75 southbound @42nd and sumner
+-- 11503 = MAX Yellowline southbound @Killingsworth and Interstate.
+-- (C) 2013 Donald Delmar Davis, Suspect Devices.
+-- THIS IS FREE SOFTWARE, released under Modified BSD (look it up)
+
http = require("socket.http")
mycontent=""
@@ -5,7 +11,7 @@ checktime=0
estimates={}
scheduled={}
-io.output('/dev/ttyACM0')
+io.output('/dev/ttyATH0')
-- still trying to figure this out.
-- from http://lua-users.org/wiki/FiltersSourcesAndSinks
@@ -21,7 +27,7 @@ function mysink(chunk,src_err)
return true
else
mycontent=chunk
- print(mycontent)
+ -- print(mycontent)
checktime=string.match(mycontent,'queryTime="(%d+)')
print (os.date("%d %b %X", string.sub(checktime,1,10)))
@@ -67,7 +73,7 @@ end
while true do
http.request{
- url="http://developer.trimet.org/ws/V1/arrivals?locIDs=7536&appID=EC36A740E55BB5A803BB2602B";
+ url="http://developer.trimet.org/ws/V1/arrivals?locIDs=11503&appID=EC36A740E55BB5A803BB2602B";
sink=mysink;
}
io.flush()